compact_context
Assemble minimal token-efficient context for any concept, entity, or file by combining function body, structural summary, domain concepts, and logic cluster into a compact text block for LLM prompt injection.
Instructions
Assemble minimal, token-efficient context for a concept, entity, or file — combines function body + structural summary + domain concepts + logic cluster into a compact text block suitable for LLM prompt injection. Much smaller than full source while preserving behavioral and structural information. Use when assembling context for another LLM, when asked to 'summarize X compactly', or when building prompts about codebase entities.
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": {
"scope": "<scope>"
},
"name": "compact_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes | Concept name, entity name, or file path | |
| max_tokens | No | Token budget (default: 500) |