Skip to main content
Glama

Metis · Memory Curator — Reindex Memory

reindex_memory

Re-embed memory entries missing vector indexes in specified layers. Recovers from embedding failures or after raw SQL imports, processing only gaps without overwriting existing vectors.

Instructions

Re-embed memory entries that are missing vector indexes.

Scans each requested layer for rows without a corresponding vector in the
vec_* table, generates embeddings, and inserts them. Safe to run repeatedly
— only processes gaps, never overwrites existing vectors.

Use this to recover from embedding failures, or after importing memories
via raw SQL. Can be scheduled nightly via APScheduler.

Args:
    layers: Comma-separated layers to reindex: 'episodic', 'semantic',
        'procedural' (default: all three).
    batch_size: How many entries to embed per batch (default 50).
        Lower values use less memory; higher values are faster.

Returns:
    Summary of how many entries were reindexed per layer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layersNoepisodic,semantic,procedural
batch_sizeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so description carries full burden. States 'Safe to run repeatedly — only processes gaps, never overwrites existing vectors.' Discloses non-destructive, idempotent behavior. Could add more on performance impact or locking, but sufficient for a recovery tool.

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: concise purpose, behavioral detail, usage scenarios, Args, Returns. No superfluous sentences. Each element earns its place.

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 it's a maintenance tool with two parameters and an output schema, the description covers purpose, behavior, usage, parameters, and return value. Complete enough for an agent to decide and invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description includes an Args section explaining both parameters: layers (comma-separated, defaults, valid values) and batch_size (memory vs speed trade-off). Adds significant meaning beyond the schema.

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 'Re-embed memory entries that are missing vector indexes.' It specifies the action (re-embed) and resource (memory entries). Distinguishes from siblings by focusing on missing vector indexes, and differs from tools like kg_index_memory or consolidate_old_memories.

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?

Provides explicit usage scenarios: 'Use this to recover from embedding failures, or after importing memories via raw SQL.' Also mentions it 'can be scheduled nightly via APScheduler.' Lacks explicit when-not-to-use or alternatives, but offers clear context.

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/SVerITG/Metis'

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