Skip to main content
Glama

Prune Events

prune_events
Destructive

Prune old event logs by age, keeping only the latest event per entity. Specify a duration (e.g., '30d') to delete obsolete records and keep workflow state memory focused.

Instructions

Prune old event log entries older than a specified duration, preserving the latest event for each entity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoPreview the count of events to be deleted without modifying the DB. Defaults to true.
projectNoOptional project identifier.
older_thanYesPrune events older than this duration, e.g., "30d", "90d".
preserve_typesNoEvent types that should never be pruned.
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is known. The description adds the useful behavioral context about preserving the latest event per entity, but it does not mention the dry_run parameter's default behavior (defaults to true), which is critical for understanding immediate impact. Since dry_run is documented in the schema, the description's omission is a minor gap.

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 a single, tightly worded sentence that conveys the core action, condition, and an important behavioral nuance. There is no redundant or filler content; it earns its place.

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?

For a destructive tool with four parameters and no output schema, the description is adequate but not rich. It explains the core behavior but does not mention return values, the fact that dry_run defaults to true, or the availability of preserve_types to exempt certain events. The schema partially compensates, but the description could have been more complete for a destructive operation.

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%, so all four parameters (older_than, dry_run, project, preserve_types) are already well-described in the schema. The description only indirectly references older_than ('specified duration') and offers no extra semantic detail about parameters beyond what the schema provides. Baseline 3 applies.

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 uses a specific verb ('Prune') with a clear resource ('old event log entries') and a condition ('older than a specified duration'). It also adds a distinctive nuance ('preserving the latest event for each entity') that differentiates it from similar siblings like auto_prune_stale_tasks or archive_completed_nodes.

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

Usage Guidelines2/5

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

No guidance is given about when to use this tool versus alternatives such as get_event_log, auto_prune_stale_tasks, or compact_graph. The description implies its purpose but does not state explicit use cases, exclusions, or when not to use it.

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/putervision/state-memory-mcp'

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