Repository navigation
perf(mcp)!: default tools/list to omit output schemas - #9869
Closed
carloscoyote15-beep wants to merge 2 commits into
Closed
carloscoyote15-beep wants to merge 2 commits into
carloscoyote15-beep wants to merge 2 commits into
Conversation
resolve() anchored /packaged/rea.mjs to a Windows drive while the observed command path stayed drive-less, reporting a spurious registration_path_mismatch and mcp_server_restart_required state on every Windows host. Resolve both sides once at the owning comparison. Validated on Windows: tests/boundary/mcp/serverIdentity.test.ts failed at the aligned case before and passes after; Linux/macOS behavior is unchanged because resolved absolute paths are identity there.
Resolve REA_MCP_OUTPUT_SCHEMA_PROFILE to off when unset, matching the compact input default. The recorded catalog is recorded with full output schemas and the deferred transport strips them while the resolved selection is the default off; explicit full selections, and invalid values, load the eager runtime, which reports invalid selections as typed configuration errors. Deferred startup stitches the resolved profile's identity from recorded digest profiles so server identity stays exact without the contract graph. The doctor, CLI status, callers' digest comparisons and profile-preserving discovery keep both profiles working, with the compact+off combination covered. Update every consumer that owned the previous full-by-default selection: the catalog recorder pins full so canonical output validation survives; the Claude client verifier resolves the selected profile; the apk-signature and artifact verifiers pin full because they validate client-side against the advertised schema. Document the new default in README, MCP contracts and client configuration guides. Refs morluto#5861 Validated on Windows: npm run check:fast (typecheck + oxlint, 0 errors, no new warnings); npm run docs:check; focused boundary tests 82/82 (deferredRuntime, serverIdentity, mcpDoctor, contractPresentation, compactInputSchemaMcp); src/server/DeferredEvidenceMcpServer.test.ts 11/11. Windows-only failures that predate this change are covered by the preceding identity fix commit. The tools/list token reduction measured in the issue was not re-measured here. BREAKING CHANGE: MCP tools/list omits advertised output schemas by default. Set REA_MCP_OUTPUT_SCHEMA_PROFILE=full to advertise complete output contracts for client-side discovery and validation.
22 tasks
Owner
|
Thank you for this contribution. Defaulting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Defaults
REA_MCP_OUTPUT_SCHEMA_PROFILEtooff:tools/listno longer advertisesoutputSchema, matching the compact input default introduced in #5975. Completes thescope selected in #5861 ("modificación de REA_MCP_OUTPUT_SCHEMA_PROFILE a OFF
por defecto manteniendo la sintonización diferida coherente y documentando la
combinación off+compact").
structuredContentunchanged.fullremains opt-in for clients that discover or validate output schemas locally.registration_path_mismatchinsrc/serverIdentity.ts(commit 1) that blocked local validation; it is unrelated tothe profile change (see Validation).
Problem and expected behavior
Issue #5972/#2512 measured ~1,033K tokens of context consumed by full advertised
output schemas in
tools/list; theoffprofile drops this to ~57K (5.5%).Previously every host paid that cost unless it knew to set the environment
variable. Expected: default advertisement omits output schemas; existing explicit
choices keep working; server identity, doctor, and CLI status report the
(selected) profile exactly as before.
Change and scope
resolveMcpOutputSchemaProfile(undefined)→off; consumers resolve at theconfiguration boundary (
createServer,mcpDoctor,DirectAnalysisStatus,deferred runtime,
DEFAULT_CATALOG_IDENTITY).recorded with
REA_MCP_OUTPUT_SCHEMA_PROFILE: "full"(recorder pins it), and thedeferred transport strips output schemas while the resolved selection is
off.The deferred server stitches the resolved profile's identity from
RECORDED_CATALOG_DIGEST_PROFILESwithout loading the contract graph.full, and unparseable values, load the eager runtime (invalid valuessurface as the existing typed configuration errors).
catalog recorder pins
full;verify-claude-client.mjsresolves the profile;verify-apk-signature.mjsandscripts/lib/artifact-e2e.mjspinfull(they validate client-side against the advertised schema).
README.md,docs/mcp-contracts.md("Output schemas"),docs/client-configuration.md; thecompact+offcombination is already adoctor/identity test row.
Contribution scope: profile value selection within the existing MCP contract
boundary; no new provider or target-execution capability. Not applicable.
Contract and boundary impact
resolveMcpOutputSchemaProfileresolves the selection once at the configuration/identity boundaries.
identities remain distinct and recorded;
tools/listshape changes only forthe default selection.
canonical output validation and delivery are unchanged.
docs/public/product-catalog.json,skills/, catalogsregenerated and validated by the CI/artifact tasks (not committed here).
Evidence and regression coverage
tests/boundary/mcp/deferredRuntime.test.ts(phaserows: off→deferred, explicit full→eager;
tools/listprojections stripoutputSchema; profile preservation foroff/compact/full),tests/boundary/mcp/serverIdentity.test.ts(DEFAULT= compact+off),tests/boundary/mcp/mcpDoctor.test.ts(probe capture pinsfullso theclient-side schema-violation check keeps working),
src/server/DeferredEvidenceMcpServer.test.ts(identity parameter).tests/boundary/mcp/serverIdentity.test.ts"reports unknown without a livecomparison and distinguishes aligned from stale" failed with
registration_path_mismatchbecauseresolve()anchored/packaged/rea.mjsto a drive while the observed path stayed drive-less; resolving both sides
fixes it and is a no-op on Linux/macOS.
re-executed locally; real host-client verification (Claude Code/Codex live
sessions) was not re-run; lint race with concurrent builds
(oxlint emits a filename-less global diagnostic when
dist/is beingrebuilt) is an environmental note, CI runs lint exclusively.
Validation performed
npm run check:fast— typecheck + lint passed (0 errors; no new warningsversus HEAD)
npm run docs:check— passed, includingreadmeConsistency9/9node scripts/run-development-tests.mjs focused tests/boundary/mcp/{deferredRuntime,serverIdentity,mcpDoctor,contractPresentation,compactInputSchemaMcp}.test.ts— 82/82 passed (Windows)npm run test:local -- src/server/DeferredEvidenceMcpServer.test.ts— 11/11 passedCompatibility, safety, and release
BREAKING CHANGE: MCP
tools/listomits advertised output schemas bydefault. Set
REA_MCP_OUTPUT_SCHEMA_PROFILE=fullin the server entry torestore the complete advertised catalog. Existing explicit values
(
off/full) continue to work unchanged.interaction).
catalogs.
advertisement-only change; server-side validation unchanged.
Author readiness
Human owner:
change and its edge cases, and take responsibility for the complete PR,
including AI-assisted work.
and recorded meaningful validation gaps.
Before merge
type(scope): outcome.claims.