Coding agents load full MCP tool schemas into every request. Tool count scales with enabled servers; schema tokens are paid on every turn.
Facet treats tool selection as budgeted routing:
- Cluster tools by inferred capability from name/namespace
- Score each tool against the task via token overlap on name, description, and schema property keys
- Distill schemas by trimming descriptions and nonessential schema metadata
- Route greedily by score until the token budget is reached, with a minimum floor count
selected[]— tools to expose this turndeferred[]— tools omitted to save tokensreasons{}— per-tool routing rationale for debugging
- Replacing MCP transport or proxying LLM requests
- Semantic embedding models (keyword scoring only in v0.1)
- Automatic MCP server installation
See eval/runner.ts — fixture-based routing accuracy against expected tool inclusion/exclusion.