ToolRouter Gateway
One skill to rule them all. ToolRouter provides 150+ tools (competitor research, vulnerability scanning, video generation, web scraping, etc.). This skill makes them feel like native OpenClaw tools.
How It Works
- 1. Discovery — Fetches ToolRouter's tool catalog (cached 24h)
- Dynamic Tools — Each ToolRouter tool becomes
toolrouter_<slug> in your registry - Proxy — All calls go to
https://api.toolrouter.com/mcp with your API key - Caching — Responses cached by input hash (TTL configurable)
- Usage Tracking — Counts calls per tool, shows in status
Prerequisites
- - ToolRouter API key (get at https://toolrouter.com — auto-provisioned on first use)
- Set environment variable: INLINECODE2
Tools
toolrouter_discovery
Search the catalog:
CODEBLOCK0
Returns list of available tools with:
- -
slug — use in tool name (toolrouter_<slug>) - INLINECODE5 , INLINECODE6
- INLINECODE7 — JSONSchema for the tool
- INLINECODE8 ,
pricing (cost per call)
toolrouter_status
CODEBLOCK1
Returns:
CODEBLOCK2
Dynamic Tools (examples)
Once catalog is fetched, you can call any ToolRouter tool:
CODEBLOCK3
Tool names are derived from ToolRouter slugs (replace hyphens with underscores, add toolrouter_ prefix). The toolrouter_discovery tool tells you which slugs exist.
Configuration
Optional toolrouter-gateway-config.json:
CODEBLOCK4
Caching
- - Cache key: SHA256 of tool name + input JSON
- Stored in INLINECODE13
- Reduces cost and improves speed for repeated calls
- Can be cleared manually if needed
Usage Tracking
All calls logged to memory/toolrouter-usage.jsonl:
CODEBLOCK5
INLINECODE15 aggregates these.
Error Handling
- - API down → returns cached response if available, else error
- Rate limits → exponential backoff retry (3 attempts)
- Invalid tool →
discovery tool will reflect removal from catalog
MCP Integration
The gateway can also run as an MCP server (experimental):
CODEBLOCK6
Other MCP clients can then connect and use all ToolRouter tools as MCP resources.
Pricing
$49/month. Includes:
- - Unlimited tool calls (you pay ToolRouter usage separately; most tools cost fractions of a cent)
- Caching reduces your ToolRouter bill
- Usage analytics
- Priority support
You need your own ToolRouter API key (free tier available).
FAQ
Q: Do I pay per ToolRouter call?
A: Yes, ToolRouter charges per call (typically $0.001–$0.05). Our caching minimizes costs.
Q: Can I add my own tools to ToolRouter?
A: ToolRouter is a separate service; contact them for custom integrations.
Q: What if a tool is flaky?
A: Check toolrouter_status for error rates. Cache helps smooth failures.
Q: Is there a free trial?
A: Not yet. But ToolRouter has a free tier with limited calls.
Inspired by ClawHub's toolrouter skill, extended with caching, usage tracking, and native tool manifests.
ToolRouter 网关
一统所有技能。ToolRouter 提供150多种工具(竞品研究、漏洞扫描、视频生成、网页抓取等)。本技能让它们如同原生OpenClaw工具般自然。
工作原理
- 1. 发现 — 获取ToolRouter的工具目录(缓存24小时)
- 动态工具 — 每个ToolRouter工具在注册表中成为toolrouter_格式
- 代理 — 所有调用通过您的API密钥发送至https://api.toolrouter.com/mcp
- 缓存 — 根据输入哈希缓存响应(TTL可配置)
- 用量追踪 — 统计每个工具的调用次数,在状态中显示
前置条件
- - ToolRouter API密钥(在https://toolrouter.com获取 — 首次使用自动配置)
- 设置环境变量:TOOLROUTERAPIKEY=your_key
工具
toolrouter_discovery
搜索目录:
json
{
query: competitor,
category: research,
limit: 10
}
返回可用工具列表,包含:
- - slug — 在工具名称中使用(toolrouter)
- name、description
- inputschema — 工具的JSONSchema
- category、pricing(每次调用成本)
toolrouter_status
json
{}
返回:
json
{
api_connected: true,
cacheageminutes: 12,
total_calls: 147,
calls_today: 23,
enabled_tools: 42,
errorslast24h: 0
}
动态工具(示例)
获取目录后,即可调用任意ToolRouter工具:
python
竞品研究
tool(toolrouter-gateway, toolrouter
competitorresearch, {
url: https://example.com,
depth: full
})
漏洞扫描
tool(toolrouter-gateway, toolrouter
securityscan, {
target: https://myapp.com,
checks: [cve, misconfig]
})
视频生成
tool(toolrouter-gateway, toolrouter
videofrom_brief, {
brief: 30s product demo for OpenClaw Memory Stack,
style: modern
})
工具名称源自ToolRouter的slug(将连字符替换为下划线,添加toolrouter前缀)。toolrouterdiscovery工具会告知您存在哪些slug。
配置
可选的toolrouter-gateway-config.json:
json
{
api_url: https://api.toolrouter.com/mcp,
cachettlminutes: 1440,
usagelogfile: memory/toolrouter-usage.jsonl,
enable_caching: true,
timeout_seconds: 60
}
缓存
- - 缓存键:工具名称 + 输入JSON的SHA256哈希
- 存储在memory/toolrouter-cache.jsonl
- 降低重复调用成本并提升速度
- 可按需手动清除
用量追踪
所有调用记录到memory/toolrouter-usage.jsonl:
json
{timestamp:2026-04-01T17:40:00Z,tool:competitorresearch,inputhash:abc123,cost:0.005}
toolrouter_status会汇总这些数据。
错误处理
- - API宕机 → 如有缓存则返回缓存响应,否则返回错误
- 速率限制 → 指数退避重试(3次尝试)
- 无效工具 → discovery工具将反映目录中已移除
MCP集成
该网关也可作为MCP服务器运行(实验性):
bash
启动MCP服务器(stdio)
toolrouter-gateway --mcp
其他MCP客户端可连接并使用所有ToolRouter工具作为MCP资源。
定价
$49/月。包含:
- - 无限工具调用(您单独支付ToolRouter使用费;大多数工具每次调用成本不足一分钱)
- 缓存降低您的ToolRouter账单
- 用量分析
- 优先支持
您需要自己的ToolRouter API密钥(提供免费套餐)。
常见问题
问:每次ToolRouter调用都要付费吗?
答:是的,ToolRouter按调用收费(通常$0.001–$0.05)。我们的缓存可最大限度降低成本。
问:我可以将自己的工具添加到ToolRouter吗?
答:ToolRouter是独立服务;请联系他们进行自定义集成。
问:如果某个工具不稳定怎么办?
答:查看toolrouter_status的错误率。缓存有助于平滑故障。
问:有免费试用吗?
答:暂时没有。但ToolRouter提供有限调用的免费套餐。
灵感源自ClawHub的toolrouter技能,扩展了缓存、用量追踪和原生工具清单功能。