Azure / Azure/azure-sdk-for-python
FastMCP + Azure Foundry: Error "ValueError" during tool call despite successful ListToolsRequest
Open
AI Projects
bug
customer-reported
needs-team-attention
Service Attention
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
### Description
I’m building an MCP (Model Context Protocol) server using **fastmcp** and exposing it over SSE/HTTP for use with **Azure AI Foundry agents**.
The MCP handshake and tool discovery work (ListToolsRequest succeeds), but every tool invocation fails with a `ValueError`.
Error: "content_type='system_error' name='ValueError' text="Encountered exception: "
The transport session is established (session ID logged), yet when Foundry calls a tool, FastMCP throws a `ValueError` before reaching the tool logic.
---
Contributor guide
Assessment
This issue has not been assessed yet.