context-pack
Pick context blocks that fit a token budget, keeping mandatory blocks and their dependencies — Chooses which context items an agent should put into a prompt without exceeding a token budget: every mandatory item and everything it depends on is always included, then optional items by descending priority (each with the dependencies it pulls in) while they fit. Token counts come from the caller or from o200k_base / cl100k_base; any other tokenizer name returns unsupported (there is no Claude t
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"items": "<items>",
"budget": "<budget>"
},
"name": "context-pack"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Up to 500 items, 300000 characters of text in total. | |
| budget | Yes | Maximum total tokens (including perItemOverhead per included item). | |
| tokenizer | No | o200k_base or cl100k_base. Any other name (including Claude models) returns status unsupported for items that need counting; caller token counts are always accepted. | |
| perItemOverhead | No | Tokens added per included item for separators or wrappers. Default 0. |