Azure / Azure/azure-sdk-for-python

FastMCP + Azure Foundry: Error "ValueError" during tool call despite successful ListToolsRequest

Open
#45,104 3 comments 0 reactions 1 assignee Claimed by @lindazqli View on GitHub
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: "

Image

The transport session is established (session ID logged), yet when Foundry calls a tool, FastMCP throws a `ValueError` before reaching the tool logic.

Image

---

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.