Skip to content

MCP docs describe a wire format the server no longer serves, and the drift gate has no obligation to notice #572

Description

@serge-ivo

The MCP docs describe a wire format the server no longer serves

platform-docs/mcp.md was last touched by #525. #561 changed what tools/list and two
tools/call results carry, and the doc was not updated with it.

Verified stale

1. mcp.md:155 is now false.

Tools return a single text content block.

e392754 added outputSchema + structuredContent to list_agents and my_instances.
Both now return a text block and structured content. Measured live on 2026-08-15:
my_instances returns {"instances":[…]} where it previously returned a bare array. That
shape change is consumer-visible and appears in no doc.

2. Annotations are absent from the docs entirely.

$ grep -rniE 'readOnlyHint|destructiveHint|annotation|outputSchema|structuredContent' platform-docs/
(no match)

b2b0ac4 and 778c5d2 put readOnlyHint and destructiveHint on all 135 tools. The
"Auth Scopes And Safety" section teaches scopes, dry_run and confirm as the complete
safety vocabulary. It is now missing the one signal a host reads before calling anything —
which is the whole reason the annotations were added.

3. The server instructions field is undocumented. 951ef59 added it; a connecting
client now receives guidance the docs never mention.

The part worth more than the prose fix

scripts/docs-drift.mjs passed on all four #561 commits, correctly. Its header states the
checks are deliberately narrow — each compares a documented number or name to the code
defining it. Tool count still equals 135; every documented confirm value still matches a
requireConfirmation site. Nothing it measures changed.

So a capability can now reach the wire with no documentation obligation attached, while a
confirm value cannot. That asymmetry is the gap: confirm is checked because a doc naming a
wrong confirm string breaks a caller, and an annotation the docs never mention is the same
class of failure one level up — a host makes a trust decision from a signal the docs do not
explain.

Acceptance criteria

  1. mcp.md:155's error/result-shape section states which tools carry structuredContent, and
    that their payload is an object ({"instances":[…]}, {"agents":[…]}), not a bare array.
  2. The safety section documents readOnlyHint and destructiveHint: what they mean here, that
    they are derived from the handlers rather than hand-maintained, and that idempotentHint /
    openWorldHint are deliberately omitted because there is no honest source for them.
  3. The server instructions field is documented.
  4. docs-drift.mjs gains a check in the same style as its existing confirm-value check: a
    tool declaring outputSchema, or the annotation vocabulary itself, must be named in the
    docs. State the denominator in the success line, per ADR 0002 — the input set is asserted,
    not assumed.
  5. The new check goes red when the documentation is removed, and that is demonstrated.
  6. pnpm docs:build (zensical --strict) stays green.

Verified vs inferred

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions