ToolsConfig
@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public class ToolsConfig
io/agentscope/harness/agent/tools/ToolsConfig.java:41–99工具配置,保存相关配置项。位于 io.agentscope.harness.agent.tools 包。核心成员包括 isStrictAllow、setStrictAllow、isDefaultToolsEnabled、setDefaultToolsEnabled、getAllow、setAllow。
Workspace-level tool configuration loaded from workspace/tools.json.
Two responsibilities:
-
#allow/#deny— filter the product catalog tool surface (filesystem, shell, web, …). -
#mcpServers— declare additional tools served by external MCP servers.
Filter semantics: when allow is non-empty, catalogued tools not listed are removed;
HarnessPlatformTools (subagents, teams, tasks, plan, skills, memory helpers, …) always
survive allow. deny always wins. Empty/absent values mean "no filtering on this
side".
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public boolean isStrictAllow() | 判断是否 `isStrictAllow`。 Returns whether the strict allow. |
public void setStrictAllow(boolean value) | 设置 `setStrictAllow`。 Sets the strict allow. |
public boolean isDefaultToolsEnabled() | 判断是否默认工具已启用。 Returns whether the default tools enabled. |
public void setDefaultToolsEnabled(boolean value) | 设置默认工具已启用。 Sets the default tools enabled. |
public List<String> getAllow() | 获取 `getAllow`。 Returns the allow. |
public void setAllow(List<String> allow) | 设置 `setAllow`。 Sets the allow. |
public List<String> getDeny() | 获取拒绝。 Returns the deny. |
public void setDeny(List<String> deny) | 设置拒绝。 Sets the deny. |
public Map<String, McpServerConfig> getMcpServers() | 获取 `getMcpServers`。 Returns the mcp servers. |
public void setMcpServers(Map<String, McpServerConfig> mcpServers) | 设置 `setMcpServers`。 Sets the mcp servers. |
方法详情Method Detail
isStrictAllow
public boolean isStrictAllow()
判断是否 isStrictAllow。
Returns whether the strict allow.
booleanio/agentscope/harness/agent/tools/ToolsConfig.java:60–62setStrictAllow
public void setStrictAllow(boolean value)
设置 setStrictAllow。
Sets the strict allow.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | boolean | 值(类型 `boolean`)。The value. |
io/agentscope/harness/agent/tools/ToolsConfig.java:64–66isDefaultToolsEnabled
public boolean isDefaultToolsEnabled()
判断是否默认工具已启用。
Returns whether the default tools enabled.
booleanio/agentscope/harness/agent/tools/ToolsConfig.java:68–70setDefaultToolsEnabled
public void setDefaultToolsEnabled(boolean value)
设置默认工具已启用。
Sets the default tools enabled.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | boolean | 值(类型 `boolean`)。The value. |
io/agentscope/harness/agent/tools/ToolsConfig.java:72–74getAllow
public List<String> getAllow()
获取 getAllow。
Returns the allow.
List<String>io/agentscope/harness/agent/tools/ToolsConfig.java:76–78setAllow
public void setAllow(List<String> allow)
设置 setAllow。
Sets the allow.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
allow | List<String> | allow(类型 `List`)。The allow. |
io/agentscope/harness/agent/tools/ToolsConfig.java:80–82getDeny
public List<String> getDeny()
获取拒绝。
Returns the deny.
List<String>io/agentscope/harness/agent/tools/ToolsConfig.java:84–86setDeny
public void setDeny(List<String> deny)
设置拒绝。
Sets the deny.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
deny | List<String> | 拒绝(类型 `List`)。The deny. |
io/agentscope/harness/agent/tools/ToolsConfig.java:88–90getMcpServers
public Map<String, McpServerConfig> getMcpServers()
获取 getMcpServers。
Returns the mcp servers.
Map<String, McpServerConfig>io/agentscope/harness/agent/tools/ToolsConfig.java:92–94setMcpServers
public void setMcpServers(Map<String, McpServerConfig> mcpServers)
设置 setMcpServers。
Sets the mcp servers.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
mcpServers | Map<String, McpServerConfig> | MCP Servers(类型 `Map`)。The mcp servers. |
io/agentscope/harness/agent/tools/ToolsConfig.java:96–98