Unable to expose specific API operation as MCP tool — "MCP tool selection can't be empty" error

Open
#224 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
azure, openapi
Domain
api, cloud

Research direction

Start with the new MCP server creation flow in Azure API Management and reproduce the failure using the Swagger 2.0 API's GET operation, comparing it with the sibling DELETE and PUT operations that work. Trace the operation-to-MCP-tool validation and identify the condition that produces an empty selection; done means the GET operation can be exposed successfully or the failing constraint is documented.

Written by the indexing model from the issue text.

Description

Issue:
When creating a new MCP server in Azure API Management, a specific GET operation is listed in the available operations but cannot be selected as an MCP tool. Selecting it and clicking Create produces the validation error: "MCP tool selection can't be empty".

Observed behavior:
The operation appears in the operation selection list during MCP server creation
Selecting only this operation and attempting to create the MCP server results in the error
Other operations from the same API (including a DELETE operation on the same path) can be successfully exposed as MCP tools
The issue persists regardless of the operationId format used

Environment:
API imported via Swagger 2.0 (OpenAPI 2.0) JSON specification
The failing operation is a GET with path, query, and header parameters (no request body)
The same path has sibling DELETE and PUT operations that work fine as MCP tools
The API has ~50+ operations; many others are successfully exposed

Troubleshooting already performed:
Verified the operation has a valid operationId, description, and fully defined parameters with descriptions
Ensured path parameter names are consistent between the path template and parameter definition
Corrected parameter types and response schema property definitions
Renamed the operationId to follow the same naming convention as working operations
Re-imported the swagger into APIM

Expected behavior:
The operation should be selectable as an MCP tool, same as other GET operations with similar parameter structures (e.g., path param + optional/required query params + header params).

Question:
What validation does APIM perform on an operation when generating an MCP tool definition, and what specific conditions would cause it to silently fail with this error? Are there undocumented constraints on operation schema complexity, parameter count, or response schema size for MCP tool generation?

Dominant language
No language data
Stars
28
Forks
77
Avg merge
7d 12h
Merged PRs (30d)
7

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/MCP

All issues in Azure/MCP

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.