davsclaus opened a new pull request, #30037: URL: https://github.com/apache/camel/pull/30037
JIRA: [CAMEL-26932](https://issues.apache.org/jira/browse/CAMEL-26932), item 10 (first bullet: answers name tools the server does not have). The tools the MCP server shares with `camel ask` (`ToolRegistry`, `ToolContext`, `IntegrationLauncher`) answer with the tool names of `camel ask`: - "No running Camel process matches 'x'; list_processes shows what runs"; - "Example not found: x. Use list_examples to see the examples."; - "No process selected. Use select_process to connect to one."; - "camel run is still starting …; list_processes shows it once it is up". The MCP server has none of these tools, so a client that follows the hint calls a tool that does not exist. `McpToolNames` replaces the names at the three points where the MCP server calls the shared tools (`AuthoringTools.call`, `RuntimeTools.delegateToRegistry`, `AiTraceTools.executeRegistryTool`), in both the answer and the error: | camel ask | MCP server | |---|---| | `list_processes` | `camel_runtime_processes` | | `list_examples` | `camel_catalog_examples` | | `get_example_file` | `camel_catalog_example_file` | | "Use select_process to connect to one." | "Pass nameOrPid to the tool to pick one." | Only whole names are replaced. `camel ask` keeps its own names, as the shared code is unchanged. Tests: `McpToolNamesTest`. It includes `anUnknownExampleNamesTheExampleToolOfTheServer`, which goes through `AuthoringTools.call` and fails on main. The MCP tests are green (471, run through the reactor with camel-jbang-core). Not in this PR: the TUI has no tool that lists the processes, so the same hints there need other wording. _Claude Code on behalf of davsclaus_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
