Skip to main content
Glama

keep_context

Evaluate context items against your goal and budget to decide which to retain verbatim, dropping the rest in a single call.

Instructions

Decide which pieces of context still earn their place, in one call.

Nothing is rewritten or summarised. Each item is kept verbatim or dropped, because a summary silently loses the exact path or error you needed later.

items: the context pieces, usually tool calls and their results. goal: what the agent is trying to finish. budget: the share to keep when scores are close. 0.5 keeps half.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYes
itemsYes
budgetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden, and it does so well: it states that nothing is rewritten or summarized, items are kept verbatim or dropped, and explains why—'a summary silently loses the exact path or error you needed later.' It does not discuss side effects or edge cases, but the core behavior is transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short, front-loaded with the purpose, and every sentence earns its place: purpose, behavioral guarantee, rationale, and parameter semantics. There is no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter tool with an output schema available, the description covers the action, the key behavioral guarantee, and all parameter meanings. The main gap is explicit guidance on when to use this tool versus its siblings, which keeps it from being fully complete in context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description compensates by explaining all three parameters: items, goal, and budget. The explanations add real meaning, especially 'usually tool calls and their results' and '0.5 keeps half,' though budget's phrase 'when scores are close' is slightly ambiguous.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action—deciding which context items to keep—and clarifies the outcome: 'Each item is kept verbatim or dropped.' It clearly distinguishes this from a summarization or rewriting operation, though it does not name a sibling tool explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage through phrases like 'in one call' and 'when scores are close,' but it offers no explicit when-to-use guidance, prerequisites, or alternatives among sibling tools. An agent would have to infer when keep_context is preferable to rank_options or check_action.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.