Server-controlled rendering directives: prevent client-side summarization for verbatim-required responses #2782
victor-jx
started this conversation in
Ideas - General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
MCP tool servers that return structured, deterministic data (regulatory filings, financial statements, structured records) often need their response rendered verbatim, in a specific order, with no client-side summarization. Common use cases:
Currently, even with explicit instructions inside the tool description (e.g. "render every line in
_layout.sections[*].lines, do not summarize, use-for null values"), client implementations (the LLM agent plus its host prompt) routinely:The end-user sees a "helpful summary" that omits regulatory-required structure. This is invisible to the user (they don't know what's missing) and to the server (which has no way to enforce verbatim rendering).
Current workarounds (all insufficient)
_layout/_renderingmetadata in the response payload describing the canonical order and sectionsEach of these is overridden by the client's default summarization heuristic. In our testing, the same payload renders correctly in some clients (full table) and as a 5-line synthesis in others — the server has no leverage.
Related discussions
readOnlyHint,destructiveHint,idempotentHint,streamingHint. None covers rendering directives.The
contentvsstructuredContentsplit already acknowledges that human-facing rendering and machine-facing data have different needs. But neither field gives the server a way to declare "this content was crafted intentionally exhaustive — do not abridge."Proposals
Two complementary options, not mutually exclusive:
Option A — Tool annotation:
verbatimHintA boolean on the tool definition declaring "responses from this tool should be rendered verbatim to the user, with minimal client-side reformulation":
Clients are expected (but not forced) to:
Option B — Response-level rendering directive
Servers attach a hint to individual responses, allowing per-call control:
{ "content": [...], "structuredContent": {...}, "_rendering": { "mode": "verbatim", "guidance": "Render all rows from sections.* in order. Null values shown as '-'." } }This complements
verbatimHintfor tools that sometimes return summary data and sometimes return exhaustive data based on call parameters.Why this matters
Without a standard signal, MCP servers in regulated or audit-sensitive domains either:
A protocol-level affordance lets ecosystems converge on respecting server intent without each server reinventing the directive in prose.
Open questions
verbatimHintan appropriate annotation, or should this live entirely at the response level?verbatimHint=truewith context-window pressure (e.g., tool returns 5 MB)? Truncate-but-warn? Refuse?summarizeOkHint(default behavior, opposite signal) for symmetry?Happy to prototype either option in a reference client/server if there's appetite. Curious whether others have hit the same gap.
Beta Was this translation helpful? Give feedback.
All reactions