pi-anthropic-tool-search
May 12, 2026 · View on GitHub
Anthropic native tool-search extension for the pi coding agent.
This package is the standalone extraction of senpi's former builtin anthropic-tool-search extension.
Behavior
The extension does not register new local tools. It intercepts Anthropic requests and conditionally adds native Anthropic tool-search tools based on PI_ANTHROPIC_TOOL_SEARCH.
Supported modes:
off(default): no changesregex: injecttool_search_tool_regexbm25: injecttool_search_tool_bm25both: inject both tools
Function-style variants with the same names are stripped when native types are not used. Invalid env values are treated as off; the extension emits one warning notification per session for invalid values.
It also appends a system-prompt section for Anthropic sessions when tool search mode is enabled.
Installation
The package targets the pi coding agent. Pi loads extensions from ~/.pi/agent/extensions/, project .pi/extensions/, or via the --extension / -e CLI flag.
# From npm (once published)
pi install npm:pi-anthropic-tool-search
# From git
pi install git:github.com/code-yeongyu/pi-anthropic-tool-search
# Manual placement
git clone https://github.com/code-yeongyu/pi-anthropic-tool-search ~/.pi/agent/extensions/pi-anthropic-tool-search
cd ~/.pi/agent/extensions/pi-anthropic-tool-search && npm install
# Dev / one-shot test
pi -e /path/to/pi-anthropic-tool-search/src/index.ts
After installation, restart pi or run /reload inside an interactive session.
Development
npm install
npm test
npm run typecheck
npm run check
pi -e ./src/index.ts
The test suite uses vitest. TypeScript is strict, Node-only, and uses ESM imports with .js suffixes.
Origin
Ported from packages/coding-agent/src/core/extensions/builtin/anthropic-tool-search/index.ts in code-yeongyu/senpi-mono.
License
MIT.
Related
- senpi — the fork/runtime these extensions are extracted from.
- Ultraworkers Discord — community link from the senpi README.
- Dori — the product powered by senpi under the hood.