Skip to main content
Glama

Maintain memory

maintain
Destructive

Enforce memory retention policies by deduplicating near-duplicates, capping records, removing low-value memories, and applying age-based TTL without LLM cost. Returns an audit of deletions.

Instructions

Run a no-LLM memory-maintenance pass and return the deletion audit.

Bounds storage and keeps recall clean without sending anything to an LLM — the enterprise retention / "right to be forgotten" lever, with a full audit of exactly what was removed:

  • consolidate_threshold: if > 0, dedup near-duplicate restatements at this cosine (e.g. 0.95).

  • max_records: if > 0, forget the lowest-value tail until at most this many remain.

  • min_value: if > 0, forget every (non-durable, unprotected) memory scoring below this value.

  • ttl: age-based retention, "kind=days" comma list (e.g. "chat=30,note=90"); empty uses the server's MIDAS_MCP_TTL. User-confirmed/standing records and supersession chains never expire. Durable memories (facts/preferences/constraints, high importance) and supersession chains are never dropped. Returns counts and the ids removed (auditable).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ttlNo
min_valueNo
max_recordsNo
consolidate_thresholdNo
Behavior5/5

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

Annotations already indicate destructiveHint=true and readOnlyHint=false. The description adds that durable memories and supersession chains are never dropped, and explains parameter effects on what gets removed. It also mentions the return format (counts and ids), providing transparency beyond annotations.

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?

The description is well-structured, starting with the core action, then a high-level purpose, followed by a parameter list with clear explanations. Every sentence adds value without redundancy.

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?

Given no output schema, the description mentions the return of counts and ids. All parameters are fully described. The tool's role as a maintenance pass and its relation to retention policies is complete. No gaps are evident.

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

Parameters5/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 explain parameters. It does so thoroughly: ttl with default and special cases, min_value, max_records, and consolidate_threshold. Each parameter's effect and default behavior are clearly stated.

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?

The description clearly states the tool runs a no-LLM memory-maintenance pass and returns a deletion audit. It distinguishes from sibling tools like forget by emphasizing it bounds storage without LLM involvement. The title 'Maintain memory' aligns well.

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

Usage Guidelines4/5

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

The description positions the tool as an enterprise retention / 'right to be forgotten' lever, implying use for memory cleanup without LLM cost. It says it 'bounds storage and keeps recall clean,' providing context on when to use. However, it does not explicitly contrast with specific sibling tools beyond this.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vornicx/Midas'

If you have feedback or need assistance with the MCP directory API, please join our Discord server