Skip to main content
Glama

cleanup_expired

Find and optionally delete expired memories; use dry-run mode to preview candidates before permanent removal.

Instructions

Find and optionally delete expired memories.

Args: dry_run: If true (default), only lists expired memories without deleting. Set to false to actually delete.

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": "cleanup_expired"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full load: it correctly discloses that the tool mutates data when dry_run=false and that it is safe by default. It omits irreversibility of deletion, any permission requirements, and the scope/criteria for 'expired', which matter for a destructive operation.

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?

Two short sentences, front-loaded with the action and immediately followed by the safety-critical parameter rule. The 'Args:' docstring formatting is slightly mechanical but costs nothing.

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?

An output schema exists, so return-value explanation is unnecessary, but the definition of 'expired' and the consequences of deletion are left undefined for an unannotated destructive tool. The safety default is covered; the destructive semantics are not fully.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must define the single parameter, and it does: both true and false behaviors are stated along with the default. It stops short of saying what happens to non-expired memories or whether a preview is required before deletion.

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 ('find and optionally delete') and a specific resource ('expired memories'), which is far more informative than the sibling delete_memory's implied scope. It does not explicitly contrast itself with delete_memory or find_duplicates, so the distinction (bulk, expiry-based cleanup) must be inferred.

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 description gives a clear usage rule for dry_run (default true = list only, false = delete), which implicitly tells the agent to preview first. However, it never says when to prefer this over delete_memory or find_duplicates, nor what qualifies a memory as 'expired'.

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