Skip to main content
Glama

compact_memories

Consolidates historical cross-agent sessions into a dense milestone record to prevent context window bloat in long-running projects.

Instructions

Compact and consolidate historical cross-agent sessions in a workspace into a dense milestone record, preventing context window bloat in long-running projects.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "compact_memories"
  }
}

Input Schema

NameRequiredDescriptionDefault
workspaceNoProject workspace identifier.
max_sessions_to_keepNoNumber of most recent sessions to keep uncompacted (default: 5).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden for what is effectively a lossy consolidation operation. It never says whether the original sessions are deleted, merged, or merely summarized, whether the compaction is reversible, or what permissions are required — all critical for an agent deciding to invoke it.

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 sentence with the action front-loaded and the rationale trailing. Nothing is redundant and every clause contributes either scope, output, or motivation.

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?

The tool is structurally simple (two optional params, no nesting, no output schema), and the description names the output artifact. However, for a consolidation operation with no annotations and no output schema, the omission of irreversibility, data retention, and return-value shape leaves a meaningful gap.

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% and both parameters are documented in-schema, so the baseline is 3. The description only indirectly adds meaning by framing the workspace as a project scope and implying that recent sessions are preserved, but it does not clarify the semantics of max_sessions_to_keep or the default behavior beyond what the schema states.

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 pair (compact/consolidate) and a specific resource (historical cross-agent sessions in a workspace) plus the resulting artifact (a dense milestone record). This is clearly distinct from siblings like delete_memory, update_memory, and export_memory_snapshot, though the description never names those alternatives to reinforce the separation.

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?

The phrase 'preventing context window bloat in long-running projects' implies the situation that calls for this tool, but there is no explicit when-to-use statement, no when-not-to-use condition, and no routing to alternatives such as export_memory_snapshot or delete_memory. Usage is inferable rather than directed.

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