Skip to main content
Glama
pozii
by pozii

prune_conversation

Reduce conversation token usage by removing filler turns and compressing older messages, saving 60-80% on long histories.

Instructions

Reduce conversation history token footprint by removing filler turns and compressing older verbose ones. Saves 60–80% on long conversations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messagesYesOpenAI-format list of {"role": "...", "content": "..."} dicts.
max_output_tokensNoTarget total size for the pruned history.
keep_last_nNoAlways preserve the N most recent turns verbatim.
prune_strategyNo"remove" drops low-value turns, "compress" shrinks older turns, "hybrid" does both.hybrid
modelNoUsed for token counting.gpt-4o

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

With no annotations, the description bears full transparency burden. It states actions but doesn't disclose side effects (e.g., irreversibility, potential loss of important messages) or define 'filler turns'. Lacks important behavioral details.

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?

Two concise sentences, front-loaded with action and benefit. No redundant information. Every sentence adds value.

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

Completeness2/5

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

Despite having an output schema, the description doesn't mention what the tool returns (pruned messages). For a tool with 5 parameters and one required array, more context on output and behavior is needed for complete understanding.

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 coverage is 100%, so baseline is 3. The description adds no additional context for parameters beyond their schema descriptions, e.g., does not explain when to use remove vs compress strategies.

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 clearly states the tool reduces token footprint by removing filler turns and compressing verbose ones, with a specific resource (conversation history) and verb (prune). It distinguishes from sibling tools like compress_context by mentioning removal as well, though not explicitly.

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

Usage Guidelines2/5

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

No guidance on when to use vs alternatives (e.g., compress_context, count_tokens). Only implies use for long conversations via the benefit claim, but no when-not or explicit context.

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

Install Server

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/pozii/tokensaver'

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