Parent Epic
Part of #692 (Operational Skill Store)
Summary
Extend the MCP server to expose a tool capability index that returns only relevant tool definitions for the current task, using Aho-Corasick automata to match task descriptions against tool capability descriptions. This solves "catalog bloat" -- instead of stuffing all tool schemas into context, load only what is needed.
What Changes
Tool capability index in terraphim_mcp_server
- Each registered MCP tool gets a capability description indexed in the KG
- Query API matches task description against tool capabilities
- Returns ranked list of relevant tools with their schemas
CLI
terraphim-agent tools relevant "fix the broken data pipeline"
# Returns: ssh, systemctl, config-edit, log-search (4 of 47 available tools)
MCP resource
Expose as MCP resource so agents can query before requesting tool definitions:
terraphim://tools/relevant?query=deploy+config
Affected Crates
terraphim_mcp_server (tool index resource)
terraphim_automata (capability matching)
Dependencies
Acceptance Criteria