Skip to main content
Glama

purge_memories

Selectively delete memories from LanceDB by type, scope, or age. Preview deletions with dry_run before permanent removal.

Instructions

Selective bulk delete of memories by type, scope, or age.

Removes matching rows from LanceDB permanently. Always use dry_run=True first to preview what would be deleted — this is irreversible.

Read-only: no. Irreversibly removes rows from LanceDB. At least one filter is required to prevent accidental full-table deletion.

Args: scope: Only delete memories in this scope (e.g. 'proj:abc123'). type: Only delete memories of this type — 'episodic', 'semantic', or 'permanent'. older_than_days: Only delete memories older than N days. dry_run: If True, preview count without deleting (default False). Always test with dry_run=True first.

Returns: dict: If dry_run: {'dry_run': True, 'current_total': , 'filters': {...}}. If executed: {'ok': True, 'deleted': , 'remaining': }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoOnly delete memories in this scope.
typeNoOnly delete memories of this type: 'episodic', 'semantic', or 'permanent'.
older_than_daysNoOnly delete memories older than N days.
dry_runNoIf True, preview what would be deleted without actually deleting. Always test with True first.
Behavior5/5

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

No annotations provided, so description carries full burden. Clearly states deletion is permanent and irreversible, uses strong language ('irreversibly', 'permanently'), and emphasizes safety with dry_run.

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?

Well-structured with overview, safety warnings, parameter list, and return format. No fluff; every sentence contributes essential information.

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 complexity (destructive bulk delete with multiple filters), the description is comprehensive. Covers purpose, usage, parameters, return values, and safety. No output schema but return values are described.

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?

Schema coverage is 100% (baseline 3). Description adds value by listing parameter examples and constraints: e.g., type values 'episodic', 'semantic', 'permanent'; emphasizing dry_run for preview. Improves over schema alone.

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?

Clearly states it is a selective bulk delete of memories by type, scope, or age. Distinguishes from siblings like delete_memory (likely single deletion) and forget (different mechanism). Verb 'purge' is specific.

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?

Explicitly instructs to use dry_run=True first and warns that deletion is irreversible. Notes that at least one filter is required to prevent full-table deletion. Does not explicitly compare to siblings but context is clear.

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/turbyho/mem-context'

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