Blog / Tool results and errors

structuredContent or text? Which half of your MCP result the model actually sees

The MCP spec lets a tool return its result twice: once as text and once as structuredContent, and recommends sending both for compatibility. So many servers do. But the model doesn't get both. Each agent app picks a half, and they don't pick the same one.

Leonid Bugaev · Published 21 Oct 2026

The two-marker test

To see which half reaches the model, you need the halves to differ. Our test server has one tool. Its text content carries the marker TXT-7Q4; its structuredContent carries STR-9Z2. We ask each app to call the tool once and report every marker it can see, without guessing. Then we check the app's transcript for what it passed on.

{"content": [{"type": "text", "text": "TEXT_PART: marker TXT-7Q4"}],
 "structuredContent": {"part": "STRUCTURED_PART", "marker": "STR-9Z2"}}

A model can't report a marker it never saw, so this is a clean read on what each app does with a dual result.

What each app passed to the model

Two-marker test, 21 Oct 2026 (2 runs per app)
AppText markerStructured markerWhat the transcript holds
Claude Code 2.1.3040/22/2Structured JSON only
Codex 0.161.02/22/2Both halves
OpenCode 1.18.342/20/2Text only
Server sends text + structured→Claude Code: structured/Codex: both/OpenCode: text

We ran the same test on 16 October with Claude Code 2.1.301 and OpenCode 1.18.34 and got the same result for both. It matches public reports: Claude Code users have noticed text being hidden when structured content is present (#9962, #45575), and Codex made structuredContent the preferred function output (PR #2594), with users reporting dropped content blocks (#10334). In our runs Codex's model still saw both, because in code mode it gets the whole result object.

The practical consequence: if your text says something the structured half doesn't, such as “call get_item next” or “results are truncated, use offset”, Claude Code's model never reads it. If your structured half has fields the text lacks, OpenCode's model never sees them.

Find out what the model really sees from your tools.

We run your users' jobs through Claude Code, Codex and the other apps they use, capture what each one passes to the model, and show where your results are dropped, duplicated or cut.

Test your MCP

What duplication costs

On the wire, sending both halves sends the data twice. We measured a 99-tool production server where 27 of 34 read tools did exactly that, with no outputSchema on any tool:

Activity feed, text half
21,547
Activity feed, structured half
18,039
Item list, text half
25,806
Item list, structured half
20,550

Because each app picks one half, most runs don't pay double in the model's context. But the client still receives both, and Codex can pay for both: when its model printed a raw result in code mode, both halves were serialized, “original token count: 67,251”, and the output was truncated. Large results have their own limits per app; see MCP output limits by agent.

What to send instead

  1. Full data in structuredContent, with an outputSchema so clients know its shape.
  2. A short text summary: what was returned, how many, whether there's more, and the next useful call. Not the same data serialized again.
  3. Put anything the model must read in both, briefly. A “truncated, use offset=10” note belongs in the structured half too, for Claude Code.
  4. Test it with markers in your own server, per app, after each client update. Behaviour has changed between versions before.
{"content": [{"type": "text", "text": "12 tasks blocked in Mobile app (showing 10). Next: offset=10."}],
 "structuredContent": {"items": [...], "total": 12, "next_offset": 10}}

Small, summarised results helped every model in our tests: see should your MCP server look different to each model? For the wider question of which MCP channels agents use, see MCP prompts, resources and tools.

Go deeper: Tool results for AI agents, Pagination for agents, Error messages for AI agents.

How we measured

FAQ

Does Claude Code show the model structuredContent or text?

structuredContent. When a tool result had both, Claude Code passed only the structured JSON to the model and dropped the text, in 2 of 2 runs on 21 October 2026 (version 2.1.304) and in the same test on 16 October (2.1.301).

Does Codex use structuredContent from MCP tools?

Codex's model reported both the text and the structured marker in 2 of 2 runs. Codex's own code prefers structuredContent for the function output, but in code mode the model gets the whole result object, so a raw print serializes both halves.

Does OpenCode show structuredContent?

No. OpenCode 1.18.34 passed only the text content to the model in 2 of 2 runs; the structured marker never reached it.

Should my MCP tool return text, structuredContent or both?

Both, but not the same data twice. Put the full data in structuredContent, declare an outputSchema, and make the text a short summary with the next step. Apps that show only text still get the gist; apps that show only structured get the data.

Why are my MCP tool results so large?

Often because the same data is sent twice, as text and as structuredContent. On one production server that was true for 27 of 34 read tools. Check the raw result size, and see which half each app actually uses.

Find out what the model really sees from your tools.

We run your users' jobs through Claude Code, Codex and the other apps they use, capture what each one passes to the model, and show where your results are dropped, duplicated or cut.

Test your MCP