<!-- 来源: https://hostanagent.com/docs/mcp/tools/ | 协议: 1.0 | 更新: 2026-09-30 -->

# 22 个配置工具参考

生产 MCP 0.1.2 提供以下 22 个工具。它们在用户授权的账号范围内执行；具体输入 JSON Schema 和可选字段以客户端连接后的 `tools/list` 为准。列表中的名称是准确工具名，不能把相似的 REST 路径当作 MCP 工具。

| 工具 | 作用 | 权限 |
|---|---|---|
| `list_agents` | 按 offset/limit 与可选状态分页读取摘要 | read |
| `get_agent` | 读取 Agent 草稿、当前版本和 revision | read |
| `create_agent` | 创建草稿；`publish=true` 时校验并发布 | write |
| `update_agent` | 以 `expected_revision` 局部修改或发布 | write |
| `list_agent_versions` | 按游标读取有界版本历史 | read |
| `get_agent_version` | 读取指定不可变版本 | read |
| `compare_agent_versions` | 比较两个版本配置与工具定义 | read |
| `copy_agent` | 复制为独立 Agent 草稿 | write |
| `rollback_agent` | 从历史版本重新校验，发布新版本 | write |
| `set_agent_state` | 设为 active、paused 或 archived | write |
| `request_agent_deletion` | 申请或撤回删除，保持归档 | write |
| `get_agent_references` | 读取配置、会话、Run 与工具引用及删除申请状态 | read |
| `list_toolsets` | 分页列出逻辑工具集 | read |
| `get_toolset` | 读取最新或指定工具集版本与引用 | read |
| `create_toolset` | 创建工具集定义 | write |
| `update_toolset` | 基于 `base_version` 产生新版本 | write |
| `set_agent_toolset` | 关联固定工具集版本或清空引用 | write |
| `list_executor_bindings` | 读取 browser/desktop/backend 执行绑定 | read |
| `create_executor_binding` | 登记执行位置，不部署业务代码 | write |
| `list_models` | 查看当前开放模型与支持的思考档位 | read |
| `get_model_pricing` | 查询销售价格与保守预留参考 | read |
| `validate_configuration` | 验证结构、引用、模型能力和价格 | read |

`read` 表示需要 `configuration:read`；`write` 还需要 `configuration:write`。服务端会再次检查真实授权范围，不能用工具注释代替授权。

## 写入与冲突

所有写工具使用稳定 `request_id`。相同账号、操作、请求号及正文的重试返回原结果；同号换正文会产生幂等冲突。更新 Agent 先读 `revision` 并提交 `expected_revision`；工具集更新提交最新 `base_version`。若出现 `REVISION_CONFLICT`，重新读取并核对他人修改，改动实际内容后使用新请求号。

`validate_configuration.valid` 表示结构和引用有效，`ready` 才表示可发布；`ready=true` 仍不说明账号有余额。工具集新版本不会自动传播到 Agent。`request_agent_deletion` 目前只登记/撤回申请，不进行物理清理。MCP 不存在 `publish_agent` 或 `run_agent` 工具；发布通过 `create_agent`、`update_agent` 或相关更新的 `publish=true` 完成。[配置配方](/docs/mcp/recipes/)。
