[ 
https://issues.apache.org/jira/browse/CAMEL-27405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on CAMEL-27405 started by Claus Ibsen.
-------------------------------------------
> camel-ai-tool - a tool with argSchema rejects undeclared arguments, as a tool 
> with parameter.* does; document CamelAiToolCallId for MCP calls
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27405
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27405
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-ai
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> A tool that declares its arguments with {{parameter.NAME}} gets a generated 
> input schema with {{additionalProperties: false}} 
> ({{AiToolParameterHelper}}), so the MCP server (the SDK validates the input) 
> refuses a call with an undeclared argument.
> A tool with {{argSchema}} uses the schema as written. JSON Schema allows 
> other properties unless the schema says otherwise, so an MCP client can send 
> undeclared arguments; {{AiToolExecutor}} then drops them with only a WARN. 
> The arguments never reach the route, but the client does not learn that it 
> sent a wrong (for example misspelled) argument.
> Expected:
> * When {{argSchema}} is an object schema that does not set 
> {{additionalProperties}}, Camel adds {{additionalProperties: false}} to the 
> schema it lists and validates, the same as for {{parameter.*}}. A schema that 
> sets {{additionalProperties}} itself is kept as written. The docs of 
> {{argSchema}} say so.
> * The docs of the {{CamelAiToolCallId}} header say that it is set when an 
> in-process producer (such as {{openai}}) calls the tool, and not for a call 
> over MCP, where the bridge has no tool call id.
> Found while adding the ai-tool-source Kamelet to the Kamelet catalog 
> (apache/camel-kamelets#3364, 2026-11-22).



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

Reply via email to