Anteriormente conocido como servicios de Azure AI o Azure Cognitive Services es una colección unificada de funcionalidades de IA precompiladas dentro de la plataforma Microsoft Foundry.
Hi Salazar Lerma, Jaime Andres,
This looks like a common issue when using Azure AI Foundry agents with MCP remote tools. I’ll explain it in a simple way and share some practical things you can check.
What is happening here
When an agent calls an MCP remote tool, the flow looks like this:
- Agent runs your prompt
- Agent connects to MCP endpoint
- MCP tool executes and returns response
If execution fails, it usually means something in this chain is not working properly, such as connection, configuration, or response format.
Common causes and what to check
- MCP endpoint accessibility
Make sure your MCP server is reachable from the agent environment
Check:
- endpoint URL is correct
- no network restrictions or firewall blocks
- service is actually running
If the agent cannot reach the endpoint, execution will fail before any tool logic runs
- Authentication or permissions
If MCP requires authentication:
- verify API keys or tokens are valid
- check if headers or credentials are correctly passed
- confirm the agent has permission to call the endpoint
Authentication issues often cause silent failures or generic errors
- Tool configuration in Foundry
Sometimes the issue comes from how the tool is configured
Check:
- tool name matches exactly
- correct schema or parameters are defined
- input format matches what MCP expects
If the schema and actual payload do not match, the agent may fail to execute the tool
- Request and response format
MCP tools usually expect structured input and output
Check:
- request format is valid JSON
- response structure is correct and complete
- no missing fields or invalid types
If the response is not in expected format, agent execution can fail
- Timeout or latency issues
If the MCP endpoint takes too long:
- agent may timeout
- execution will fail even if the tool works eventually
Try:
- reducing processing time
- checking logs for long-running operations
- Logs and diagnostics
This is very helpful for identifying root cause
- check agent execution logs in Foundry
- check MCP server logs
- compare request and response
Logs usually show if the failure happened:
- before calling the tool
- during execution
- or while parsing the response
Practical troubleshooting approach
You can follow this simple flow:
- Test MCP endpoint separately using REST tool or curl
- Verify request and response format
- Check authentication and headers
- Review agent logs for exact failure point
- Validate tool configuration in Foundry
Useful documentation
You can refer to:
These explain how agents interact with external tools and how to configure them correctly.
Simple summary
- Agent failure usually means MCP tool is not reachable or not configured correctly
- Most issues are related to endpoint, authentication, or response format
- Start by testing the MCP endpoint separately and then validate integration step by step
Hope this helps you narrow down the issue. Do let me know if you have any further queries.
If you share the exact error message, it will be easier to guide more precisely.
Thankyou!