Decompose and recompose MCP tool definition JSON schemas. Split large tool inputSchema
trees into addressable chunks (tools, optional properties, enums), then rebuild pruned tool
definitions from survivor lists.
This library is extracted from clear-your-tools and contains only decomposition/recomposition.
- Chunk/Decompose — parse MCP tool definition JSON into addressable chunks (tools, optional properties, enums).
- Cache — write
metadata.jsonand per-chunk files under a catalog directory. - Recompose — rebuild pruned tool definitions from survivor lists.
Published packages
|
|
Rust library and CLI |
|
|
|
Python SDK ( |
|
|
|
TypeScript SDK |
|
|
|
C library via CMake / |
|
|
|
Go SDK via cgo ( |
Install the CLI:
cargo install chunk-your-toolsOr build locally: cargo build -p chunk-your-tools --release.
Library installs:
cargo add chunk-your-tools
pip install chunk-your-tools
npm install chunk-your-toolsTry the bundled walkthrough — decompose a sample tool catalog, then recompose pruned variants:
./examples/decompose.sh
export PATH="$PWD/target/release:$PATH"
./examples/recompose.shSee examples/README.md for survivor formats, output paths, and CLI flags.
| SDK | Path | Docs |
|---|---|---|
| Python | sdk/python |
README |
| TypeScript | sdk/typescript |
README |
| Go | sdk/go |
README |
| C | sdk/c |
README |
| Rust | src |
README |
See DEV.md and run ./scripts/local/dev/workflow.sh all for the full monorepo check.
Apache-2.0 — see LICENSE.