mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 10:23:02 +00:00
868bd727d1
`tools/list` returns all 132 tools (109,578 bytes, ~27k tokens), which an agent pays on every session. With `--compact` (library: `McpServer::with_compact(true)`) it returns the 10 core tools (`mcp::COMPACT_CORE_TOOLS`) plus `tool_search` (query / category / name with the full schema) and `tool_call` (runs any tool through the same `Automation::call`): 12 tools, 7,697 bytes. `tools/call` by name keeps working for every tool; without the flag nothing changes. Same shape as `lightcraft-cli mcp --compact`; the meta tools are not called `*_command` because "command" already means a registry command here. Both meta tools reject unknown outer keys and report failures as `isError` results; `tool_call` honours `--root` exactly like a direct call. Tests: automation integration tests (compact list, discovery, dispatch, errors, root confinement) and a CLI test that launches the binary with and without `--compact`. Co-authored-by: Oldrich333 <184516902+Oldrich333@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>