davsclaus opened a new pull request, #30933:
URL: https://github.com/apache/camel/pull/30933

   # Description
   
   Part of [CAMEL-23832](https://issues.apache.org/jira/browse/CAMEL-23832). 
The umbrella ticket stays open.
   
   ## Summary
   
   Rewrites the component description and 6 option texts of `ai-prompt` (11 
texts in the component JSON, as 5 options are
   shared by the component and the endpoint). The component has no headers.
   
   The old texts were short and left out what the code does: where MCP clients 
see the name, description and title
   (`prompts/list`, `prompts/get`), that the prompt name must not contain a 
slash and that a duplicate name under a shared
   tag makes the route fail to start, that the description falls back to the 
prompt name also when blank, how arguments
   reach the route (String headers, undeclared ones ignored, a missing required 
one rejected before the route runs), and
   that argument names starting with `camel` or `org.apache.camel.` are 
refused. The component `configuration` option said
   only "The component configuration". The component description now starts 
with a verb.
   
   Sources: the Camel code of `camel-ai-prompt` (`AiPromptComponent`, 
`AiPromptConsumer`, `AiPromptExecutor`,
   `AiPromptRegistry`) and the `McpServerBridge` of `camel-mcp-server-api`, 
which publishes the prompts.
   
   ### Found, not changed
   
   - When an endpoint URI has `argument.*` options, they replace the whole 
`arguments` map of the component configuration
     instead of being merged with it (`AiPromptComponent.createEndpoint`). 
Arguments set on the component are thus used
     only by endpoints without `argument.*` options.
   - Two prompts with the same name under different tags both start, but the 
MCP server exposes only the first one and
     logs an error for the other one (MCP prompt names are flat).
   
   ## Tests
   
   - There is no new test, as only description text changes.
   - A script compared the component JSON with the parent commit: only 
`description` fields changed (11 texts).
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I ran the formatter and built the module, then regenerated the catalog 
copy, `dsl/camel-endpointdsl` and `dsl/camel-componentdsl`, and committed all 
generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to