ToolRecall Reference
CLI commands, architecture, adapters, platform support, FAQ, and contributing guide.
CLI Reference
$ toolrecall setup Creates config, starts daemon, begins caching
$ toolrecall status Shows cache stats: hit rate, unique files, context savings
$ toolrecall shim --install Installs .pth shim for transparent open()/subprocess interception
$ toolrecall shim --remove Removes the .pth shim
$ toolrecall reset Clears all caches and resets daemon state
$ toolrecall config set <key> <value> Set config (path allowlist, terminal TTLs)
$ toolrecall config show Print current config
Architecture
Cache Layers
File cache: mtime-based invalidation. Read once from disk → served from memory forever. 99.3% hit rate.
Terminal cache: TTL-based, configurable allowlist. ~8 static commands cached.
MCP cache: Result caching for slow/idempotent external calls (search, fetch, docs).
Forward proxy: Request-body hash. Byte-identical requests skip the API entirely.
Context Tracker
In-memory dirty/clean tracking. Files read via cached_read() tracked as clean. Files written via cached_write()/cached_patch() marked dirty. Checkpoint-based — resets between sessions.
Adapters
Any MCP-capable agent can use ToolRecall. No SDK changes, no plugins.
| Agent | Integration | Notes |
|---|---|---|
| Hermes Agent | toolrecall.client (pip install toolrecall) | Full API: cached_read, context tracker |
| Claude Code | MCP stdio | Point to toolrecall MCP bridge |
| Cursor | .cursor/mcp.json | Add toolrecall as MCP server |
| Cline | cline_mcp_settings.json | Same pattern |
| OpenCode | MCP config | Same pattern |
Platform Support
| Platform | Status |
|---|---|
| Linux (x86_64) | ✅ Supported |
| macOS (ARM64) | ✅ Supported |
| macOS (x86_64) | ✅ Supported |
| Windows | ⚠ WSL2 recommended |
| Docker | ✅ Supported |
FAQ
Does ToolRecall replace provider prefix caching?
No — complementary. ToolRecall reduces what you send. Provider caching discounts what you're billed. Together: lower latency + lower cost.
Does it work offline?
Yes. File cache, terminal cache, MCP bridge — all offline. Only the forward proxy needs an API endpoint.
Does it slow down first reads?
First read is ~2× slower than bare subprocess (IPC + SQLite write). Every repeat read is ~0.6ms — ~1000× faster than a subprocess fork.
How do I share one daemon across agents?
Run toolrecall setup once. All agents on the same machine connect to the same UDS. MCP multiplexer pools servers across sessions.
Is there a warm-up command?
No. First read after daemon start is always a cache miss. Benefit materializes on repeat reads within the session.
Contributing
MIT licensed. Open source at github.com/whiskybeer/toolrecall.
- Issues, PRs, feature requests welcome
- Benchmark suite in
bench/ - Docs in
docs/on GitHub