fit_context
Shrink long text, logs, or tool output to a token budget while preserving parts relevant to a query in original order; text that already fits is unchanged.
Instructions
Shrink a long text (a document, log or tool output) to a token budget, keeping the parts that answer the query, in their original order. Text that already fits comes back unchanged.
Args:
text: The text to shrink.
budget: Most tokens to return.
query: Optional question; the parts that answer it are kept first.
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": {
"text": "<text>"
},
"name": "fit_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| query | No | ||
| budget | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |