Skip to main content
Glama

cortical_compress

Read-onlyIdempotent

Compress JSON, XML, YAML, or verbose logs losslessly and deterministically to reduce token size, with automatic format detection and compact fallback.

Instructions

Deterministically compress JSON (to lossless TOON with compact fallback), XML, or verbose logs.

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": {
      "text": "<text>"
    },
    "name": "cortical_compress"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesRaw JSON, XML, YAML, or verbose log text to compress deterministically without losing information.
formatNoInput payload format hint; use auto to detect JSON, XML, YAML, or logs automatically.auto

Output Schema

NameRequiredDescriptionDefault
compressedYes
saving_pctNo
format_usedYes
raw_tokens_estNo
compressed_tokens_estNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

TDQS

B3.3/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 adds two genuinely non-annotated behavioral claims — 'deterministically' and 'lossless' — plus a vague 'compact fallback' path. It does not disclose what triggers the fallback, whether output can be larger than input, or any size limits.

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?

A single front-loaded sentence with no filler; the verb and resources come first. The parenthetical is dense but carries real information about the output encoding and fallback behavior.

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?

Because an output schema exists, return values need not be explained. However, for a compression tool the description leaves important gaps: what 'compact fallback' means operationally, whether compression is bounded by size, and why YAML is supported by the schema but absent from the description. Adequate but with clear holes.

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 both parameters (text and format, including the enum and auto-detection) are fully documented in the schema. The description adds no format details beyond it and actually omits YAML, which the schema's enum and text description both support — a minor inconsistency rather than a gain.

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 ('compress') with a concrete set of resources (JSON, XML, verbose logs) and names the output form (lossless TOON with compact fallback). An agent can immediately tell this is a compression utility, and no sibling in the list performs compression, so differentiation is implicit rather than stated.

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 or when-not-to-use guidance, no mention of alternatives, and no statement of prerequisites such as size limits or calling context. The only implied usage comes from the word 'verbose', which hints at token-reduction scenarios but never says so.

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