Azure AI Foundry agent tool POST fails with tool_server_error; GET tool works

Xavier Bailliet 0 Reputation points
2026-01-29T16:49:04.06+00:00

We’re integrating Azure AI Foundry agent tools. A minimal GET tool works, but any POST tool fails before hitting our server.

What works

  • Tool: GET /api/ai-gateway/ping
  • Result: Success (pong)
  • Confirms network path from Azure to our endpoint works.

What fails

  • Tool: POST /api/ai-gateway/tool
  • Error: HTTP 500 (server_error: tool_server_error)
  • Request ID: a758f1bd-6c26-4fb8-8faa-e27ff0913780
  • UTC time: 2026‑01‑29 16:05:43
  • No server logs for the POST endpoint, so Azure fails before reaching our API.

What we tried

  • Simplified OpenAPI schema to minimal definitions
  • Removed unsupported const in schemas
  • Removed top-level security, used header params only
  • Added required headers (X-Correlation-Id, X-Organization-Context)
  • Published new agent versions
  • Confirmed gateway is reachable via GET tool

Question Why would POST tools consistently fail with tool_server_error while GET tools succeed, with no HTTP traffic reaching our server? Is there a known limitation or required schema field for POST tools in Azure AI Foundry agents?

**Minimal OpenAPI snippet (redacted server URL)**We’re integrating Azure AI Foundry agent tools. A minimal GET tool works, but any POST tool fails before hitting our server.

What works

  • Tool: GET /api/ai-gateway/ping
  • Result: Success (pong)
  • Confirms network path from Azure to our endpoint works.

What fails

  • Tool: POST /api/ai-gateway/tool
  • Error: HTTP 500 (server_error: tool_server_error)
  • Request ID: a758f1bd-6c26-4fb8-8faa-e27ff0913780
  • UTC time: 2026‑01‑29 16:05:43
  • No server logs for the POST endpoint, so Azure fails before reaching our API.

What we tried

  • Simplified OpenAPI schema to minimal definitions
  • Removed unsupported const in schemas
  • Removed top-level security, used header params only
  • Added required headers (X-Correlation-Id, X-Organization-Context)
  • Published new agent versions
  • Confirmed gateway is reachable via GET tool

Question
Why would POST tools consistently fail with tool_server_error while GET tools succeed, with no HTTP traffic reaching our server? Is there a known limitation or required schema field for POST tools in Azure AI Foundry agents?

Minimal OpenAPI snippet (redacted server URL)

{
  "openapi": "3.0.0",
  "info": { "title": "Validator Minimal", "version": "1.0.0" },
  "servers": [{ "url": "https://<redacted-host>" }],
  "paths": {
    "/api/ai-gateway/tool": {
      "post": {
        "operationId": "executeTool",
        "parameters": [
          { "name": "X-Correlation-Id", "in": "header", "required": true,
            "schema": { "type": "string", "format": "uuid" } }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["operation"],
                "properties": {
                  "operation": { "type": "string", "enum": ["validateModel"] },
                  "args": { "type": "object", "additionalProperties": true }
                }
              }
            }
          }
        },
        "responses": { "200": { "description": "OK" } }
      }
    }
  }
}
Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.