Skip to main content
Glama

session_backfill_embeddings

Repair missing vector embeddings in ledger entries after API outages to ensure full semantic search coverage.

Instructions

Repair ledger entries that are missing vector embeddings. This can happen if the Gemini API was temporarily unavailable when the entry was saved.

How it works:

  1. Scans for active ledger entries where embedding IS NULL

  2. Generates embeddings via Gemini text-embedding-004

  3. Patches each row with the generated embedding

Run this periodically or after known API outages to ensure full semantic search coverage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum entries to repair in one call (default: 20, max: 50). Keeps API costs predictable.
dry_runNoIf true, only count missing embeddings without generating them. Default: false.
projectNoOptional: repair only a specific project. If omitted, repairs all projects.
Behavior3/5

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

No annotations provided, so the description must fully disclose behavior. It outlines the three-step process (scan, generate, patch) and mentions API cost considerations via the limit parameter. However, it does not disclose potential side effects like whether the operation is idempotent or if it logs changes, leaving some gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a brief header and numbered steps. It is concise, with no redundant sentences, though the bullet list could be more compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description should clarify the return value (e.g., count of repaired entries or success status). It does not, leaving an agent uncertain about what to expect after invocation.

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

Parameters3/5

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

Schema coverage is 100%, so the baseline is 3. The description adds minor context beyond the schema, explaining that the limit parameter 'keeps API costs predictable', but does not significantly enhance understanding of 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 repairs ledger entries missing vector embeddings, with a specific verb 'repair' and resource 'ledger entries'. It distinguishes from siblings like session_backfill_links and session_compact_ledger.

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 explicit when-to-use context: 'Run this periodically or after known API outages'. It does not specify when not to use, but the guidance is clear and actionable for an agent.

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