audit_context_packing
Analyze full-context payloads to find efficiency, redundancy, and ordering issues, reducing agent costs and latency.
Instructions
Analyzes a representative full-context payload and returns the top 3 findings on context efficiency, redundancy, and ordering. Use this when a user is concerned about agent cost, latency, or quality degradation on long conversations. Accepts either a literal dump of what goes into the context window, or a structured description of the context components and their sizes. Findings cover content inventory, redundancy, freshness, ordering, truncation risk, and prompt-cache utilization.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context_payload | Yes | Either a literal context dump (system prompt + tools + history + retrieved documents as they would appear in an actual API call) OR a structured description like "system prompt: 2400 tokens / tool definitions: 8 tools, ~1800 tokens total / conversation history: last 12 turns, ~6000 tokens / retrieved RAG chunks: top 5, ~3000 tokens." Both formats work; literal dumps produce sharper findings. | |
| context | No | Optional. What kind of agent is this and what is the typical interaction pattern? Single-turn vs. multi-turn, short vs. long conversations, etc. |