feat: Add dynamic MCP tool registration per page
- webmcp.ts: Add tool tracking, unregisterTool(), clearAllTools() - tools/canvasTools.ts: render_html, render_vue_component - tools/componentTools.ts: save/load/list/delete_vue_component - tools/themeTools.ts: get_design_tokens, get_active_theme, set_theme_variable, save_theme - tools/globalTools.ts: get_current_page, navigate_to, list_available_tools - toolRegistry.ts: Orchestrates tool registration per page - App.vue: Initializes WebMCP once, watches route for tool changes - Canvas.vue: Removed tool registration (now handled by registry) Tools are now registered when entering a page and unregistered when leaving. Refresh initializes tools correctly for the current page. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,10 @@
|
||||
"Bash(C:Usersjodar.bunbinbun.exe create vite . --template vue-ts)",
|
||||
"mcp__agent-ui___webmcp_get-token",
|
||||
"mcp__agent-ui___webmcp_quitar-tool",
|
||||
"mcp__agent-ui__localhost_3000-render_html"
|
||||
"mcp__agent-ui__localhost_3000-render_html",
|
||||
"mcp__agent-ui__localhost_4100-navigate_to",
|
||||
"mcp__agent-ui__localhost_4100-get_design_tokens",
|
||||
"mcp__agent-ui__localhost_4100-set_theme_variable"
|
||||
]
|
||||
},
|
||||
"enableAllProjectMcpServers": true,
|
||||
|
||||
Reference in New Issue
Block a user