feat: add GODOT_DEVTOOL_FULL_TOOLS_LIST env var for full tools/list#7
feat: add GODOT_DEVTOOL_FULL_TOOLS_LIST env var for full tools/list#7srtan9er wants to merge 1 commit into
Conversation
When GODOT_DEVTOOL_FULL_TOOLS_LIST=true, tools/list returns all 235 tools instead of only 3 entry tools. This enables clients like VS Code Copilot that do not support dynamic tool discovery via get_capabilities. The default behavior (router mode) is unchanged. Generated entirely by AI (GitHub Copilot). Please review carefully before merging.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe tool list policy now supports router and full modes via an environment variable. Page creation selects either the full tool list or the entry-tool subset, and metadata reflects the selected mode. ChangesTool list mode changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
概述
当设置环境变量
GODOT_DEVTOOL_FULL_TOOLS_LIST=true时,tools/list返回全部 235 个工具而非仅 3 个入口工具。默认行为(Router 模式)保持不变。动机
VS Code Copilot 等 MCP 客户端不支持通过
get_capabilities动态发现工具——它们仅在初始化时读取tools/list并将其中列出的工具注册为可调用函数。这导致 godot-devtool 在 Copilot 中只能使用 3 个入口工具。修改内容
src/server/toolListPolicy.ts— 在createToolListPage()中检查process.env['GODOT_DEVTOOL_FULL_TOOLS_LIST'],为true时返回全量工具TOOL_LIST_MODE_FULL常量ENV_FULL_TOOLS_LIST常量withToolListMeta()在 full 模式下省略fullSchemaSource/fullSchemaCall使用方式
{ "mcpServers": { "godot-devtool": { "command": "node", "args": ["path/to/build/index.js"], "env": { "GODOT_PATH": "path/to/godot.exe", "GODOT_DEVTOOL_FULL_TOOLS_LIST": "true" } } } }验证
tsc --noEmit零错误npm run build成功Summary by CodeRabbit