You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Omar Atie (Jira)" <ji...@apache.org> on 2026/08/06 02:56:00 UTC
[jira] [Assigned] (CAMEL-24334) camel-ai-tool - raw JSON Schema tool input (argSchema) for nested parameters
[ https://issues.apache.org/jira/browse/CAMEL-24334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Omar Atie reassigned CAMEL-24334:
---------------------------------
Assignee: Omar Atie
> camel-ai-tool - raw JSON Schema tool input (argSchema) for nested parameters
> ----------------------------------------------------------------------------
>
> Key: CAMEL-24334
> URL: https://issues.apache.org/jira/browse/CAMEL-24334
> Project: Camel
> Issue Type: Improvement
> Components: camel-ai
> Reporter: Federico Mariani
> Assignee: Omar Atie
> Priority: Major
>
> Follow-up from CAMEL-24308 (camel-mcp-server).
> The ai-tool consumer endpoint currently supports only the flat {{parameter.NAME=type}} syntax (with {{.description}}/{{.required}}/{{.enum}} refinements). Nested or complex input schemas — arrays, nested objects, oneOf — are a common need for MCP tools and cannot be expressed today.
> Proposed scope:
> * New optional {{argSchema}} endpoint option accepting a raw JSON Schema object (inline string and/or {{resource:}} reference), mutually exclusive with the flat {{parameter.*}} syntax.
> * {{AiToolParameterHelper}} keeps generating the schema for the flat syntax; with {{argSchema}} the provided schema is used as-is for {{AiToolSpec.getParametersJsonSchema()}}.
> * *Security-critical*: {{AiToolExecutor}}'s argument allowlist currently derives accepted argument names from {{parameterDefs}}. With a raw schema, the allowlist MUST be derived from the schema's top-level {{properties}} — otherwise every argument is dropped (or worse, the filter is bypassed). This is the same bug class as CAMEL-24241; the required-parameter validation needs the same treatment.
> * Engines consuming the structured {{parameters()}} map (quarkus ToolManager {{addArgument}}) need the schema-based path: quarkiverse {{ToolDefinition.setInputSchema(Object)}} covers it; the MCP Java SDK and Spring AI engines already consume the JSON Schema string directly.
> * The langchain4j-agent adapter builds native schema objects from {{ParameterDef}} — it needs a raw-schema mapping too ({{JsonObjectSchema}} from JSON).
> ----
> _This issue was drafted by Claude Code on behalf of Federico Mariani._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)