Package Versions
azure-ai-agentserver-core: 1.0.0b17
azure-ai-agentserver-langgraph: 1.0.0b17
azure-ai-projects: 2.0.0b3
- Python:
<3.10/3.11/3.12>
- OS:
Windows
Description
When using azure-ai-agentserver-langgraph with Foundry connected MCP tools ({"type":"mcp","project_connection_id":"..."}), tool resolution/invocation fails because the connected-tools proxy route returns 404.
The SDK appears to call:
POST /api/projects/{project}/agents/{agent}/tools/resolve?api-version=2025-11-15-preview
POST /api/projects/{project}/agents/{agent}/tools/invoke?api-version=2025-11-15-preview
These return 404 in hosted-agent scenarios.
Repro Steps
- Create a hosted LangGraph agent with
use_foundry_tools(...).
- Include at least one connected MCP tool:
{"type":"mcp","project_connection_id":"<connection-name>"}
- Invoke the agent through project Responses API.
- Observe failure during connected tool resolution or invocation.
Minimal Agent Snippet
from azure.ai.agentserver.langgraph import from_langgraph
from azure.ai.agentserver.langgraph.tools import use_foundry_tools
foundry_tools = [
{"type": "code_interpreter"},
{"type": "mcp", "project_connection_id": "<connection-name>"},
]
# middleware=[use_foundry_tools(foundry_tools)]
# invoke agent via project Responses API
Actual Result
- Connected MCP resolve/invoke path returns 404.
- Agent run fails when trying to use connected MCP tools.
Example symptom (sanitized):
- ResourceNotFoundError / HTTP 404 from connected tools route.
- Route shape: /agents/{agent}/tools/resolve and /agents/{agent}/tools/invoke.
Expected Result
Connected MCP tools should resolve and invoke successfully via SDK without requiring custom monkey patching.
Why this appears to be SDK route/contract issue
- In 1.0.0b17, FoundryConnectedToolsOperations uses /agents/{agent}/tools/resolve|invoke with api-version=2025-11-15-preview.
- Project connections are valid and retrievable via AIProjectClient.connections.get/list.
- Direct MCP JSON-RPC calls to connection targets (tools/list, tools/call) succeed.
- Failure is isolated to connected-tools proxy route behavior.
Temporary Workaround
Implemented runtime monkey patch in app code:
- Catch 404 from connected-tools resolve/invoke.
- Fallback to direct MCP JSON-RPC (tools/list, tools/call) using connection metadata and auth scope.
- This works, but should not be required in user code.
Impact
- Hosted-agent architectures relying on connected MCP tools cannot use default SDK behavior reliably.
- Forces custom patching and increases operational complexity.
Requested Fix
- Provide a supported fix in azure-ai-agentserver-core so connected MCP tools work without monkey patches.
- If route contract changed, document required endpoint/version and update SDK accordingly.
- Consider built-in fallback or clearer actionable error when route is unavailable.
Package Versions
azure-ai-agentserver-core:1.0.0b17azure-ai-agentserver-langgraph:1.0.0b17azure-ai-projects:2.0.0b3<3.10/3.11/3.12>WindowsDescription
When using
azure-ai-agentserver-langgraphwith Foundry connected MCP tools ({"type":"mcp","project_connection_id":"..."}), tool resolution/invocation fails because the connected-tools proxy route returns404.The SDK appears to call:
POST /api/projects/{project}/agents/{agent}/tools/resolve?api-version=2025-11-15-previewPOST /api/projects/{project}/agents/{agent}/tools/invoke?api-version=2025-11-15-previewThese return
404in hosted-agent scenarios.Repro Steps
use_foundry_tools(...).{"type":"mcp","project_connection_id":"<connection-name>"}Minimal Agent Snippet
Actual Result
Example symptom (sanitized):
Expected Result
Connected MCP tools should resolve and invoke successfully via SDK without requiring custom monkey patching.
Why this appears to be SDK route/contract issue
Temporary Workaround
Implemented runtime monkey patch in app code:
Impact
Requested Fix