prepare_context
Formats institutional memory into compact or gate payloads for injecting context into sub-agents, enabling agents to recall past decisions and patterns during task execution.
Instructions
Generate portable memory payload for sub-agent injection. Formats institutional memory into compact or gate payloads that fit in Task tool prompts.
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": {
"plan": "<plan>",
"format": "<format>"
},
"name": "prepare_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | Yes | What the team is about to do (e.g., 'review auth middleware', 'deploy edge function') | |
| format | Yes | Output format: full (rich markdown), compact (~500 tokens, one-line per scar), gate (~100 tokens, blocking scars only) | |
| project | No | Project namespace (e.g., 'my-project'). Scopes sessions and searches. | |
| agent_role | No | Sub-agent role for relevance filtering (e.g., 'reviewer', 'deployer') — reserved for Phase 3 | |
| max_tokens | No | Token budget for payload (default: 500 for compact, 100 for gate, unlimited for full) |