Skip to content

Extension proposal: io.modelcontextprotocol/display-templates - #7

Open
maxiboch wants to merge 2 commits into
modelcontextprotocol:mainfrom
maxiboch:ext/display-templates
Open

Extension proposal: io.modelcontextprotocol/display-templates#7
maxiboch wants to merge 2 commits into
modelcontextprotocol:mainfrom
maxiboch:ext/display-templates

Conversation

@maxiboch

@maxiboch maxiboch commented Aug 4, 2026

Copy link
Copy Markdown

Proposes a new experimental extension per CONTRIBUTING's "Proposing a
new extension": display strings for tool calls & results, solving the
dual-audience problem (compact encodings for the model, one legible
line for the human) raised in modelcontextprotocol#930 and discussed
in the #tool-annotations-ig thread "proposal for call-side string
templates".

What's in the draft:

  • call-side template under _meta["io.modelcontextprotocol/display-templates"]
    on Tool, with branch-scoped templates inside oneOf/anyOf
    subschemas for one-tool-many-actions shapes
  • result-side rendered text on content-block _meta (no templating;
    the server knows the outcome)
  • normative rendering semantics: literal substitution only, ... for
    missing/non-scalar, raw fallback, first-matching-branch
  • security implications centered on call-side omission: raw MUST stay
    reachable, unreferenced args SHOULD be visibly counted (const
    discriminators exempt), destructive confirmations SHOULD show raw

Reference implementation (runs on stock Python SDK 2.x):
https://github.com/maxiboch/soundboard

Prior discussion: #tool-annotations-ig, with guidance from
@SamMorrowDrums to target this repo as an Extensions Track proposal.
Seeking a sponsor. Open questions are listed in the draft (branch-key
spelling per SEP-2356, result-level vs per-block text, inner key
naming).

Call-side display templates (tool-level via namespaced _meta,
branch-scoped inside oneOf/anyOf subschemas) and result-side rendered
display text on content-block _meta. Includes normative rendering
semantics, security implications (call-side omission indicator with
const-discriminator carve-out), and a reference implementation:
https://github.com/maxiboch/soundboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant