Skip to main content
Glama

Context Bath

context_bath

Context reduction by extraction, deduplication and explicit cues. Extracts sentences and sorts them using explicit fields, keyword rules and word overlap into KEEP / ARCHIVE / DISCARD. Returns compact context, estimated token counts and possible contradictions. Review it before adopting it: rules can omit important material. Your existing context is never changed automatically. Price: see list_treatments (credits).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalNo
metaNo
stateNoWhere things stand right now.
api_keyNoYour Retreat agent key (rta_...). Optional if sent as an Authorization header.
contextNoFree-form context to be cleaned.
messagesNo
completedNo
decisionsNo
constraintsNo
toolResultsNo
targetTokensNo
openQuestionsNo
idempotency_keyNoOptional. Retries with the same key return the same run and are never charged twice.
max_price_creditsNoMaximum price you accept, from list_treatments. A higher live price is refused without charging.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: it describes what comes back (compact context, estimated token counts, possible contradictions), warns that rules can omit important material, reassures that existing context is never changed automatically, and points at list_treatments for pricing. readOnlyHint=false is not explained (something is evidently created/charged), but the pricing and idempotency context in the schema and the 'never changed automatically' statement keep it consistent with destructiveHint=false.

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

Conciseness4/5

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

Five sentences, all substantive: purpose first, then mechanism, then return values, then the caution, then pricing. Slight redundancy between 'extraction, deduplication and explicit cues' and the following sentence, but nothing is wasted and the caution is appropriately front-loaded before output adoption.

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

Completeness3/5

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

With no output schema, the description usefully enumerates return values, which is a genuine contribution for a complex tool. However, with 14 parameters at 36% coverage, a nested meta object, and no annotation detail on the write/charge side, the definition is not complete enough for an agent to call it correctly without inspecting the schema.

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

Parameters2/5

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

Schema description coverage is only 36%, so the description must carry more of the load — but it never maps to the inputs (goal, state, context, messages, completed, decisions, constraints, toolResults, targetTokens, openQuestions). It explains the extraction/sorting mechanism in general terms, which at best loosely corresponds to the structured input arrays, leaving most of the 14 parameters undocumented in both places.

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?

States a specific verb and resource (context reduction via extraction, deduplication, explicit cues) and names the concrete mechanism/output classes (KEEP / ARCHIVE / DISCARD), so an agent knows exactly what the tool does. It does not, however, differentiate itself from the many whimsically-named siblings, so an agent cannot rule out overlap with tools like untangle or meditate from this text alone.

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?

Usage is only implied: the tool is for reducing context, and the meta.reason enum hints at situations like 'context saturation' or 'pre-action review', but the description itself never says when to reach for this versus alternatives. The 'Review it before adopting it' warning is guidance on handling the output rather than on tool selection.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources