Repository navigation
Getting Started
Rakesh Singh edited this page Oct 23, 2026
·
1 revision
pip install toolism # CLI + Python API
pip install "toolism[verify]" # + equivalence verification
pip install "toolism[mcp]" # + read tools straight from an MCP server
pip install "toolism[all]" # everything, incl. Anthropic's exact token counterPython 3.10 or newer.
$ toolism measure tools.jsonOpenAI (Chat and Responses), Anthropic and MCP tool JSON are detected automatically. To read the tools from a live MCP server instead of a file:
$ toolism measure --mcp "npx -y @modelcontextprotocol/server-github"--mcp runs that command exactly as your shell would, so only point it at servers you would run
anyway.
$ toolism slim tools.json -o tools.slim.jsonThe slimmed JSON keeps the input's format and envelope. The report (savings per rule and per
tool) goes to stderr. Add --verify (needs toolism[verify]) to check every changed schema.
$ toolism check tools.json -b .toolism/baseline.json --update-baseline # once, then commit it
$ toolism check tools.json -b .toolism/baseline.json --max-increase 5% # in CISee CI Integration for the GitHub Action and the pre-commit hook.
The default tokenizer (tiktoken:o200k_base) downloads its vocabulary once on first use.
Without network access, use -t heuristic, or download it once and set TIKTOKEN_CACHE_DIR.