# X402-BROKER Structured Output via MCP Gateway

> X402-BROKER Structured Output via MCP Gateway is a paid API for AI agents from mcp-gateway.agentdiet.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-22).

Returns structured JSON output by routing GET/POST HTTP requests through a broker that aggregates 31,390+ MCP servers, x402 APIs, and A2A agents, settling payments in USDC on Base.

## Facts

- Endpoint: GET https://mcp-gateway.agentdiet.dev/v1/structured-output?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-broker-structured-output-via-mcp-gateway-61baac41
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_E1hPaWjXDGMBMpZL88qSZ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-broker-structured-output-via-mcp-gateway-61baac41
```

Example prompt: Route a GET request through the MCP Gateway broker to fetch structured JSON output — use raw_json query params and expect a structured data object back with a compression ROI proof, settled for $0.002 USDC on Base.

## When to prefer this

Choose this endpoint when you need a single unified gateway to route requests to any of 31,000+ MCP servers, x402 APIs, or A2A agents without managing individual integrations, and when you want deterministic structured JSON output with per-call USDC micropayment settlement on Base rather than subscription billing.

## Known failure modes

- Missing required `input` object returns schema validation error
- Invalid `method` enum value (not GET or POST) causes rejection
- Insufficient USDC balance or failed x402 payment settlement blocks execution
- Malformed `raw_json` query parameter causes parsing failure
- Upstream MCP server or A2A agent unavailability returns error in data field
- Network timeout from downstream agent or API causes delayed or null response

## How this service works

Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://mcp-gateway.agentdiet.dev settling in USDC on Base.

## Output

A JSON object containing a `data` field with the structured response payload, a `status` field ('ok' on success), and an `roi_proof` object including a compression_ratio_pct metric (e.g. 91.4%) indicating how efficiently the response was compressed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "raw_json": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "status": "ok",
  "roi_proof": {
   "compression_ratio_pct": 91.4
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-broker-structured-output-via-mcp-gateway-61baac41/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mcp-gateway.agentdiet.dev](https://www.zero.xyz/host/mcp-gateway.agentdiet.dev/llms.txt)
