Forum Discussion
Foundry Toolbox preview not working for hosted agent
The 404 points to deployment/project resolution rather than a Web Search permission failure. The portal agent working does not prove the hosted runtime is using the same project endpoint.
I’d check these in order:
1. Redeploy the hosted agent on the refreshed public preview; older hosted-agent deployments were not migrated automatically.
2. Make sure the agent uses the project endpoint (https://<account>.services.ai.azure.com/api/projects/<project>) and that the toolbox, default toolbox version, and model deployment all belong to that same project/resource.
3. Grant the Foundry User role to the hosted agent’s managed identity, not only the project identity, and confirm the selected region/model supports both tools.
4. Keep the Foundry-Features: Toolboxes=V1Preview header on every toolbox MCP request.
For isolation, scaffold the current hosted-agent toolbox sample and test one web_search tool, without wrapping the toolbox as another custom MCP server. If that still returns 404, capture the request ID, project endpoint, deployment name, toolbox/version, and agent ID for an Azure support case.