工具(OpenClaw)
OpenClaw 为 browser、canvas、nodes 和 cron 暴露一流的智能体工具。
这些工具取代了旧的 openclaw-* Skills:工具是类型化的,无需调用 shell,
智能体应该直接依赖它们。
禁用工具
你可以通过 openclaw.json 中的 tools.allow / tools.deny 全局允许/拒绝工具
(deny 优先)。这会阻止不允许的工具被发送到模型提供商。
{
tools: { deny: ["browser"] },
}
注意:
- 匹配不区分大小写。
- 支持
*通配符("*"表示所有工具)。 - 如果
tools.allow仅引用未知或未加载的插件工具名称,OpenClaw 会记录警告并忽略允许列表,以确保核心工具保持可用。
工具配置文件(基础允许列表)
tools.profile 在 tools.allow/tools.deny 之前设置基础工具允许列表。
按智能体覆盖:agents.list[].tools.profile。
配置文件:
minimal:仅session_statuscoding:group:fs、group:runtime、group:sessions、group:memory、imagemessaging:group:messaging、sessions_list、sessions_history、sessions_send、session_statusfull:无限制(与未设置相同)
示例(默认仅消息,同时允许 Slack + Discord 工具):
{
tools: {
profile: "messaging",
allow: ["slack", "discord"],
},
}
示例(coding 配置文件,但在所有地方拒绝 exec/process):
{
tools: {
profile: "coding",
deny: ["group:runtime"],
},
}
示例(全局 coding 配置文件,仅消息的支持智能体):
{
tools: { profile: "coding" },
agents: {
list: [
{
id: "support",
tools: { profile: "messaging", allow: ["slack"] },
},
],
},
}
特定提供商的工具策略
使用 tools.byProvider 为特定提供商(或单个 provider/model)进一步限制工具,
而不更改你的全局默认值。
按智能体覆盖:agents.list[].tools.byProvider。
这在基础工具配置文件之后和允许/拒绝列表之前应用,
因此它只能缩小工具集。
提供商键接受 provider(例如 google-antigravity)或
provider/model(例如 openai/gpt-5.2)。
示例(保持全局 coding 配置文件,但 Google Antigravity 使用最小工具):
{
tools: {
profile: "coding",
byProvider: {
"google-antigravity": { profile: "minimal" },
},
},
}
示例(针对不稳定端点的 provider/model 特定允许列表):
{
tools: {
allow: ["group:fs", "group:runtime", "sessions_list"],
byProvider: {
"openai/gpt-5.2": { allow: ["group:fs", "sessions_list"] },
},
},
}
示例(针对单个提供商的智能体特定覆盖):
{
agents: {
list: [
{
id: "support",
tools: {
byProvider: {
"google-antigravity": { allow: ["message", "sessions_list"] },
},
},
},
],
},
}