Skip to main content
Glama

gc

Remove or archive low-scoring memories that fall below the forget threshold to prevent database bloat. Supports dry-run preview and configurable limits.

Instructions

Perform garbage collection on low-scoring memories.

Removes or archives memories whose decay score has fallen below the forget threshold. This prevents the database from growing indefinitely with unused memories.

Args: dry_run: Preview what would be removed without actually removing. archive_instead: Archive memories instead of deleting. limit: Maximum number of memories to process (1-10,000).

Returns: Statistics about removed/archived memories.

Raises: ValueError: If limit is out of valid range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
dry_runNo
archive_insteadNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

The description explains that memories are removed or archived based on decay score and describes dry_run and archive_instead parameters. However, it does not disclose that dry_run defaults to true, so a bare call would not actually modify memories despite the description's active phrasing. This is a significant behavioral nuance given there are no annotations to provide safety hints.

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-organized with separate sections for summary, args, returns, and raises. It is concise, with no redundant sentences, and every sentence adds value.

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?

The description covers purpose, parameters, return values, and error conditions, which is sufficient for a tool with an output schema. However, it lacks explicit notes on the default behavior of dry_run and the permanence of deletion, leaving some operational context unclear.

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?

The input schema has no descriptions, but the tool description fully defines each parameter: dry_run ('Preview what would be removed'), archive_instead ('Archive memories instead of deleting'), and limit ('Maximum number of memories to process'). It also documents the return type and ValueError, adding semantic meaning beyond the bare schema.

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 'Perform garbage collection on low-scoring memories' and explains it removes or archives memories below a threshold. This specific verb+resource distinguishes it from siblings like search_memory or promote_memory.

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 provides context by stating that GC 'prevents the database from growing indefinitely with unused memories,' indicating when it should be used. However, it does not explicitly compare to alternatives like consolidate_memories or promote_memory, so it lacks explicit when-not-to-use guidance.

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/fastmcp-me/cortexgraph'

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