Add x-ai-tool information to MCP tagged operations#722
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances Wanda’s OpenAPI specs for AI/MCP integration by adding an x-ai-tool specification extension to MCP-tagged operations, enabling downstream consumers to derive a stable tool name and user-facing display text. It also removes the MCP tag from deprecated endpoints to reduce ambiguity and discourage AI agents from using deprecated API versions.
Changes:
- Added
x-ai-toolmetadata (toolname+display_text) to MCP-tagged operations across v1/v2/v3 controllers. - Removed the
MCPtag from deprecated v1/v2 endpoints so only current endpoints are exposed as MCP tools.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/wanda_web/controllers/v3/catalog_controller.ex | Adds x-ai-tool metadata to the v3 checks catalog MCP operation. |
| lib/wanda_web/controllers/v2/execution_controller.ex | Adds x-ai-tool metadata to v2 executions MCP operations (list/show/last). |
| lib/wanda_web/controllers/v2/catalog_controller.ex | Removes MCP tag from deprecated v2 catalog operation. |
| lib/wanda_web/controllers/v1/operation_controller.ex | Adds x-ai-tool metadata to v1 operations MCP operations (list/show). |
| lib/wanda_web/controllers/v1/execution_controller.ex | Removes MCP tag from deprecated v1 execution operations. |
| lib/wanda_web/controllers/v1/catalog_controller.ex | Removes MCP tag from deprecated v1 catalog operation; adds x-ai-tool to selectable checks MCP operation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
arbulu89
left a comment
There was a problem hiding this comment.
Looks good to me!
One question. Did you follow certain pattern to set the name values? Or is it just a "meaningful" name?
Just asking to know what the expect.
PD:
You linked openAPI 3.1 extension there.
The extension system is the same for 3.0 anyway.
Just as nit
whatever is meaningful and unique.
Thanks! Yes we are on 3.0. |
Description
This PR introduces an
x-ai-toolextension entry to relevant AI related operations (MCP tagged).The idea is to be able to drive
tool nameanddisplay text- and possibly more in the future - as we do in trento-project/web#4330 so that we can better control AI integration.As an extra I also untagged deprecated endpoints from being MCP. I couldn't find solid reasons to keep deprecated endpoint at use of AI agents.
AI feature-set is quite new and access to latest operations should be enough. Additionally it might mitigate the risk of hallucinations of LLMs as there would not be ambiguity.
Let me know what you think.
How was this tested?
No specific tests needed here.