Chunk Your Tools
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 — no BM25, proxy, or agent integration.
Install
| Channel | Package | Import |
|---|---|---|
| Rust crate | chunk-your-tools |
chunk_your_tools |
| PyPI | chunk-your-tools |
chunk_your_tools |
| npm | chunk-your-tools |
chunk-your-tools |
| Go | github.com/qdrddr/chunk-your-tools/sdk/go |
chunkyourtools |
| C | libchunk_your_tools |
chunk_your_tools.h |
CLI:
CLI
Decompose
Writes decomposed JSON/Markdown chunks under ./catalog/schemas/decomposed/.
Recompose (in-memory)
No catalog directory is required — decomposition runs in memory.
Survivors format (semantic names)
tools: tool IDs/names to keep (omitted tools are dropped)properties: per-tool optional property names (required properties always survive; use dotted paths for nested optionals, e.g."config.timeout")enums: enum value names to keep
Legacy {json, md} chunk lists (with file_path) are also accepted for integration with
clear-your-tools pruners.
Library (Rust)
use ;
use json;
let tools = vec!;
let survivors = from_value.unwrap;
let ctx = new;
let recomposed = recompose_tools_from_names;
SDKs
| SDK | Path | Docs |
|---|---|---|
| Python | sdk/python |
README |
| TypeScript | sdk/typescript |
README |
| Go | sdk/go |
README |
| C | sdk/c |
README |
Development
See DEV.md and run ./scripts/local-dev.sh all for the full monorepo check.
License
Apache-2.0