Skip to content

docs(memory): slim the published MCP tool descriptions (~14% smaller tools/list) - #2442

Merged
cyberlife-coder merged 4 commits into
developfrom
docs/slim-mcp-schema-descriptions
Oct 24, 2026
Merged

cyberlife-coder merged 4 commits into
developfrom
docs/slim-mcp-schema-descriptions

Conversation

@cyberlife-coder

Copy link
Copy Markdown
Owner

Summary

Every MCP client receives the whole tools/list surface — tool descriptions plus the per-field descriptions schemars lifts from the rustdoc — on every call. That prose had grown to ~147K bytes, roughly half of it explanatory text restating what the types and docs/reference pages already carry.

This PR rewrites tool descriptions and field doc comments down to their contract, and regenerates docs/reference/mcp-tools.json (146 825 → 126 774 bytes, ~14%).

Kept — everything a client needs to call the tool correctly:

Dropped/moved — narrative context, issue archaeology and repeated framing, which now live in plain // comments next to the fields when still useful.

Test plan

  • mcp_tools_drift — published surface matches the committed artifact (1/1)
  • mcp_schema_bdd (20/20), the five description-pinning unit tests (5/5)
  • scripts/check-mcp-doc-contract.py --verbose — 233 surfaces, PASS
  • full pre-commit hook green (fmt, clippy, unsafe-docs, 6 292 unit tests)
  • live daemon verified: rebuilt with embedder-http,http,extractor-http, tools/list over real MCP handshake = 122 129 bytes on the wire

…tools/list)

Every MCP client receives the whole tools/list surface — tool
descriptions plus the per-field descriptions schemars lifts from the
rustdoc — on every call. The prose had grown into a second
documentation site: ~147K bytes of schema, roughly half of it
explanatory text restating what the type and the docs/reference pages
already say.

Tool descriptions and field doc comments are rewritten to their
contract only: security constraints (path ingestion allowlist),
wire-compat rules (ids over 2^53 as decimal strings), type-strict
comparison semantics, caps, defaults and empty-result meaning stay;
narrative context, issue archaeology and repeated framing move to the
plain comments next to them or are dropped. mcp-tools.json is
regenerated: 146825 -> 126774 bytes.

Verified: mcp_tools_drift, mcp_schema_bdd (20), the five
description-pinning unit tests, and check-mcp-doc-contract (233
surfaces) all pass.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@cyberlife-coder
cyberlife-coder enabled auto-merge (squash) October 24, 2026 21:17
# Conflicts:
#	crates/velesdb-memory/CHANGELOG.md
@cyberlife-coder
cyberlife-coder merged commit 1fc6d93 into develop Oct 24, 2026
64 checks passed
@cyberlife-coder
cyberlife-coder deleted the docs/slim-mcp-schema-descriptions branch October 24, 2026 23:54
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