[
https://issues.apache.org/jira/browse/CAMEL-23964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18099953#comment-18099953
]
Guillaume Nodet commented on CAMEL-23964:
-----------------------------------------
This issue is being investigated by a coding agent (Claude Code on behalf of
gnodet).
Analysis: The camel-openai component currently registers all tools from every
configured MCP server without any filtering. The proposed per-server toolNames
include list fits the existing config pattern and can be implemented in
OpenAIEndpoint (initializeMcpServers + doReconnectMcpServer), with docs and
tests.
_Note: This comment was generated by a coding agent and requires manual
verification._
> camel-openai: MCP tool filtering per endpoint
> ---------------------------------------------
>
> Key: CAMEL-23964
> URL: https://issues.apache.org/jira/browse/CAMEL-23964
> Project: Camel
> Issue Type: Improvement
> Components: camel-openai
> Affects Versions: 4.21.0
> Reporter: Federico Mariani
> Assignee: Guillaume Nodet
> Priority: Minor
> Labels: ai
>
> camel-openai currently advertises *all* tools of every configured MCP server
> to the model. There is no way to restrict the tool set, unlike
> camel-langchain4j-agent which supports an {{mcpToolProviderFilter}} predicate
> (and whose filter-coverage gap is tracked in CAMEL-23948). Reasons users need
> filtering: reduce prompt size/cost, keep destructive tools away from the
> model, work around duplicate tool names across servers.
> Proposal: a per-server include list in the existing prefix notation, e.g.
> {noformat}
> mcpServer.fs.toolNames=read_file,list_directory
> {noformat}
> (and possibly a global {{mcpToolNames}} include/exclude), applied when tools
> are listed in {{OpenAIEndpoint.initializeMcpServers}} and in
> {{reconnectMcpServer}} so both the advertised list and the dispatch map are
> filtered consistently.
> Scope note: this concerns *external MCP tools* only, which remain native to
> camel-openai; Camel-route tools are arriving separately via the unified tool
> abstraction with its own {{tags}}-based selection (CAMEL-23382 step 6), so no
> overlap.
> _This issue was drafted by Claude Code on behalf of Federico Mariani_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)