SuperAPI AI 工具集

tool-sync

办公与效率

查看项目

更新于 10-16 09:44

技能介绍

用途:当 MCP 工具被新增、移除或重新命名时,自动同步相关文档,确保 instructions、skills、README 中的工具数量与列表始终与代码一致。

触发条件:新增 register_*_tools() 函数或 @mcp.tool() 装饰器;修改 tool_registry.py 的 TOOL_CATEGORIES;修改 tools/init.py 的 register_all_tools();删除或重命名任何 MCP 工具;用户明确要求“同步工具”/“tool sync”。

自动同步的 6 个文档:tool_registry.py 的 TOOL_CATEGORIES、tools/init.py 的 register_all_tools() 需手动修改;instructions.py 的工具列表、.github/copilot-instructions.md 的 Tool Categories 表格、.claude/skills/pubmed-mcp-tools-reference/SKILL.md、README.md 与 README.zh-TW.md 的工具数量 badge 由 --update-docs 自动更新。

使用方式:先手动修改源头文件 tool_registry.py 与 tools/init.py,再执行 uv run python scripts/count_mcp_tools.py --update-docs;随后可用 uv run python scripts/count_mcp_tools.py 检查工具数量,用 uv run python scripts/count_mcp_tools.py --verbose 验证 TOOL_CATEGORIES 与 FastMCP runtime 是否同步。

限制与注意:任何工具变更后都必须执行 count_mcp_tools.py --update-docs;验证必须通过;instructions.py 只更新工具列表区块,手写搜索策略等内容不会被覆盖;pubmed-mcp-tools-reference SKILL 会完全重新生成;CHANGELOG 更新由 changelog-updater skill 另行处理;与 git-precommit、git-doc-updater、ddd-architect 等 Skill 存在协作关系。