Skip to main content
Glama

generate_embeddings

Backfill ChromaDB embeddings for active rules and lessons missing an embedding_id, processing only unembedded entries to support semantic retrieval.

Instructions

Generate or update ChromaDB embeddings for active rules/lessons whose embedding_id is still NULL — an incremental backfill, not a full re-embed.

Access level: write. Returns: JSON with processed/skipped/errors counts and duration_seconds, or {"error": "RAG_NOT_INSTALLED", ...} when the rag extra is absent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scope_idNoRestrict to one scope; omit to process every scope.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and handles it well: it declares 'Access level: write', describes the success payload shape (processed/skipped/errors counts, duration_seconds), and discloses the specific failure mode RAG_NOT_INSTALLED when the rag extra is missing. It stops short of idempotency/concurrency or auth details, so it is strong but not exhaustive.

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?

Two compact paragraphs: the core behavior and its incremental nature come first, followed by the access/returns/error block. No filler sentences and no repetition of the schema.

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?

For a single-optional-parameter write tool with an output schema already present, the description supplies the essentials an agent needs: write semantics, backfill-only scope, and the RAG_NOT_INSTALLED error path. Only marginal items (permissions, whether re-runs are safe) are absent.

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 description coverage is 100% for the single scope_id parameter, and the description's 'omit to process every scope' simply restates the schema's own default semantics. Baseline 3 is appropriate since the schema does the work.

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?

States a specific verb and resource ('Generate or update ChromaDB embeddings') plus a precise scope qualifier ('active rules/lessons whose embedding_id is still NULL'). The phrase 'an incremental backfill, not a full re-embed' cleanly separates it from sibling index_rules_from_markdown / index_lessons_from_markdown, which an agent could otherwise confuse with it.

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?

Gives a clear triggering condition: run only for records with NULL embedding_id, i.e. a backfill of missing embeddings rather than a re-index. It does not name an explicit alternative tool or state when-not to call, which keeps it short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.