Azure / Azure/MCP

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
Dominant language
No language data
Stars
28
Forks
75
Avg merge
9d 2h
Merged PRs (30d)
3

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?

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.