Skip to content

Add x-ai-tool information to MCP tagged operations#722

Open
nelsonkopliku wants to merge 2 commits into
mainfrom
openapi-ai-tool
Open

Add x-ai-tool information to MCP tagged operations#722
nelsonkopliku wants to merge 2 commits into
mainfrom
openapi-ai-tool

Conversation

@nelsonkopliku

@nelsonkopliku nelsonkopliku commented Jun 8, 2026

Copy link
Copy Markdown
Member

Description

This PR introduces an x-ai-tool extension entry to relevant AI related operations (MCP tagged).

The idea is to be able to drive tool name and display 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.

@nelsonkopliku nelsonkopliku self-assigned this Jun 8, 2026
@nelsonkopliku nelsonkopliku added the enhancement New feature or request label Jun 8, 2026
@nelsonkopliku nelsonkopliku added this to the 3.2 milestone Jun 8, 2026
@coveralls

coveralls commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 93.823%. remained the same — openapi-ai-tool into main

@nelsonkopliku nelsonkopliku requested a review from Copilot June 8, 2026 07:52
@nelsonkopliku nelsonkopliku marked this pull request as ready for review June 8, 2026 07:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-tool metadata (tool name + display_text) to MCP-tagged operations across v1/v2/v3 controllers.
  • Removed the MCP tag 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.

Comment thread lib/wanda_web/controllers/v2/execution_controller.ex

@arbulu89 arbulu89 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@nelsonkopliku

Copy link
Copy Markdown
Member Author

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.

whatever is meaningful and unique.

PD: You linked openAPI 3.1 extension there. The extension system is the same for 3.0 anyway. Just as nit

Thanks! Yes we are on 3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

5 participants