Documentation
¶
Overview ¶
Command gen-corpus-v2-dump exports every indexed tool — with its FULL JSON input schema — from a mcpproxy Bleve index directory, as the raw material of the spec-083 schema-bearing frozen corpus (corpus_v2.tools.json).
It is invoked by scripts/gen-corpus-v2.sh AFTER the snapshot proxy has been booted (to populate the index) and shut down (to release the index lock).
Why read the index instead of GET /api/v1/tools: the REST endpoint serves tool schemas from the supervisor StateView, which currently stores a stub ({"type":"object","properties":{}} — internal/runtime/supervisor/supervisor.go has a literal "TODO: Parse ParamsJSON"), so every schema it returns is empty. The Bleve index is the authoritative store of what the production retrieval funnel actually ingests (ToolMetadata.ParamsJSON, set from the upstream tools/list response in internal/upstream/core) — which is exactly the text arm comparison must measure (research D4/D7).
Output (stdout): a JSON array of {tool_id, server, tool, description, schema} sorted by tool_id. Canonical key ordering / final envelope assembly is done by the calling script (jq -S).