Skip to main content
Glama

cleanup_expired

Removes expired memories based on their TTL and returns the number of deleted entries. Use periodically to maintain a clean memory store.

Instructions

Delete all memories past their ttl. Returns count of deleted memories. Call periodically to keep memory clean.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description bears the full burden. It discloses the action (delete) and return value (count), but does not mention idempotency, permission requirements, or side effects beyond deletion. Adequate but not comprehensive.

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?

Two concise sentences with no waste. Front-loaded with the action and result, then usage advice. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity (zero parameters, no output schema), the description covers the essential behavior. It could mention concurrency or idempotency, but for a cleanup utility it is sufficiently complete.

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?

There are no parameters, so the description cannot add param-level meaning. It effectively communicates the tool's purpose beyond the schema, earning a high score.

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 it deletes all memories past their TTL and returns the count. The verb 'delete' and resource 'memories past their ttl' are specific, and it distinguishes from sibling tools like 'forget' (single memory deletion) by implying batch cleanup.

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?

It advises calling periodically for cleanliness, which is a clear usage context. However, it does not specify when not to use it (e.g., avoid if manual control is needed) or explicitly compare to siblings like 'forget'.

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/donggyun112/keymem'

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