-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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
- Existing Aho-Corasick infrastructure
- MCP server already running (feat: Add context-hub haystack connector #651 context-hub haystack connector for pattern)
Acceptance Criteria
- Tool capability descriptions indexed in KG
- Query returns ranked relevant tools
- MCP resource endpoint functional
- CLI
tools relevantcommand works - Reduces token usage compared to loading all tool schemas
- Benchmarks showing sub-100ms query time via automata
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request