Share via

MCP server rendering wrong filter parameters to API in APIM

Pamoli Banerjee 40 Reputation points
2026-01-09T10:30:37.47+00:00

Hello ,

I have followed blog to expose SAP REST API's as MCP servers that need to be accessed via copilot studio / Microsoft new foundry : https://learn.microsoft.com/en-us/azure/api-management/export-rest-mcp-server. As of now the MCP server is exposing one tool listTasks which has several filter parameters . There is one mandatory argument projectId. When we pass only project ID , we get results:
User's image

But when we send other arguments like type , we get error : ' :
User's image

User's image

"text": "{"message":"Parameter value '58870e0c-c579-43d9-9ebb-26373ccdf3a8?type=CALMREQU' is not applicable."}"

Looks like the MCP server is wrongly passing the parameters to the SAP API . How should this be handled?

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.


Answer accepted by question author

Siddhesh Desai 7,400 Reputation points Microsoft External Staff Moderator
2026-01-09T11:41:25.4733333+00:00

Hi @Pamoli Banerjee

Thank you for reaching out to Microsoft Q&A.

We received an update from the Product Team.

The product team has confirmed the issue you are facing is a bug and they have opened a work item to fix this bug but the ETA to fix it is months, They have given a workaround that you can use to fix this as an alternative.

What's the bug:

The problem is happening because "projectId" is defined as a URL template parameter in the original Open API, as shown below:

User's image

Due to this, the projectId incorrectly gets considered a "Url Segment" rather than a query string parameter which causes the issue. We will get this issue fixed in a future update (tentative ETA: 6 months). 

Workaround:

As a workaround, customer can do the following:

  1. Add a new query string parameter to the "List tasks" operation. The parameter name should be "projectId" and it should be marked as "required". Example below: User's image
    1. Remove "?projectId={projectId}" from the Operation URL, as shown below
    User's image
    1. Save the changes After customer makes these changes, query string parameters should correctly get passed to the backend service. 

Updated answer:

The product team has confirmed the workaround works perfectly fine and here's the response from the backend team:

The problem that customer ran into is different and has got nothing to do with the workaround implementation. Customer's machine has some connectivity or other problems due to which it cannot even connect to the MCP endpoint https://resourcenamesapcloudalm.azure-api.net/sapcloudalmtasks/mcp

I just tested customer's service using MCP Proxy tool and the workaround is working perfectly fine. Parameters are now being passed correctly. See screenshot below: Request:

User's image

RESPONSE:

User's image

Please verify/investigate why your machine can't connect to the MCP endpoint. Kindly test it on a different machine and check if any connectivity issue is blocking your request.

If the resolution was helpful, kindly take a moment to click on 210246-screenshot-2021-12-10-121802.pngand click on Yes for was this answer helpful. And, if you have any further query do let us know.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.