Labsco
grossiweb logo

ToolRoute

โ˜… 1

from grossiweb

Intelligent routing layer for AI agents โ€” recommends the best MCP server and LLM for any task, scored on 132+ real benchmark executions.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

ToolRoute

Routing layer for AI agents. One call returns the best MCP server and LLM for any task โ€” scored on 132 real benchmark executions.


How it works

Every task falls into one of three approaches:

ApproachWhenReturns
direct_llmTask needs only an LLM (code, writing, analysis)Best model + cost estimate
mcp_serverTask needs an external tool (search, email, calendar)Best tool + best model
multi_toolCompound task ("send Slack AND update Jira AND email")Ordered orchestration chain

Routing uses an LLM classifier (~$0.00001/call) for task understanding, then ranks candidates on a 5-dimension score:

Value Score = 0.35 ร— Output Quality
            + 0.25 ร— Reliability
            + 0.15 ร— Efficiency
            + 0.15 ร— Cost
            + 0.10 ร— Trust

Every reported outcome updates the scores. The routing gets more accurate as more agents use it.


Benchmark results

132 blind A/B executions across code, writing, analysis, structured output, and translation.

ToolRouteFixed GPT-4o
Quality wins60
Ties99
Losses0โ€”
Avg cost$0.001โ€“0.01$0.03โ€“0.10

API

EndpointMethodDescription
/api/routePOSTRoute a task to best MCP server + LLM (unified)
/api/route/modelPOSTRoute to best LLM model only (no MCP server)
/api/mcpPOST (JSON-RPC)MCP server โ€” 16 tools
/api/mcpGET (SSE)SSE transport for MCP clients
/api/reportPOSTReport MCP server outcome (lightweight)
/api/contributionsPOSTAdvanced MCP skill telemetry (requires skill_id or skill_slug in payload)
/api/report/modelPOSTReport LLM model outcome โ€” use this for model telemetry, not /api/contributions
/api/verify/modelPOSTVerify model output quality
/api/skillsGETSearch MCP server catalog
/api/agents/registerPOSTRegister agent identity
/api/agents/preferencesPOSTSet routing preferences (Strategy D Phase 2 โ€” allow_china, regulated_industries)
/api/healthGETService health check (DB + uptime)
/api/metricsGETPublic aggregate platform metrics (no auth)

Full reference at toolroute.io/api-docs


SDK

npm install @toolroute/sdk
import { ToolRoute } from '@toolroute/sdk'

const tr = new ToolRoute()
const rec = await tr.route({ task: 'parse this CSV and summarize it' })
// execute with rec.recommended_model ...
await tr.report({ skill: rec.recommended_skill, outcome: 'success', latency_ms: 1400 })

Self-hosting

git clone https://github.com/grossiweb/ToolRoute.git
cd ToolRoute
cp .env.local.example .env.local
npm install
npm run dev

Requires: NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY


How routing works

ToolRoute classifies each task using an LLM classifier (Gemini Flash Lite, ~$0.00001/call) with a keyword fallback. The resulting tier maps to a specific model via src/lib/routing/tiers.ts. Live pricing and capability data come from the models table. See docs/architecture.md for the full picture.


Stack

Next.js 14 (App Router) ยท Supabase (Postgres) ยท Vercel