Skip to content

v4.0.0: slim tool defs and responses for ~30-55% smaller MCP payloads#6

Merged
ttpears merged 1 commit into
mainfrom
release/v4.0.0
May 23, 2026
Merged

v4.0.0: slim tool defs and responses for ~30-55% smaller MCP payloads#6
ttpears merged 1 commit into
mainfrom
release/v4.0.0

Conversation

@ttpears
Copy link
Copy Markdown
Owner

@ttpears ttpears commented May 23, 2026

Summary

Token-efficiency overhaul. Verified against a live BookStack via scripts/bench-context.mjs:

Endpoint Before After Saved
tools/list 13,636 9,290 32%
search_content (5) 17,735 10,985 38%
get_books (5) 3,636 1,570 57%
get_pages (5) 4,826 2,169 55%
get_recent_changes (5) 19,302 9,519 51% (also no N+1)
get_shelves (5) 4,700 2,090 56%
get_page (1) 6,333 5,779 9% (content-bound)
get_book (1) 12,974 8,953 31%

Response shape changes (breaking)

  • Drop redundant fields: direct_link, *_friendly date strings, content_info, contextual_info, change_summary, pagination_hint, location, shelf summary / tags_summary / book_count.
  • Fix buggy attachment page_url; keep download_url.
  • Compact JSON (no pretty-print whitespace).
  • get_recent_changes returns search-response data directly — no per-result book/page/chapter fetches.

Tool-def changes

  • Remove get_capabilities (redundant with tools/list).
  • Drop title field (clients key on name).
  • Trim verbose descriptions and 52 boilerplate param descriptions.
  • Dedupe advanced-search caveat onto search_content only.

Other

  • Add scripts/bench-context.mjs JSON-RPC harness for re-measuring payload sizes against a live BookStack.
  • README: 4.0.0 breaking-changes callout, feature bullet for the size win, remove get_capabilities row.
  • Version bumped in package.json and gemini-extension.json.

Test plan

  • npm run type-check passes
  • npm run build passes
  • Live benchmark run against bookstack.teamgleim.com (read-only, sizes above)
  • Spot-checked response shapes for search_content, search_pages (advanced syntax {type:page}), get_books, get_pages, get_shelves, get_page (content pagination intact), get_book (chapter/page hierarchy intact), get_recent_changes
  • CI: build job green on PR
  • After merge: tag job creates v4.0.0, release workflow publishes to npm with provenance

Token-efficiency overhaul. Verified against live BookStack:
tools/list -32%, list endpoints -55-57%, get_recent_changes -51%
(also drops N+1 fetches), get_book -31%.

Response shape changes (breaking):
- Drop redundant fields: direct_link, *_friendly date strings,
  content_info, contextual_info, change_summary, pagination_hint,
  location, shelf summary/tags_summary/book_count.
- Fix buggy attachment page_url; keep download_url.
- Compact JSON (no pretty-print whitespace).
- get_recent_changes returns search-response data directly, no
  per-result book/page/chapter fetches.

Tool-def changes:
- Remove get_capabilities (redundant with tools/list).
- Drop title field (clients key on name).
- Trim verbose descriptions and 52 boilerplate param descriptions.
- Dedupe advanced-search caveat onto search_content only.

Add scripts/bench-context.mjs harness for re-measuring payload
sizes against a live BookStack via JSON-RPC over stdio.
@ttpears ttpears merged commit cd1d444 into main May 23, 2026
2 checks passed
@ttpears ttpears deleted the release/v4.0.0 branch May 23, 2026 17:17
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