Budget and trim MCP tools/list serialized inputSchema payload

Aperta
#437 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
json

Direzione di ricerca

Start with McpProjectionTest.lean, which holds the existing description-character budget, and with tests/test-skill-budget.py as a model for a byte budget. Measure the serialized tools/list output for the 24 tools, then look at beam_feedback_report, the four pre-stable handle tools, and the repeated workspaceDescriptorSchema. Done means a serialized-size budget test exists and the schema text is trimmed while each tool stays understandable alone; the issue leaves open which optional fields to keep, so confirm that with maintainers first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

McpProjectionTest.lean enforces a strict 4,500-character budget on MCP tool description fields (currently 4,178 B), and tests/test-skill-budget.py budgets SKILL.md, but the serialized inputSchema JSON in tools/list is unbudgeted and currently dominates MCP discovery token cost.

Measurement

Measured on lean-beam-mcp 0.2.0 (8bcac69d31e4738542a8278af524a816b99b5400) via MCP 2026-07-28 tools/list:

  • Total tools/list payload (24 tools): 29,376 B (~7,356 tokens)
  • Tool descriptions: 4,178 B (14.2%)
  • Input schemas (inputSchema): 23,064 B (78.5%)

Largest schema contributors:

Tool(s) Total inputSchema Share / notes
beam_feedback_report 3,714 B 3,188 B 12.6% of all 24 tools (19 properties, including a 350-char confidential description)
4 pre-stable handle tools (lean_run_at_handle, lean_run_with, lean_run_with_linear, lean_release) 6,461 B 4,816 B 22.0% of tools/list
workspaceDescriptorSchema duplicated across 22 tools ~4.5 KB ~4.5 KB Repeated verbatim (description, properties.root.description, required, additionalProperties)
lean_run_at + lean_todo 4,091 B 3,031 B Long per-property prose on profile and range fields

Suggested directions

  1. Add a serialized tools/list byte budget to BeamTest.Broker.McpProjectionTest alongside the existing description-character budget so schema growth stays visible.
  2. Tighten repetitive property-level descriptions (workspace, path, version, line, character, profile, confidential), keeping shared conventions in serverInstructions and skills/lean-beam/references/ while preserving each tool's standalone clarity.
  3. Evaluate whether beam_feedback_report needs all 19 optional triage fields inline in the always-loaded MCP discovery schema.
Lingua principale
Lean
Stelle
58
Fork
8
Merge medio
1g 12h
PR unite (30g)
68

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di leanprover/lean-beam

Tutte le issue di leanprover/lean-beam

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.