Daily harness signal · October 14, 2026

A small probe passes.
Will the batch?

One implementation lesson · Machine-readable tool results

Moving tool composition into code makes response consistency an interface requirement. Armin Ronacher’s Codemode examples expose a practical trap: a small probe can work while a larger response changes shape.

Fresh · source October 6, 2026

Keep the contract stable as results grow

Use when

An agent probes an MCP list tool, then writes a script to process larger batches. This particularly matters when the server shortens large responses to save context.

Action

For an owned list tool, declare one outputSchema requiring items (array) and nextCursor (string-or-null). Return that envelope in structuredContent for empty, singleton, and full pages. Paginate rather than replacing records with prose or dropping required fields. Serialize the same envelope in compatibility text.

In the consumer, separate protocol failures, incomplete responses, and isError:true from completed success. Validate successful payloads before mapping records. Preserve diagnostics; never turn failure into items:[]. Keep authorization unchanged, and do not automatically replay effectful calls after validation errors.

Acceptance check

Through the actual client/server/protocol combination, exercise owned fixtures with zero, one, five, and maximum-size pages, plus continuation. Require the same schema, exact expected identities, no lost or repeated records, and nextCursor:null at exhaustion.

Inject a missing required field, a large-batch prose substitution, and a tool error. Each must remain an explicit failure, not an empty success or a complete-result claim. An ordinary empty page must still pass. Retain wire payloads, schema, versions, and consumer outputs; server-only validation does not test the caller.

Evidence

Ronacher publishes real-session Sentry code that consumes structured results and preserves per-call errors. He also reports small-probe/full-batch shape drift. MCP’s July 28 specification requires schema-conforming structured results when an output schema is declared. A historical SDK reproduction and proposed regression test show why error envelopes also need client-level coverage.

Caveat

The inconsistent server is unnamed; its failing payloads are not published. Our envelope and fixtures are untested adaptations, not an MCP-mandated pagination format. July’s protocol permits any JSON value, not only objects. SDK error handling varies; do not weaken success validation to hide incompatibility. Code composition proves neither durable execution nor safe retries. No MCP, skill, or runtime was enabled or changed.

Compact source notes

  1. Armin Ronacher, What is Codemode, October 6, 2026. Inspectable examples and first-person limitations, not an independent throughput or reliability evaluation. Proposed local utility: confidence_likely.
  2. MCP Tools, July 28, 2026 revision: optional output schemas, server conformance, recommended client validation, and separate protocol/tool errors. Unlike the November 25, 2025 revision, structured content need not be an object. Specification semantics: confidence_confirmed.
  3. TypeScript SDK #1943, April 22, 2026, reports 1.29.0 validating error data against a success schema. Proposed correction #1945 remains open in the retrieved view; pinned test asserts preserved error data. Inspected, not executed; neither issue closure nor PR test claims establish a deployed fix.
  4. Anchor lens: exact consumer code, stated batch-shape failure, and inspected SDK test assertions. Unity lens: preserve typed meaning across result sizes, a proposed invariant. Shape drift, hidden errors, missing records, or falsely completed pagination fail the corresponding acceptance check.