Federico Mariani created CAMEL-27564:
----------------------------------------

             Summary: camel-mcp-server - an ai-tool whose schema is not a valid 
JSON Schema fails the startup, is hidden or is served, depending on the 
protocol era
                 Key: CAMEL-27564
                 URL: https://issues.apache.org/jira/browse/CAMEL-27564
             Project: Camel
          Issue Type: Bug
          Components: camel-mcp-server
            Reporter: Federico Mariani
            Assignee: Federico Mariani
             Fix For: 4.24.0


An {{ai-tool}} route whose input schema ({{argSchema}}) or output schema is a 
JSON object but not a valid JSON Schema 2020-12 document, for example {{"type": 
"strng"}}, is handled differently depending on the protocol era and the start 
order:

* a route started before the MCP server fails the start of the CamelContext;
* a route started later is left out with a generic WARN from the tool registry, 
in the {{legacy}} and {{dual}} protocol eras and on the stdio transport;
* the {{modern}} protocol era (MCP 2026-07-28) serves it without any check.

The MCP Java SDK 2.2.0 checks both schemas when a tool is added to a server of 
the legacy era and throws an {{IllegalArgumentException}}, which the engine 
does not turn into a refusal. The catalog of protocol version 2026-07-28 does 
not check them.

Expected: the tool is refused with {{McpServerRefusedException}} in every 
protocol era and on stdio (input schema only, as stdio does not publish output 
schemas). An ERROR names the tool, its route keeps running and the other tools 
are served.

Fixed in https://github.com/apache/camel/pull/30801, with an entry in the 4.24 
upgrade guide.

_Claude Code on behalf of Federico Mariani_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to