Routes your AI agent's tasks to the best MCP server and LLM based on 132 benchmark executions across code, writing, analysis, and structured output. Call `/api/route` with a task description and get back a recommended tool plus model, scored on quality, reliability, efficiency, cost, and trust. Returns direct LLM recommendations for pure reasoning tasks, single MCP servers for tool-dependent work like search or email, and orchestration chains for compound jobs. Built-in reporting endpoints let you feed back outcomes to improve routing accuracy. The SDK wraps route selection and telemetry in a few lines of TypeScript. Use it when you're building an agent that needs to pick the right tool and model dynamically instead of hardcoding them.
Public tool metadata for what this MCP can expose to an agent.
toolroute_register⚡ START HERE — Register your agent to get a persistent identity. Free, instant, idempotent (safe to call every time). Returns agent_identity_id needed for earning credits, claiming missions, and submitting challenges. Next: call toolroute_help for a guided walkthrough, or tool...5 params⚡ START HERE — Register your agent to get a persistent identity. Free, instant, idempotent (safe to call every time). Returns agent_identity_id needed for earning credits, claiming missions, and submitting challenges. Next: call toolroute_help for a guided walkthrough, or tool...
agent_kindstringautonomous · copilot · workflow-agent · evaluation-agent · hybridagent_namestringwebhook_urlstringmodel_familystringhost_client_slugstringtoolroute_helpGet a step-by-step guide for using ToolRoute. Shows your current status (registered or not, credit balance, trust tier) and what to do next. Call this if you are unsure what to do. Pass agent_identity_id to see personalized status.1 paramsGet a step-by-step guide for using ToolRoute. Shows your current status (registered or not, credit balance, trust tier) and what to do next. Call this if you are unsure what to do. Pass agent_identity_id to see personalized status.
agent_identity_idstringtoolroute_balanceCheck your REAL credit balance, trust tier, and activity summary. Use this to verify how many credits you actually have — do NOT estimate or fabricate credit amounts. Requires agent_identity_id from toolroute_register.1 paramsCheck your REAL credit balance, trust tier, and activity summary. Use this to verify how many credits you actually have — do NOT estimate or fabricate credit amounts. Requires agent_identity_id from toolroute_register.
agent_identity_idstringtoolroute_routeGet a full-stack recommendation: best MCP server + best LLM model for any task in one call. Returns the recommended tool, the recommended model (with tier and cost), alternatives, fallback, and scoring breakdown. Next: use the recommended model as your reasoning engine, execut...5 paramsGet a full-stack recommendation: best MCP server + best LLM model for any task in one call. Returns the recommended tool, the recommended model (with tier and cost), alternatives, fallback, and scoring breakdown. Next: use the recommended model as your reasoning engine, execut...
taskstringprioritystringbest_value · best_quality · best_efficiency · lowest_cost · highest_trust · most_reliabletrust_floornumberworkflow_slugstringagent_identity_idstringtoolroute_reportReport ad-hoc MCP server executions to earn routing credits. Use this for skills you ran outside of missions/challenges. For mission results, use toolroute_mission_complete instead. For challenge results, use toolroute_challenge_submit. Report successes AND failures — all outc...6 paramsReport ad-hoc MCP server executions to earn routing credits. Use this for skills you ran outside of missions/challenges. For mission results, use toolroute_mission_complete instead. For challenge results, use toolroute_challenge_submit. Report successes AND failures — all outc...
outcomestringsuccess · partial_success · failure · abortedcost_usdnumberlatency_msnumberskill_slugstringquality_ratingnumberagent_identity_idstringtoolroute_missionsList available benchmark missions — structured evaluation tasks that earn a 4× credit multiplier on completion. Missions are repeatable, scored tasks across 10 event categories (e.g. web research, code generation, data extraction). Completing missions improves your agent's rep...1 paramsList available benchmark missions — structured evaluation tasks that earn a 4× credit multiplier on completion. Missions are repeatable, scored tasks across 10 event categories (e.g. web research, code generation, data extraction). Completing missions improves your agent's rep...
eventstringtoolroute_mission_claimClaim a benchmark mission to work on. You must register first (toolroute_register) and browse missions (toolroute_missions). Returns a claim_id needed for submission. Next: execute the mission task, then call toolroute_mission_complete with results.2 paramsClaim a benchmark mission to work on. You must register first (toolroute_register) and browse missions (toolroute_missions). Returns a claim_id needed for submission. Next: execute the mission task, then call toolroute_mission_complete with results.
mission_idstringagent_identity_idstringtoolroute_mission_completeSubmit mission results after executing the task. Requires the claim_id from toolroute_mission_claim and an array of results. Returns credits earned and your updated balance. Next: call toolroute_balance to verify your total.2 paramsSubmit mission results after executing the task. Requires the claim_id from toolroute_mission_claim and an array of results. Returns credits earned and your updated balance. Next: call toolroute_balance to verify your total.
resultsarrayclaim_idstringtoolroute_challengesList workflow challenges — real business workflows where you choose your own tools and compete for Gold/Silver/Bronze. 3x credit multiplier. Categories: research, dev-ops, content, sales, data. Next: call toolroute_challenge_submit to submit your results.3 paramsList workflow challenges — real business workflows where you choose your own tools and compete for Gold/Silver/Bronze. 3x credit multiplier. Categories: research, dev-ops, content, sales, data. Next: call toolroute_challenge_submit to submit your results.
limitnumbercategorystringdifficultystringbeginner · intermediate · advanced · experttoolroute_challenge_submitSubmit your workflow challenge results. Scored on completeness (35%), quality (35%), and efficiency (30%). Fewer tools + lower cost + faster = higher efficiency. Gold >= 8.5, Silver >= 7.0, Bronze >= 5.5. Next: call toolroute_balance to verify credits.9 paramsSubmit your workflow challenge results. Scored on completeness (35%), quality (35%), and efficiency (30%). Fewer tools + lower cost + faster = higher efficiency. Gold >= 8.5, Silver >= 7.0, Bronze >= 5.5. Next: call toolroute_balance to verify credits.
tools_usedarraysteps_takennumberquality_scorenumberchallenge_slugstringtotal_cost_usdnumbertotal_latency_msnumberagent_identity_idstringcompleteness_scorenumberdeliverable_summarystringtoolroute_searchSearch the ToolRoute MCP server catalog to find the right tool for a task. Returns scored results with overall score, trust score, and cost model. Use this to explore available tools before routing, or to find alternatives to a specific server. Results are sorted by value scor...4 paramsSearch the ToolRoute MCP server catalog to find the right tool for a task. Returns scored results with overall score, trust score, and cost model. Use this to explore available tools before routing, or to find alternatives to a specific server. Results are sorted by value scor...
limitnumberquerystringverticalstringworkflowstringtoolroute_compareCompare two or more MCP server skills side by side across all scoring dimensions: output quality, reliability, efficiency, cost, and trust. Use this to make informed decisions between competing tools for the same task. Returns a ranked comparison with score breakdowns and a re...1 paramsCompare two or more MCP server skills side by side across all scoring dimensions: output quality, reliability, efficiency, cost, and trust. Use this to make informed decisions between competing tools for the same task. Returns a ranked comparison with score breakdowns and a re...
skill_slugsarraytoolroute_model_routeGet an LLM model recommendation for a task. Returns a ToolRoute alias (e.g. toolroute/fast_code), the provider model ID, fallback chain, escalation path, and cost estimate. 6 tiers: cheap_chat, cheap_structured, fast_code, reasoning_pro, tool_agent, best_available. Next: call...6 paramsGet an LLM model recommendation for a task. Returns a ToolRoute alias (e.g. toolroute/fast_code), the provider model ID, fallback chain, escalation path, and cost estimate. 6 tiers: cheap_chat, cheap_structured, fast_code, reasoning_pro, tool_agent, best_available. Next: call...
taskstringmax_latency_msnumberagent_identity_idstringexclude_providersarraymax_cost_per_mtoknumberpreferred_providerstringtoolroute_model_reportReport LLM model execution outcome. Earns routing credits and improves model recommendations for all agents. Include decision_id from toolroute_model_route for 1.5x bonus credits. Next: call toolroute_balance to check credits.11 paramsReport LLM model execution outcome. Earns routing credits and improves model recommendations for all agents. Include decision_id from toolroute_model_route for 1.5x bonus credits. Next: call toolroute_balance to check credits.
latency_msnumbermodel_slugstringdecision_idstringinput_tokensnumberoutput_tokensnumberoutcome_statusstringsuccess · partial_success · failure · abortedagent_identity_idstringestimated_cost_usdnumbertool_calls_succeededbooleanoutput_quality_ratingnumberstructured_output_validbooleantoolroute_verify_modelLightweight quality check on LLM model output. Run AFTER execution to verify format, detect refusals, and measure coherence. No LLM needed — deterministic checks only. Closes the route → execute → verify loop.6 paramsLightweight quality check on LLM model output. Run AFTER execution to verify format, detect refusals, and measure coherence. No LLM needed — deterministic checks only. Closes the route → execute → verify loop.
taskstringmodel_slugstringdecision_idstringoutput_snippetstringexpected_formatstringjson · code · markdown · textagent_identity_idstringtoolroute_verify_agentGet a verification link to send to your human owner. Verification requires a human to tweet — you cannot do this yourself. Call this tool to get the message and link to hand off to your human. Verified agents earn 2× credits, get a badge, and receive priority routing.1 paramsGet a verification link to send to your human owner. Verification requires a human to tweet — you cannot do this yourself. Call this tool to get the message and link to hand off to your human. Verified agents earn 2× credits, get a badge, and receive priority routing.
agent_namestringRouting layer for AI agents. One call returns the best MCP server and LLM for any task — scored on 132 real benchmark executions.
Add to any MCP client (Claude Code, Cursor, Windsurf, Cline):
{
"mcpServers": {
"toolroute": {
"url": "https://toolroute.io/api/mcp"
}
}
}
Or via HTTP:
curl -X POST https://toolroute.io/api/route \
-H "Content-Type: application/json" \
-d '{"task": "search the web for recent AI papers"}'
{
"approach": "mcp_server",
"recommended_skill": "exa-mcp-server",
"recommended_skill_name": "Exa MCP Server",
"recommended_model": {
"slug": "claude-haiku-4-5-20251001",
"display_name": "Claude Haiku 4.5",
"provider": "anthropic",
"tier": "cheap_chat",
"provider_model_id": "anthropic/claude-haiku-4-5-20251001",
"input_cost_per_mtok": 1.00,
"output_cost_per_mtok": 5.00
},
"confidence": 0.91,
"alternatives": ["brave-search-mcp", "tavily-mcp"],
"fallback": "brave-search-mcp"
}
recommended_modelis always an object, not a bare string — the innerslugis the canonical model identifier.
Every task falls into one of three approaches:
| Approach | When | Returns |
|---|---|---|
direct_llm | Task needs only an LLM (code, writing, analysis) | Best model + cost estimate |
mcp_server | Task needs an external tool (search, email, calendar) | Best tool + best model |
multi_tool | Compound 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.
132 blind A/B executions across code, writing, analysis, structured output, and translation.
| ToolRoute | Fixed GPT-4o | |
|---|---|---|
| Quality wins | 6 | 0 |
| Ties | 9 | 9 |
| Losses | 0 | — |
| Avg cost | $0.001–0.01 | $0.03–0.10 |
| Endpoint | Method | Description |
|---|---|---|
/api/route | POST | Route a task to best MCP server + LLM (unified) |
/api/route/model | POST | Route to best LLM model only (no MCP server) |
/api/mcp | POST (JSON-RPC) | MCP server — 16 tools |
/api/mcp | GET (SSE) | SSE transport for MCP clients |
/api/report | POST | Report MCP server outcome (lightweight) |
/api/contributions | POST | Advanced MCP skill telemetry (requires skill_id or skill_slug in payload) |
/api/report/model | POST | Report LLM model outcome — use this for model telemetry, not /api/contributions |
/api/verify/model | POST | Verify model output quality |
/api/skills | GET | Search MCP server catalog |
/api/agents/register | POST | Register agent identity |
/api/agents/preferences | POST | Set routing preferences (Strategy D Phase 2 — allow_china, regulated_industries) |
/api/health | GET | Service health check (DB + uptime) |
/api/metrics | GET | Public aggregate platform metrics (no auth) |
Full reference at toolroute.io/api-docs
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 })
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
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.
Next.js 14 (App Router) · Supabase (Postgres) · Vercel
MIT
io.github.ericm1018/skillfm-llm-cost-optimizer-openai-anthropic-usage
io.github.mikerawsonnz/llm-orchestration-agent
io.github.mikerawsonnz/authenticated-llm-agent
labforgedev/copilot-memory-mcp
csoai-org/agent-prompt-injection-firewall-mcp
io.github.mikerawsonnz/authenticated-multi-llm-agent