A unified Azure platform for creating and managing AI models, agents, and applications with built‑in enterprise security, monitoring, and governance
Straight up: this exact error code isn't documented anywhere publicly, so there's no official fix to point you to. But the error itself tells us what happened, and there's a practical way around it.
What the error means: when you add an MCP tool with OAuth Identity Passthrough, the Foundry portal silently provisions a custom connector inside a Connector Gateway namespace behind the scenes. The namespace (cg-1b8ab8ec...) comes from your project, and the connector name comes from your connection name, which is why it says '1b8ab8ec...-test'. Your first creation registered that connector. When you deleted and recreated the connection with the same name, the portal ran CreateOrUpdate against the leftover artifact from round one, which is registered in DirectInvoke mode, and the gateway's validation now rejects it for lacking a v3.0 API definition. Neither the invocation mode nor the API definition version is exposed anywhere in the Foundry UI, so this is not a misconfiguration on your side. It's a stale backend artifact colliding with the recreation.
What to do:
Recreate the connection with a different name (anything other than "test"). A new name produces a new connector identity in the namespace and sidesteps the stale artifact completely. Given the first creation worked fine, this should unblock you immediately.
If you need the original name back: delete the old connection everywhere it appears (Management center > Connected resources, at both the project level and the account/hub level), wait 10 to 15 minutes for the gateway to propagate the cleanup, then retry. If it still throws the same error after that, the connector artifact is orphaned server side and only Microsoft can purge it.
If the orphaned case is what you hit, reply on your thread so a moderator can escalate it, and include the full error text, the namespace ID (cg-1b8ab8ec...), your region, and the timestamp. This part of the new Foundry is preview-grade plumbing, and these gateway artifacts aren't customer-manageable, so it's a legitimate product-side cleanup request.
As an alternative path while the portal flow is stuck, the code-first route (attaching the MCP server through a toolbox with the connection defined in YAML, or via the REST/SDK flow) is documented and doesn't depend on the portal's add-tool dialog.
References:
https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/tools/model-context-protocol
https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/tools/connectors