oc_agents
List available local OpenClaw agents, including names, aliases, default status, and execution risk, so you can confirm valid agent identifiers before dispatching tasks.
Instructions
列出本机 OpenClaw 可用的 agent:id、名字、别名、是否默认、execRisk(allow=可落地动作,deny=只读或纯回复)。agent 名单来自本机的 config.json,每台机器都不同——用户提到某个名字、或你不确定能点名谁时,先调本工具确认,不要凭猜测点名。返回的 name 或 aliases 可以直接当作其他工具的 agent 参数。结果缓存 60 秒,refresh=true 强制刷新。Gateway 不在时返回 GATEWAY_UNAVAILABLE。语音场景只报名字和默认 agent,不要把 JSON 读出来。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "oc_agents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| refresh | No | 强制刷新缓存,重新从 Gateway 获取 agent 列表。 |