Why OpenAI, Anthropic, Google, Mistral, xAI, DeepSeek, and MCP all converged on the same schema language — and what breaks when you try to use it across providers.


In 2023, getting an LLM to return valid JSON was a minor engineering nightmare. You padded your prompts with desperate instructions — "respond ONLY with valid JSON, no markdown, no commentary" — and then you wrote a regex extractor as backup, because the model would ignore you anyway. The OpenAI developer forums filled up with threads titled things like "GPT-3.5 JSON output format" where developers shared increasingly elaborate prompt tricks, each with its own brittle edge cases.

Today, that problem is solved. Every major LLM provider — OpenAI, Anthropic, Google Gemini, Mistral, xAI, and DeepSeek — supports structured outputs powered by a single schema language: JSON Schema. Not Protocol Buffers. Not GraphQL SDL. Not Apache Avro. JSON Schema, the standard ratified in 2009 to describe JSON documents, is now the connective tissue of the entire agentic stack. The Model Context Protocol (MCP) adopted it. OpenAPI v3.1 unified with it. Pydantic and Zod emit it. Nobody at the JSON Schema working group designed this outcome. It won by being the only mature option in the room when foundation models needed a contract language for structured outputs.

This convergence happened in fifteen months. Here's how it unfolded, what it means for production systems, and where the cracks still show.

Six Providers, One Schema Language

OpenAI shipped structured outputs in August 2024. You hand the API a JSON Schema, set strict: true, and the model's output is guaranteed to validate against it at the token level — the decoder is physically prevented from emitting tokens that would violate the schema. No more retry loops. No more regex extractors. No more begging.

Within fifteen months, every other major provider followed:

Provider Launched JSON Schema Dialect API Surface
OpenAI August 2024 Unspecified responseformat with jsonschema
xAI / Grok December 2024 2020-12 and Draft 7 responseformat with jsonschema
Mistral January 2025 Unspecified responseformat with jsonschema
DeepSeek August 2025 (Beta) Unspecified Strict-mode function calling
Google Gemini November 2025 Unspecified (OpenAPI 3.0 lineage) responsejsonschema parameter
Anthropic November 2025 2020-12 output_config.format + strict tool use

Every provider supports JSON Schema and only JSON Schema on the wire. As Ben Hutton, a JSON Schema Technical Steering Committee member, observed: "You wouldn't push your code to a server where you didn't know what version of the programming language is installed. So why is this OK for JSON Schema?"

The dialect commitment is uneven. Only xAI explicitly names which dialects they support. Most providers leave it unspecified, which means you're writing schemas against an unknown version of the language. This is the kind of thing that doesn't matter until it does — when a keyword you're using silently fails on one provider but works on another.

MCP Joins the Fold: SEP-2106

The Model Context Protocol — the emerging standard for connecting AI agents to external tools and data sources — formalized its JSON Schema commitment in May 2026 with SEP-2106, which was merged into the protocol specification.

Previously, MCP tool schemas were artificially restricted to type, properties, and required fields. This meant you couldn't use composition keywords like anyOf, oneOf, or allOf — patterns that are standard in any real API design. Worse, structuredContent was defined as { [key: string]: unknown }, which meant MCP tools couldn't return arrays. If your weather API tool naturally returned an hourly forecast as an array of objects, you were forced to wrap it in a container object just to satisfy the type constraint.

SEP-2106 lifts these restrictions:

{
  "type": "object",
  "oneOf": [
    { "properties": { "id": { "type": "string" } }, "required": ["id"] },
    { "properties": { "name": { "type": "string" } }, "required": ["name"] }
  ]
}

This pattern — accept either an ID or a name for lookup — is bog-standard API design. Before SEP-2106, it was literally impossible to express in an MCP tool schema.

The significance of SEP-2106 goes beyond MCP itself. It's the first time a major AI protocol has explicitly committed to JSON Schema 2020-12 as the dialect of record. If MCP settles on 2020-12, it creates gravitational pressure on providers to document and support that same dialect for structured outputs — otherwise schemas that work in your MCP tool definitions won't work when you pass them to the model API, and vice versa.

The Four Output Shapes: A Cost Tradeoff Guide

One of the most important practical developments of June 2026 is the emergence of detailed production guides on the cost tradeoffs between the four ways to get structured data out of an LLM. Multiple guides — from Ssimplifi's Prism, from Effloow, from TokenMix, and others — converge on the same framework.

Shape 1: Raw Text Generation

The model returns free-form text. Your code parses it with regex, manual JSON extraction, or prayer. Works on every model. Costs nothing extra per call. But production cost ends up higher than structured outputs for any workload with a downstream consumer that expects structure, because you pay for retry-on-parse-failure loops and defensive parsing in your application code.

Shape 2: JSON Mode (responseformat: jsonobject)

The model returns syntactically valid JSON. No schema enforcement — the keys and values can be whatever the model decides. If you ask for an invoice and the model gives you a recipe for soup, JSON mode happily returns valid JSON describing soup. This is the lowest tier and the one most likely to hurt you, because it looks like it's doing something useful.

As one developer recounted: "A user reported that our invoice extractor was occasionally swapping the buyer and seller fields. Maybe one in two hundred invoices, always on the ones that mattered. The model was returning valid JSON. The schema validation passed. The fields were just wrong. I had been using JSON mode, which guarantees valid JSON syntax but does not constrain the keys or the values."

Shape 3: Function Calling (tools + tool_choice)

The model returns a function call with arguments matching a schema you supply. Originally designed for tool use but commonly repurposed for "extract this data" workloads. Moderate token savings (~30-40% vs raw text). High reliability on most models. Adds a layer of indirection — you parse tool_calls[0].function.arguments instead of the message content.

Shape 4: Structured Outputs (responseformat: jsonschema)

The model returns JSON matching a schema you supply, enforced at decode time. The model literally cannot produce output that violates the schema. Largest token savings (~40-50% vs raw text). Highest reliability. Implementation is more verbose — you must define the JSON Schema with additionalProperties: false and other strict constraints.

The Token Economics

The first-order benefit of structured outputs isn't reliability — it's token economics. Structured outputs typically produce 30-50% less verbose responses than free-form generation on the same task, because the model isn't padding with explanatory prose around the answer.

Consider extracting an order summary from a customer message:

Raw text response (~75 output tokens):

Looking at the message, the order details are as follows:
- Order ID: 4477
- Customer: Jane Smith
- Total: $147.50
- Items: 3
- Shipping address: 742 Evergreen Terrace, Springfield OR
The order was placed on March 14, 2026.

Structured output response (~45 output tokens):

{"order_id": "4477", "customer": "Jane Smith", "total_usd": 147.50, "items": 3, "shipping_address": "742 Evergreen Terrace, Springfield OR", "placed_date": "2026-03-14"}

That's a 40% reduction in output tokens. Output tokens cost 4-5x input tokens on most providers. For a workload extracting structured data from 100K messages per day, that translates to roughly $30/day, ~$900/month in savings on a single feature.

The honest cost ranking from lowest total cost to highest, assuming a workload that needs structured output:

  1. Structured outputs — cheapest total cost despite per-call overhead, because no retries, no defensive parsing, fewer output tokens
  2. Function calling — slightly more expensive due to indirection overhead and occasional malformed calls
  3. JSON mode — seems cheap but fails silently on schema drift; production cost is higher than it looks
  4. Raw text — cheapest per call but most expensive in failure modes

The Schema Portability Problem

While every provider accepts JSON Schema, the experience of writing a schema that works across all of them is still painful. The dialect is different. The supported keyword subset is different. The failure modes are different.

OpenAI supports recursive schemas but rejects allOf. Anthropic does the opposite. Google Gemini has an OpenAPI 3.0 lineage that shows through in edge cases. DeepSeek's strict mode is only accessible through function calling, not through a direct response_format parameter. Mistral doesn't document which dialect they support.

The meme has evolved. Yesterday's pain was begging for valid JSON responses. Today, we beg that a valid JSON Schema is actually accepted by every provider.

This has spawned a new class of tooling. Projects like schema-gateway act as a portability compiler — you write your schema once, and it translates provider-specific quirks (adding or removing keywords, adjusting nesting depth limits, handling additionalProperties differences) so the same schema works across OpenAI, Gemini, Anthropic, and Ollama.

Code: Write Once, Generate Everywhere

The practical pattern that most production teams have settled on: write your types in Pydantic or Zod, generate JSON Schema from those, and feed the generated schema to whichever AI provider you're using.

Pydantic → JSON Schema:

from pydantic import BaseModel
from typing import Optional, List
from enum import Enum

class Priority(str, Enum):
    low = "low"
    medium = "medium"
    high = "high"

class Ticket(BaseModel):
    id: str
    subject: str
    priority: Priority
    assignee: Optional[str] = None
    tags: List[str] = []

# Generate JSON Schema — this is what you pass to the LLM API
schema = Ticket.model_json_schema()

Zod → JSON Schema:

import { z } from "zod";
import { zodToJsonSchema } from "zod-to-json-schema";

const TicketSchema = z.object({
  id: z.string(),
  subject: z.string(),
  priority: z.enum(["low", "medium", "high"]),
  assignee: z.string().optional(),
  tags: z.array(z.string()).default([]),
});

const jsonSchema = zodToJsonSchema(TicketSchema);

Using the generated schema with OpenAI:

from openai import OpenAI

client = OpenAI()

response = client.chat.completions.create(
    model="gpt-4o-2025-04-14",
    messages=[{"role": "user", "content": "Extract a support ticket from: ..."}],
    response_format={
        "type": "json_schema",
        "json_schema": {
            "name": "ticket",
            "strict": True,
            "schema": schema,  # from Pydantic above
        }
    }
)

Using the same schema with Anthropic:

from anthropic import Anthropic

client = Anthropic()

response = client.messages.create(
    model="claude-opus-4-7-20250610",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Extract a support ticket from: ..."}],
    tools=[{
        "name": "extract_ticket",
        "input_schema": schema,  # same schema
    }],
    tool_choice={"type": "tool", "name": "extract_ticket"},
)

Using the same schema with Google Gemini:

import google.generativeai as genai

client = genai.GenerativeModel("gemini-2.5-pro")
response = client.generate_content(
    "Extract a support ticket from: ...",
    generation_config=genai.GenerationConfig(
        response_mime_type="application/json",
        response_schema=schema,  # same schema
    )
)

The schema is the lingua franca. The type system is the source of truth. The same schema in the same shape passes through multiple layers — tool definition, model constraint, runtime validation, downstream API contract. When this works, the whole pipeline is type-safe end-to-end.

MCP Schema Bloat: The Hidden Token Tax

JSON Schema convergence created an unexpected cost problem in MCP servers. An MCP server's tools/list output is the API the model reads to decide what to call. It is also the API the model reads every turn. A schema that takes 40,000 tokens to describe is a schema that costs you 40,000 tokens every turn — and at that size, it degrades the model's ability to reason about which tool to use.

This "schema tax" has become a significant production concern. Multiple guides published in June 2026 — from yaw.sh, from Layered, from Luminary Lane — document the same pattern: MCP tool descriptions are eating context windows. The fix isn't to use less JSON Schema; it's to use less schema. Lazy schema loading (only send full schemas when a tool is selected) and dynamic tool gating (only expose tools relevant to the current task) are emerging as the standard patterns.

As the Luminary Lane team described: "We ripped out our entire integration layer 48 hours before our first live demos. Not because it was broken. It worked perfectly in development. It worked perfectly right up until we put it inside an agent and the schema bloat ate half the context window."

What's Settled, What's Still Moving

Settled: JSON Schema is the schema language of the AI stack. No competitor is even on the horizon. Every provider, every protocol, and every major framework has committed. The convergence is done.

Settled: Strict mode (schema-constrained decoding) has replaced JSON mode as the production default. The reliability guarantees are too strong to ignore, and the token economics are a first-order benefit, not a second-order one.

Settled: Pydantic and Zod are the source-of-truth type systems, with JSON Schema as the generated output. Nobody writes raw JSON Schema by hand in production unless they have to.

Moving: Dialect convergence. SEP-2106's commitment to JSON Schema 2020-12 in MCP creates pressure for providers to document and support the same dialect. But today, most providers don't specify which dialect they support, and the keyword subsets diverge in ways that only show up in production.

Moving: Schema portability. The gap between "all providers accept JSON Schema" and "the same JSON Schema works on all providers" is where most of the current pain lives. Expect the portability compiler tools (like schema-gateway) to mature quickly, or for providers to converge on a common subset.

Moving: The cost models. Structured outputs save tokens on the response side, but schema-constrained decoding has its own compute overhead. As providers experiment with pricing for strict vs. non-strict modes, the tradeoff matrix keeps shifting. The June 2026 guides are the first systematic attempts to quantify this; expect more data.

The Accidental Standard

The most consequential standard of the AI era is one nobody designed for AI. JSON Schema was ratified in 2009 as a way to describe JSON documents for web APIs. OpenAPI built on it. REST APIs adopted it. When OpenAI needed a contract language for the JSON-output problem in 2024, they naturally reached for the one API engineers already used. Every subsequent provider followed, because the alternative was inventing a new schema language that nobody's tooling supported — and that nobody would adopt.

The standard won by default. But default convergence is still convergence. Fifteen months after the first structured-outputs launch, the AI stack has a single schema language for the first time. The lingua franca works. The remaining work is making sure every speaker actually speaks the same dialect.


Published June 11, 2026. Sources: sourcemeta.com, prateek-sharma.com, ssimplifi.com, modelcontextprotocol.org (SEP-2106), dev.to, effloow.com, tokenmix.ai, carrick.tools, yaw.sh, layered.dev.