mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #5861] [Bug] Default tools/list schema profile is ~813 KB (~259K tokens); compact cuts it to ~196 KB but is off by default and still 66K context #3551
Open
opened 2026-10-31 00:41:46 +00:00 by bsakaguchi
·
5 comments
No Branch/Tag specified
main
codex/procedure-reference-stacked
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/kuna-independent-retry
codex/byte-search-overlay-coverage
codex/open-failure-target-receipt
codex/kuna-xref-evidence
codex/ghidra-ambiguous-procedure-recovery
codex/function-source-bundle
codex/trace-function-integration-prototype
codex/snapshot-source-closure
codex/recorded-evidence-array-pages
codex/evidence-recovery-redesign
codex/trace-feature-address-scope
codex/call-discovery-scope
codex/ghidra-literal-candidate-evidence
codex/decompile-directory-independent-retry
codex/retry-provenance-base
codex/value-flow-capability-experiment
codex/ghidra-containing-instruction
cursor/readme-discord-button-ef9f
dependabot/github_actions/actions/setup-node-7.1.0
dependabot/github_actions/actions/upload-artifact-7.0.2
dependabot/npm_and_yarn/npm-minor-and-patch-d8d97ce6df
codex/kuna-1989
fix/8559-native-ui-fixture-ownership
fix/8555-go-verifier-mcp-ownership
codex/provider-capability-recovery
fix/8642-rizin-target-stdin
codex/ghidra-memory-effect-scope
codex/ghidra-annotation-entry-selector
codex/ghidra-readonly-recovery
codex/ghidra-regex-verifier-recovery
codex/evidence-discovery-view-guidance
fix/8545-bulk-append-overflow
fix/8428-navigation-refusal-alternatives
codex/address-context-recovery
codex/matching-member-limitations
codex/unknown-scope-contract
codex/evidence-view-guidance
feat/8373-native-trace-views
codex/ghidra-snapshot-verifier-binding
codex/elf-export-visibility
codex/evidence-view-recovery
codex/native-reference-cli-help
codex/provider-candidate-observation-scope
codex/kuna-session-verification
codex/ghidra-switch-lifetime-guidance
codex/pseudocode-paging-discovery
codex/clarify-evidence-view-support
codex/kuna-xrefs-selector-recovery
codex/context-capacity-recovery
codex/evidence-closure-large-links
codex/same-function-evidence-identity
codex/ghidra-verifier-inspected-jdk
codex/audit-guided-workflows
codex/crash-prompt-retained-dossiers
codex/analysis-view-error-recovery
codex/kuna-verifier-target-selection
codex/ghidra-selected-project-call-coverage
codex/docs-native-analysis-scope
codex/ghidra-java-socket-boundary
codex/ghidra-retained-snapshot-verifier
codex/ghidra-search-inventory-facts
fix/8284-zero-argument-parameter-bindings
fix/8198-ui-action-handler-offset
fix/8257-elf-entry-label-identity
fix/8304-deferred-output-schema-projection
fix/8277-call-path-computed-target-uncertainty
fix/pr-8089-conflicts
fix/ci-static-duplicate-export
dependabot/npm_and_yarn/lint-staged-17.6.0
dependabot/github_actions/actions/download-artifact-8.0.2
dependabot/npm_and_yarn/write-file-atomic-8.0.0
dependabot/npm_and_yarn/canonicalize-5.1.0
dependabot/github_actions/actions/cache/restore-6.1.0
dependabot/npm_and_yarn/toon-format/toon-4.4.0
dependabot/github_actions/actions/deploy-pages-5.0.1
codex/review-fixes-pr-2403
codex/review-fixes-pr-2400
codex/process-terminal-width
codex/test-brittleness-cleanup
verify/7167-browser-connect-macos
fix/7167-browser-connect
feat/native-matching-allowance-setting
feat/browser-scenario-dry-run
test/managed-caller-parameters-20261024
codex/parser-fortythird-boundaries
fix/6926-pinvoke-platform-decorations-20261023
fix/6889-har-body-encoding-20261023
fix/6888-sqlite-schema-budget-20261023
fix/dependency-security-gates-6708
cursor/evidence-overwrite-rebase-b4ac
feat/4057-verify-native-exports
fix/windows-acl-observer-overhead-20261022
cursor/erlang-beam-restack-4476
cursor/pe-certificate-review-bf32
fix/6116-javascript-application-fs-errors
fix/6061-unmapped-runtime-script-unknown
feat/browser-scenario-summary
fix/pe-certificates
codex/verify-3407
cursor/rebase-5699
cursor/rebase-5352
cursor/rebase-5600
cursor/fix-cli-schema-omission-10a8
codex/audit-hopper-shutdown-reasons-20261021
fix/demangle-swift-omitted-record
fix/nib-boolean-value-types
cursor/cancellation-partial-observation-a5ac
fix/ib-object-limit-reasons
fix/electron-fuse-limit-advice
fix/kuna-doctor-dangling-cache
fix/fixed-budget-refusal-advice
fix/js-ipc-listener-dedup
fix/js-return-member-provenance
fix/dmg-integrity-retry-advice
fix/ida-doctor-readiness
fix/kuna-version-probe-output-drain
fix/legacy-swift-runtime-name-matching
fix/dylib-lazy-load-commands
fix/browser-scenario-startup-cancel
fix/swift-nested-punycode-classification
fix/compare-unselected-scopes
fix/objc-method-budget-coverage
fix/dmg-mounted-root-observations
audit/ci-tests-20261019-round2
release/6.7.0
fix/wabt-cleanup-retry-resolution
fix/electron-fuse-elf-pe-architecture
fix/native-plist-descriptor-ownership
fix/kuna-caller-cleanup-ownership
experiment/atomic-codemode-20261016
review/first-contributor-3776
fix/call-resolution-full-read-cycles
fix/member-mutation-selection-repeat
experiment/atomic-re-tools-20261015
perf/member-mutation-lazy-origins
perf/static-network-mutation-index
fix/hopper-startup-lifecycle
audit/3050-windows-proof-20261015
feat/windows-window-capture-2183
audit/3049-windows-proof-20261015
audit/3735-macos-fixtures-20261015
fix/batch-decompile-null-pseudocode
fix/kuna-inventory-honors-jobs
experiment/browser-codemode-tool-design-20261015
fix/hopper-clean-runtime-argv
codex/review-2049-27f1b367
review-fixes/pr-2787-routing
fix/3360-scoped-this-emitters
fix/3367-replaced-global-effects
fix/3838-compact-any-value-items
test/hopper-download-probe-20261015
codex/windows-runtime-creation-red-green-20261015
codex/windows-readonly-root-red-green-20261015
codex/windows-root-share-red-green-20261015
codex/exp-1685-win-mcp-startup
codex/bug-sweep-20261015
investigate/2190-windows-package-phases
investigate/3543-macos-cli-deadline
perf/3281-reverse-tools-feedback-quality
fix/3406-hopper-doctor-fixture
fix/3341-wrapper-require-test-context
fix/3301-owned-uninstall-fixtures
fix/3164-compiler-input-ownership
fix/pcap-cleanup-stdout-newline-20261014
perf/interface-builder-summary
codex/review-fixes-pr-1977
fix/ghidra-effective-jvm-platform
fix/docs-turkish-rust-link-20261013
fix/main-maintenance-ci-20261010
fix/recover-binary-session-process-effects
codex/review-fixes-pr-2457
codex/ci-required-cancellation-gate
fix/main-format-baseline-20261013
fix/setup-preserve-entry-fields
cursor/restore-main-checks-1ffc
fix/ghidra-bridge-hashmap-import
codex/shared-ci-jadx-json-default-20261013
codex/shared-ci-ghidra-test-groups-20261013
codex/shared-ci-java-fixture-format-20261013
codex/fix-intrinsic-invocation-boundaries
test/release-preflight-reusable-jobs
test/js-parameter-provenance-expectation
fix/linux-hopper-verification-current
test/2419-ghidra-elf-probe-size
followup/pr-1544-native-ida
codex/fold-pr-2230-contribution
docs/readme-responsible-use
fix/issue-2064
fix/issue-2050
fix/issue-2053
fix/issue-1968
fix/issue-1945
experiment/codemode-bridge-20261011
fix/tool-effects-negative-wording-1904-20261012
fix/1842-electron-interop-provenance
feat/recover-javascript-multi-input
refactor/website-i18n-prep
fix/nativeaot-pe-virtual-extent
fix/browser-verifier-ci-hang
fix/pe-resources-input-selection
docs/beginner-friendly-guides
docs/beginner-setup-guide
fix/javascript-analysis-worker-1563
fix/1649-ghidra-duplicate-names
fix/javascript-export-keys-integration-1369
test/maintenance-boundary-contracts-20261011
review/javascript-export-keys-1369
review/process-live-progress-1483
test/javascript-1495-growth-ratio
fix/ci-escape-timing
docs/normalized-terminal-geometry-1450
release/6.3.0
archive/release-6.3.0-pr1381
release/6.2.0
fix/electron-preload-dynamic-override
fix/javascript-self-referential-bundler-edges
release/6.1.0
cursor/grok-client-cherry-pick-0b56
feat/signature-posture
feat/dyld-shared-cache
feat/artifact-integrity-policy
feat/pkg-inventory
release/6.0.0
chore/sync-release-5.0.0
release/5.0.0
cursor/cloud-agent-node-787e
fix/javascript-xhr-open-endpoints
review/pr-711-realpath-fallback-wording
cleanup/replay-confinement
codex/test-suite-performance
codex/issue-foundations
codex/address-open-issues-2026-07-20
agent/javascript-vite-rollup-esbuild-adapters
agent/process-cleanup
agent/triage-integration
agent/unknown-commands-registry
feat/mcp-identity-metadata
morlvps/issue_cleanup
codex/installer-redesign
morl/roadmap-investigation-core
morl/roadmap-investigation-docs
release-please--branches--main--components--rea
rea-agents-6.8.0
rea-agents-6.7.0
rea-agents-6.6.0
experiment/atomic-codemode-wait-runtime-20261016
rea-agents-6.5.0
rea-agents-6.4.0
rea-agents-6.3.0
rea-agents-6.2.0
rea-agents-6.1.0
rea-agents-6.0.0
rea-agents-5.0.0
rea-agents-4.1.0
rea-agents-4.0.1
rea-agents-4.0.0
rea-agents-3.2.1
rea-agents-3.2.0
rea-agents-3.1.0
rea-agents-3.0.0
rea-agents-2.7.0
rea-agents-2.6.0
rea-agents-2.5.1
rea-agents-2.5.0
rea-agents-2.4.0
rea-agents-2.3.0
rea-agents-2.2.0
rea-agents-2.1.0
rea-agents-2.0.0
rea-agents-1.7.0
rea-agents-1.6.0
rea-agents-1.5.0
rea-agents-1.4.0
rea-agents-1.3.0
rea-agents-1.2.0
rea-agents-1.1.0
rea-agents-1.0.0
rea-agents-0.5.0
rea-agents-0.4.0
rea-agents-0.3.0
rea-0.2.1
rea-0.2.0
Labels
Clear labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
Mirrored from GitHub Pull Request
question
roadmap
triage
No labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
question
roadmap
triage
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
morluto/rea#3551
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RelicOfTesla on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/5861
#1065
Area
MCP tool surface — schema definitions / tool registration
Observed behavior
Two measured states of the same 207-tool catalog:
Default (full) profile — REA returns 207 tools with 832,157 B (812.7 KB) of combined JSON schema, ≈259K tokens. The client request is rejected at registration, before any tool call, target load, or analysis:
Conversation content in that request was 381 bytes; tool schemas were ~99% of it.
With
REA_MCP_INPUT_SCHEMA_PROFILE=compact— same 207 tools, 200,255 B (195.6 KB), ≈66K tokens. The request now succeeds, but REA still accounts for:Residual concentration after
compact:inspect_analysis_viewcapture_process_scenarioupdate_unknowncapture_electron_scenariocapture_browser_scenarioOnly one tool remains above 5 KB. Mean 967 B, median 780 B.
Reproduction
dsh/@deepseek-ai/dsh-mcp-client,serverName: rea).hello).exceed_context_size_error, 8/8 requests across two independent fresh sessions:Narrow band just under 262,144, no growth across a session — a fixed tool-schema baseline, not history accumulation.
REA_MCP_INPUT_SCHEMA_PROFILE: compactto the server'senv, restart the server, repeat step 2.compact: request succeeds;mcp__rea__*schemas total 200,255 B.Expected behavior
tools/listshould fit a bounded prompt budget by default, so that registering REA does not by itself consume a large fraction of the client's context. Concretely:compact(or an equivalent reduced profile) the default. A catalog that overflows a 227K context on registration is not a usable default.compactfurther. ~66K tokens for tool definitions, before any conversation, is still large; the residual is concentrated in a handful of tools (inspect_analysis_viewalone is 9.4× the median).REA_MCP_INPUT_SCHEMA_PROFILEis documented but easy to miss — I hit the hard failure without finding it. Surfacing it in the README's install section and inrea doctoroutput would prevent repeat reports.No documentation or known-good version to cite for an intended budget — items 1–3 are proposals, not cited requirements.
Impact and scope
compact: usable but costly. ~29% of a 227K context consumed by tool definitions before the first turn; correspondingly less room for conversation, tool output, and reconstruction artifacts.REA_MCP_OUTPUT_SCHEMA_PROFILE=offyields additional savings on this client (OpenAI-styletools[]carries no output schema, so likely zero here); behavior under a client that prunes or lazily loads tools; the full set of accepted values for either variable.REA version
6.7.0
Runtime and platform
Target and artifact context
Not applicable — both measurements are at tool registration; no binary, app, container, or evidence bundle was involved.
Interface
MCP (stdio; client-side bridge
@deepseek-ai/dsh-mcp-client)Earliest failure stage
Request parsing or validation (backend rejects the assembled prompt). No REA tool is ever invoked.
Relevant output or evidence
How obtained: a local forwarding proxy between the client and the model backend dumped each
POST /chat/completionsbody. Per-tool size =len(json.dumps(tool))in Python. Two dumps were captured — one per schema profile. Both show 207mcp__rea__*tools with identical name sets.Dump A — default profile (request rejected):
mcp__rea__*schemasDump B —
compactprofile (request succeeds):mcp__rea__*schemasAggregate change — REA schemas only:
compactToken estimation method (applies to every ≈ figure): the backend reported
n_prompt_tokens = 261559for the 789,958-byte body in dump A → 3.02 B/token for schema-dominated content. Dumped sizes usejson.dumpsdefaults (spaces) and run ~6% over wire size, so were scaled ×0.94. Cross-check on dump A: 207 REA + 15 built-ins + messages = ~261,559, matching the measured value. For dump B — which succeeded, so no backend token count was returned — schema bytes were divided by 3.02 and message bytes by 4.0 (prose), giving ~82,558; treat this as an estimate, not a measurement.Missing evidence / uncertainty:
tools/listwas not invoked directly; sizes come from the client's request body. If the client rewrote schemas before embedding them, figures differ from REA's raw output — no evidence it does, but unverified.usage.prompt_tokensfrom the successful response would replace the estimate.REA_MCP_INPUT_SCHEMA_PROFILE/REA_MCP_OUTPUT_SCHEMA_PROFILEwas not found; onlycompactandoffwere used here.compact(what remains ininspect_analysis_view) was not analyzed.Typed outcome or recovery expected
tools/listshould return a catalog that fits within a documented budget by default. Where REA cannot bound it, it should expose a typed selection mechanism — e.g. a group listing or a server-side flag naming domain groups — so the caller can choose a subset, rather than returning one 207-tool catalog that overflows typical client contexts with no REA-side signal that this will happen.Analysis or suspected cause
Confirmed by measurement: the default profile ships full inline
descriptionprose and deeply nested parameter objects;compactremoves most of that, which accounts for the 75.9% reduction. Hypothesis, not confirmed: what remains incompactis still largely description text, since the residual is concentrated in a few tools rather than spread evenly. Cost was and remains concentrated — under the default profile 9 tools were ~46% of the payload and 1 tool was ~21.5% — so further reduction looks tractable without redesigning the tool surface. No REA source was inspected.Additional context
Workarounds observed, in order of effectiveness:
REA_MCP_INPUT_SCHEMA_PROFILE=compactexcludeof 9 largest toolsincludeof ~27 core toolscompactis the clear win: ~74% smaller with no loss of tool surface. The asks in "Expected behavior" are about making that the default and going further — a user should not have to discover an environment variable to make REA usable at all.Full per-tool comparison, all 207 tools (default → compact, sorted by default size)
compare_web_capturesinspect_analysis_viewcompare_application_versionsevaluate_reconstruction_coverageproject_managed_application_graphcapture_browser_scenariobuild_reconstruction_obligation_ledgercompare_process_capturestrace_application_featurecorrelate_static_and_runtimecompare_javascript_export_shapescompare_source_to_bundlecompare_wasm_interfacesreconcile_javascript_runtimecompare_managed_memberscompare_artifactsverify_managed_native_boundariescompare_functionstrace_javascript_semanticsimport_managed_reconstructionbuild_call_pathproject_harmony_application_graphproject_apple_application_graphfind_changed_behaviorproject_android_application_graphcapture_process_scenarioanalyze_javascript_applicationupdate_unknowncapture_electron_scenariorecord_unknownobserve_native_callsinspect_web_network_captureinspect_sqlite_databaseinspect_packet_captureinspect_web_pageverify_reconstructioncapture_native_ui_scenarioinspect_managed_memberstrace_web_source_locationopen_binaryanalyze_web_bundlerecover_javascript_sourcesextract_firmwaredecode_signal_recordingtrace_web_module_importsstart_adb_activityinspect_binary_layoutinspect_packet_fieldsinstrument_with_fridacompare_web_screenshotsinspect_dart_aotinspect_evm_interfaceinspect_with_objdumpdecode_android_resourcestrace_native_valuesinspect_signal_decodersinspect_wasm_artifactsearch_stringsdecode_interface_builderinspect_recorded_crashexecute_rizin_commandexport_web_scriptsobserve_javascript_runtimeget_evidence_bundleinspect_electron_pageinspect_pcap_capturetrace_android_referencessearch_bytesrizin_debug_commandinspect_pe_resourcesinspect_artifactcompare_bundlesinspect_rust_binarystart_rizin_debug_sessionstart_frida_sessiontrace_dylib_resolutionobserve_web_executiontrace_native_ui_actioncutter_commandpush_adb_fileanalyze_swift_typesinspect_go_binarylist_unknownspull_adb_packageinspect_managed_artifactgdb_consoleinstall_adb_packageinspect_web_event_listenersinspect_android_packagestart_gdb_sessionannotate_native_functionobserve_web_sessiontrace_call_pathclose_binaryprocedure_pseudo_codepull_adb_fileread_adb_logcatdiscover_webmcp_toolsload_frida_scriptclose_gdb_sessionclose_rizin_debug_sessioninspect_android_methodlist_jeb_unitsstart_adb_appdecompile_jeb_iteminspect_electron_fusesset_address_namesearch_proceduresobserve_native_uiset_addresses_namesprocedure_referencesprocedure_infoinspect_native_dispatch_metadataaddress_to_file_offsetcollect_adb_bugreportunload_frida_scriptlist_adb_directorylist_frida_processesread_adb_settingsearch_android_classesinspect_keyed_archiveinspect_adb_packagecapture_web_screenshotlist_stringsget_call_graphinspect_native_instructionlist_frida_devicesinspect_machoresolve_adb_packagescapture_adb_screenbinary_sessionset_inline_commentinspect_android_classrizin_debug_session_statusset_commentxrefsidentify_flutter_buildread_bytesstop_adb_appuninstall_adb_packagegoto_addresslist_adb_packagesinspect_firmware_regionsanalyze_functioninspect_adb_windowprocedure_calleesprocedure_assemblyexport_evidence_bundletrace_featureresolve_containing_procedurebatch_decompileset_bookmarkinspect_native_load_imageprocedure_callersclose_frida_sessionlist_browser_targetsunset_bookmarkbinary_overviewgdb_session_statusopen_jeb_projectextract_artifactinspect_native_data_typeinspect_adb_deviceinspect_managed_native_boundariesaddress_nameprev_addressinspect_address_contextfrida_session_statusresume_frida_sessionverify_unknown_resolutioninspect_native_apilist_javascript_runtime_targetscommentlist_namesimport_evidence_bundlelist_electron_targetsread_function_instructionsinspect_asset_catalogprocedure_addressresolve_native_call_targetsnext_addressinline_commentlist_cutter_sessionsdemangle_swiftinspect_adb_displayget_navigation_contextlist_adb_processesfind_xrefs_to_namelist_bookmarkslist_segmentslist_adb_featuresinspect_plistlist_procedureslist_adb_deviceslist_adb_servicesinspect_pcap_clientcurrent_addressinspect_jeb_clientcurrent_procedureinspect_adb_clientget_objc_classesinspect_apktool_clientinspect_signaturelist_documentslist_architecturesget_objc_protocolscurrent_document@CassieFox23 commented on GitHub (Oct 23, 2026):
Thanks, RelicOfTesla, for the clear numbers.
Your first ask is done on main. The change in #5975 (
aa51e4343) makescompactthe default whenREA_MCP_INPUT_SCHEMA_PROFILEis unset.fullis now opt-in (README, "MCP uses compact input schemas by default"). It merged after 6.7.0, which still defaults tofull. So yourcompactsetting stays right until the next release. #5004 is the open 6.8.0 release PR.Your second ask is still open. #5975 selects the existing compact schemas. It does not shrink them.
Not run: I did not build main or measure schema sizes.
🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊
@RicSchonfelder commented on GitHub (Oct 24, 2026):
Adding the missing half of the measurement on 6.7.0:
REA_MCP_OUTPUT_SCHEMA_PROFILE=off.o200k_base, same 207-tool catalog,rea mcpstraight over stdio:tools/listREA_MCP_OUTPUT_SCHEMA_PROFILE=offoff+REA_MCP_INPUT_SCHEMA_PROFILE=compactoff+compact+ client-side truncationSplit of the default payload:
outputSchemais 75% (2,559,100 of 3,423,371 chars),inputSchema21%, descriptions 3%,annotations/title1%. Socompactalone leaves the biggest term untouched, which is why the residual in the first post is still 66K. Turning output schemas off is the single largest cut available, and it is cheap for clients: the env var docs already say REA validates every successful result against its canonical contract.The last row is a stdio proxy that truncates descriptions to 160 chars and flattens property schemas.
tools/callpasses byte-identical (checked onlist_documents). If the maintainers consider that too aggressive to build in, it still makes a useful reference point for how much of the remaining cost is prose.Two questions:
compactis becoming the default input profile, does the same reasoning apply toREA_MCP_OUTPUT_SCHEMA_PROFILE=off? A client that needs structured output can still ask for it, and the default client just saved 4× the tokens.Repro is a
initialize→tools/listover stdio plustiktoken, ~40 lines, no client needed. Happy to post it if that helps.@kaoru0822-kitauji commented on GitHub (Oct 25, 2026):
6.8.0 data point (published
rea-agents@6.8.0vs6.7.0, macOS 26.7.1 arm64, Node 24.22.1,rea mcpover stdio,tools/listread with@modelcontextprotocol/client2.3.1). Bytes areJSON.stringify(tools).length; token figures are bytes/3.5 estimates, not tokenizer counts.outputSchemashare of defaultREA_MCP_OUTPUT_SCHEMA_PROFILE=off(like-for-like)descriptiontotal (always model-visible)The new compact default worked: input schemas fell from 667,641 B to 121,537 B. But with default settings the output schemas grow by more than input shrinks, and the like-for-like model-visible catalog is 38% larger. That includes +18% on tools that already existed, so it isn't only the 22 new tools.
Largest single contributor: the
inspect_analysis_viewoutputSchemawent from 137,985 B to 382,064 B (2.8×); with output schemas off, that tool is still 15,229 B.Repro:
@morluto commented on GitHub (Oct 26, 2026):
Thank you for the detailed catalog breakdown. Compact input advertisements became the default in #5975, addressing the first requested change, but the remaining context cost and discoverability questions are distinct and this issue stays open for them. The figures here describe the measured 207-tool catalog; they should not be treated as a current measurement without a new equivalent run.
@AvatarGanymede commented on GitHub (Oct 29, 2026):
Please take the time to seriously study how to design MCP tool schemas for agents. The catalog measurements reported in this issue and in morluto/rea#7155 warrant a proper design review. Making compact input schemas the default was useful, but it does not finish the job. Users should not have to discover environment variables or build filtering proxies just to leave enough context for their actual work.
An agent-facing tool contract needs a deliberate context budget. Exposing extensive nested data models across hundreds of tools, with repeated descriptions and large inline evidence structures, makes that budget harder to control. Schema validity alone is not a sufficient usability standard.
These are useful references and tutorials to work through:
outputSchemais optional; when advertised, structured results must conform to it. Evaluate compact output contracts or an explicit profile for clients that need full output schemas, while preserving server-side validation. Optional does not mean useless, but advertising the largest possible schema by default deserves justification.$defsand$ref. Apply these where supported and test interoperability. Local references do not automatically deduplicate separate tool definitions, and client transformations may expand references again.Concrete improvements worth prioritizing:
The distinction in the last point matters: raw
tools/listbytes are not automatically prompt tokens. Some clients omit output schemas or defer tool definitions, so the historical measurements here should not be presented as universal current costs. I am not claiming a fresh measurement. I am asking for the schema surface to be treated as a first-class product interface, with measured limits and usable defaults. Please prioritize that design work.