Skip to main content
Glama

API Keg — Context Crush (Transcript, Email & Workspace Compactor)

De-duplicate Email Thread & RFC 5322 .eml

compact_email_thread
Read-onlyIdempotent

Decodes raw RFC 5322 .eml MIME messages (multipart/alternative, quoted-printable, base64) or pasted reply chains, strips O(N^2) repeated quoted history, mobile signatures, and legal disclaimers, and outputs chronological Markdown. Pricing: $0.001 base (up to $0.005 max ($0.001 base + $0.0005 per 50KB of input, capped at $0.005 for payloads up to 2MB), x402 variable settlement). Pass ?dry_run=true on REST to validate schema free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "content": "<content>"
    },
    "name": "compact_email_thread"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesRaw RFC 5322 .eml MIME message (multipart/alternative, quoted-printable, base64) or pasted multi-reply email thread.
stripSignaturesNoStrip mobile/client footers ('Sent from my iPhone', 'Get Outlook for iOS') and RFC 3676 '-- ' tails.
stripDisclaimersNoStrip standard corporate confidentiality and legal disclaimer footer blocks.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description does add cost behavior, a 2MB input ceiling tied to the schema maxLength, and the fact that output is Markdown, which annotations cannot convey. The pricing sentence is tangled and self-nesting, and the dry_run RPC parameter appears nowhere in the schema, which risks confusing an agent.

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

Conciseness3/5

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

The purpose clause is front-loaded and earns its place. The pricing sentence, however, buries the cap information inside nested parentheses with a redundant '$0.001 base' repeated three times, which is hard to parse. Trimming that block would tighten the definition without losing signal.

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?

There is no output schema, so the description usefully states that output is chronological Markdown, and it names the input ceiling. Combined with fully described parameters and safety annotations, an agent has nearly everything needed. Missing only edge-case behavior such as what happens to a single-message thread with no quoted history.

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%, so the schema already explains content, stripSignatures and stripDisclaimers in detail. The prosaic mention of stripping signatures and legal disclaimers merely restates what the parameter descriptions say. Baseline 3 applies since the description adds no format or edge-case detail beyond the schema.

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 names a specific verb and resource – decodes RFC 5322 .eml MIME messages or pasted reply chains, strips quoted history, signatures and disclaimers, and outputs chronological Markdown. It is unambiguous about what the tool does. It never distinguishes itself from compact_transcript or compact_workspace_export, so it stays at 4.

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?

There is no explicit when-to-use statement, no exclusion for inputs this tool cannot handle (non-email text, attachments-only messages), and no routing to the sibling transcript or workspace-export tools. The listing of accepted input formats implies usage but does not guide selection. The only hint is an aside about passing dry_run on REST, which is not actionable for an MCP caller.

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