Skip to main content
Glama
M-T-D-N

agentmemory-codex-windows

memory_compress_file

Compress Markdown prose with a configured LLM while preserving headings, URLs, and fenced code blocks. It validates results, writes a .original.md backup, and replaces the source file.

Instructions

Shorten prose in an existing .md file using the configured LLM, validating that headings, URLs and fenced code blocks survive. Requires an enabled LLM provider; noop mode returns disabled. Rejects symlinks and sensitive-looking paths. After validation, writes a sibling backup, normally .original.md (overwriting an existing backup), and replaces the source. Returns source/backup paths and character counts, or a validation/error result. Use for file compression, not durable memory consolidation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to the markdown file to compress

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0-preview.14-glama.1

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses validation behavior, the destructive side effect of overwriting an existing backup, that the source is replaced, and the return shape. Permission/prerequisite and rejection conditions are also stated.

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?

Dense but every sentence carries distinct information; the core action is front-loaded before the caveats and return description. Slightly long, but no sentence is filler.

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?

No output schema and no annotations, yet the description explains return values, failure results, prerequisites, and side effects. Nothing essential for correct invocation is missing.

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?

Only one parameter with 100% schema description coverage, so the schema already documents filePath fully. The description adds no format or path syntax detail beyond what the schema provides; baseline 3 applies.

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?

States a specific verb (shorten/compress prose), specific resource (.md file), and mechanism (configured LLM), and explicitly distinguishes itself from the sibling memory_consolidate with 'Use for file compression, not durable memory consolidation.' An agent can route correctly without opening the schema.

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

Usage Guidelines5/5

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

Gives explicit prerequisites ('Requires an enabled LLM provider'), failure modes (noop mode returns disabled), exclusion conditions (rejects symlinks and sensitive-looking paths), and a named alternative it is not for (durable memory consolidation). When-to-use and when-not-to-use are both covered.

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