Skip to main content
Glama

knowledge_set_retention

Set an automatic data retention policy for project memory. Sessions older than the specified TTL days are automatically archived, with a minimum of 7 days when enabled.

Instructions

Set an automatic data retention policy (TTL) for a project's memory. Entries older than ttl_days will be soft-deleted (archived) automatically on every server startup and every 12 hours while running.

Use cases:

  • Set ttl_days: 90 to auto-expire sessions older than 3 months

  • Set ttl_days: 0 to disable auto-expiry (default)

Note: Rollup/compaction entries are never expired — only raw sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesProject to set retention policy for.
ttl_daysYesEntries older than this many days are auto-expired. Set to 0 to disable. Minimum: 7 days when enabled.
Behavior4/5

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

With no annotations, the description fully discloses the behavioral trait: entries are soft-deleted (archived) automatically on a schedule. It specifies the retention check frequency and the exclusion of rollup entries. Missing details include whether changes are immediately applied or reversible, but the main behavior is transparent.

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 concise and well-structured: a single sentence defining the tool, followed by bullet-point use cases and a note. Every sentence adds essential information, and the structure aids scanning. No unnecessary words.

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 no output schema and no annotations, the description adequately covers the tool's purpose, usage, and behavior. It is complete for a simple two-parameter tool. Minor omissions: no mention of required permissions or impact on existing entries, but these are not critical for basic understanding.

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%, so baseline is 3. The description adds value by clarifying the effect of ttl_days=0 (disable auto-expiry) and giving a real-world example (ttl_days=90 for 3-month expiry). This goes beyond the schema's minimal descriptions and helps agents understand parameter semantics.

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 the tool's purpose: setting an automatic data retention policy (TTL) for a project's memory. It defines the action (set retention), resource (project memory), and behavior (soft-delete entries older than ttl_days). This distinguishes it from sibling tools like knowledge_forget (individual deletion) or memory_history (viewing history).

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 concrete use cases for ttl_days values (90 and 0) and explains when auto-expiry occurs (server startup and every 12 hours). It also notes that rollup entries are never expired. However, it does not explicitly mention contraindications or alternative tools for similar tasks, leaving some ambiguity about 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/dcostenco/prism-coder'

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