Skip to main content
Glama

brain_prune

Destructive

Remove stale or deprecated memories to prevent outdated context from polluting recalls. Optionally run full git-based invalidation to detect modified or deleted files before pruning.

Instructions

Clean up stale or deprecated memories from the brain. Run this after major refactors to prevent outdated context from polluting recalls. Optionally runs the full git-diff invalidation pass to detect modified/deleted files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoWhich memories to remove.stale
run_invalidationNoIf true, run the full git-based stale detection pass first.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.1.0

TDQS

A4.1/5.0
Behavior4/5

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

The description discloses the mutating nature by saying 'clean up' and 'remove,' matching the destructiveHint annotation. It also adds useful context beyond the annotations by explaining the optional git-diff invalidation pass that detects modified/deleted files.

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 compact and front-loaded: it states the core purpose in the first sentence and provides the key usage trigger in the second. Every sentence earns its place with no redundant detail.

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 the tool's low complexity (2 optional parameters, no output schema) and the destructiveHint annotation, the description is complete enough for an agent to invoke it correctly. It covers what is removed, when to run it, and the optional invalidation behavior.

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 the schema already documents both parameters. The description adds modest context by elaborating on the invalidation pass as git-diff based, but it does not substantially expand parameter meaning beyond what the schema provides.

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?

The description clearly states a specific verb ('clean up'), resource ('memories'), and scope ('stale or deprecated'). It does not explicitly differentiate from sibling brain_forget, but the stale/deprecated framing and git invalidation context make the role reasonably distinct.

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 gives explicit timing guidance: 'Run this after major refactors.' It explains the benefit of preventing outdated context from polluting recalls, but it does not explicitly state when to prefer brain_forget or other alternatives.

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

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/cosmiccoder200x-sys/local-brain-mcp'

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