Skip to main content
Glama

db_maintenance

Reclaims unused database space, updates query planner statistics, and demotes stale hot memories to maintain optimal performance.

Instructions

Run database maintenance (vacuum, analyze, auto-demote stale).

Compacts the database to reclaim unused space, updates query planner statistics, and demotes stale hot memories (if auto_demote is enabled).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
memory_countYes
vector_countYes
schema_versionYes
bytes_reclaimedYes
auto_demoted_idsNo
size_after_bytesYes
size_before_bytesYes
auto_demoted_countNo
Behavior4/5

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

With no annotations, the description carries full burden for behavioral disclosure. It transparently states the tool compacts database, updates query planner statistics, and demotes stale hot memories conditionally. This adequately informs agents of the mutation and side effects, though it could mention potential performance impact.

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 extremely concise, with two sentences that front-load the key operation and then elaborate. Every sentence adds value without redundancy.

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 has no parameters and an output schema exists, the description is complete. It explains all three maintenance actions and their purposes (reclaim space, update stats, demote stale memories), meeting the needs for a parameterless tool.

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?

Tool has no parameters (0 params), so schema coverage is 100%. The description adds value by listing the three operations (vacuum, analyze, auto-demote) that define what the tool does, but baseline score is 4 due to lack of parameters.

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 runs database maintenance (vacuum, analyze, auto-demote stale), using specific verbs and resources. It distinguishes itself from sibling tools like db_info or db_rebuild_vectors by specifying distinct maintenance actions.

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

Usage Guidelines3/5

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

The description implies usage for database compaction, statistics update, and demotion of stale hot memories, but lacks explicit guidance on when to use vs. alternatives (e.g., db_info for querying, db_rebuild_vectors for vector rebuilding) or context like frequency or cautionary notes.

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/michael-denyer/memory-mcp'

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