Skip to main content
Glama

compress_context

Read-only

Extract state deltas from conversation history to compress verbose context, preserving only facts relevant to your objective. Reduces token usage by 74-91% for efficient AI processing.

Instructions

Compresses verbose conversation history by extracting state deltas (74.2% - 91.5% token reduction).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
raw_contextYesFull unstructured text, dialogue transcript, or JSON context requiring state compression.
intent_focusNoTarget focus anchor preserving only causal facts relevant to this objective.
aggressive_modeNoWhether to strip all decorative conversational markers and preserve solely mathematical and functional deltas.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_hashYesCryptographic hash of the state transition.
original_char_countNoCharacter length of input context.
reduction_percentageYesNet token saving percentage achieved.
compressed_char_countNoCharacter length of compressed delta representation.
compressed_delta_textYesCausally compressed state delta text.
estimated_original_tokensNoEstimated token count of original context.
estimated_compressed_tokensNoEstimated token count of compressed state.
Install Server

TDQS

A4.3/5.0
Behavior4/5

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

The description goes beyond the readOnlyHint annotation by disclosing the compression mechanism and the expected reduction range (74.2%–91.5%). It also implies that non-state-delta content is discarded, which is useful behavioral context, though it could more explicitly state that the operation is lossy or irreversible.

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 a single, information-dense sentence with no filler. It front-loads the primary action and includes a measurable outcome, making every word valuable.

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

Completeness5/5

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

The output schema covers return structure, annotations cover mutation safety, and the schema fully documents all three parameters. For a straightforward compression tool, the one-sentence description plus structured metadata is sufficient for an agent to select and invoke it correctly.

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

Parameters3/5

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

Schema description coverage is 100%, with each parameter already documented in the input schema. The description adds no param-specific detail, so the baseline score of 3 is appropriate.

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

Purpose5/5

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

The description uses a specific verb ('Compresses'), names the resource ('verbose conversation history'), and explains the mechanism ('extracting state deltas'). The token-reduction range adds concrete clarity and differentiates it clearly from sibling tools like evaluate_fdia or orchestrate_swarm.

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

Usage Guidelines4/5

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

The phrase 'verbose conversation history' provides clear context for when this tool applies. It does not explicitly state when not to use it or mention alternatives, but no sibling tool serves the same compression purpose, so the omission is minor.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/delentia-labs/delentia-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server