[
https://issues.apache.org/jira/browse/CAMEL-26102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-26102:
--------------------------------
Fix Version/s: 4.24.0
> camel-mcp-server-api: let an McpServerEngine refuse a tool or resource
> without the bridge tracking it as published
> ------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26102
> URL: https://issues.apache.org/jira/browse/CAMEL-26102
> Project: Camel
> Issue Type: Improvement
> Components: camel-mcp-server
> Reporter: Jiri Ondrusek
> Assignee: Jiri Ondrusek
> Priority: Minor
> Fix For: 4.24.0
>
>
> {{McpServerBridge.publish}} / {{publishResource}} store the spec in
> {{published}} / {{publishedResources}} before calling the void
> {{McpServerEngine.toolAdded}} / {{resourceAdded}}
> (McpServerBridge.java:238-239, 286-287 in 4.23.0). So the engine can't report
> that it refused a registration.
> An engine backed by a runtime MCP server can refuse one: quarkus-mcp-server
> requires unique tool and resource names, and application tools or resources
> may already use the same name or uri.
> The bridge still tracks the refused spec as published. A later route with the
> same name or uri is then refused as a clash, although nothing serves it.
> Removing that route (McpServerBridge.java:255-256, 303-304) also calls
> {{toolRemoved}} / {{resourceRemoved}} for something the engine never added.
> Proposal (either):
> # Let {{toolAdded}} / {{resourceAdded}} report acceptance (boolean, or a
> documented exception), and track only accepted specs.
> # Enforce tool/resource name uniqueness in the bridge itself.
> Context:
> https://github.com/apache/camel-quarkus/pull/9368#discussion_r4334785549
> _Generated with [Claude Code|https://claude.com/claude-code] on behalf of
> [~jondruse]_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)