Skip to content
Docs menu

Tool reference · Maintenance & performance

memory_rebuild_embeddings

Recomputes the vectors used for semantic search for all active records, or only for one project or embedding space.

local stdio server writes destructive idempotent
Caution. Marked destructive: existing vectors are overwritten. Encoding every record is CPU-heavy and can take minutes on large stores.

When to use

  • You switched the embedding model and old vectors no longer match.
  • You changed the code embedder and only code records need refreshing.
  • Semantic search misses records that keyword search finds.

Parameters

NameTypeDefaultDescription
embedding_space string | array — Optional: only re-encode rows in these spaces.
project string — —
batch_size integer 32 —
limit integer — —

Example

Arguments

{
  "embedding_space": "code",
  "project": "billing-api",
  "batch_size": 32
}

Result shape

{
  "rebuilt": 250,
  "skipped": 0,
  "embedding_space_filter": [
    "code"
  ],
  "project_filter": "billing-api"
}

Use limit to test on a small batch first. skipped counts records whose encoding failed.

Values are illustrative; the keys follow the server's handler. MCP clients receive the result as JSON text content.

Server description

The description the server sends to your agent in tools/list, captured from the v14.7.0 source:

re-encode every record (or every record in a given embedding space) and update the binary + float32 vectors. Idempotent. Pass embedding_space='code' to refresh only code rows after switching the code embedder. Returns {rebuilt: int, skipped: int}.

Found a mistake? Open an issue on GitHub.

Search