Skip to main content
Glama

embed_repo

Idempotent

Precompute symbol embeddings for semantic search to avoid latency spikes on first query. Supports incremental updates and force recompute.

Instructions

Precompute and cache symbol embeddings for semantic / hybrid search. Embeddings are also computed lazily on first semantic query, but calling this once after a fresh index avoids the first-query latency spike. Requires AI provider to be enabled in config (ollama/openai). Set force=true to drop and recompute all existing embeddings. Mutates the vector store; idempotent. Use after reindex when you plan to use semantic search. Returns JSON: { status, indexed_this_run, total_embedded, coverage_pct, duration_ms }. If embedding batches fail (e.g. a dimension mismatch between the model and the vector store, or an unreachable provider) it returns status "error" with a diagnostic message and failed_batches count instead of a silent "completed" with 0 coverage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoDrop existing embeddings and re-embed everything (default false — incremental)
batch_sizeNoSymbols per embedding API batch (default 50)
Behavior5/5

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

Describes mutation of vector store, idempotency, and detailed error handling (returns error status with diagnostic). Annotations already indicate idempotentHint=true and readOnlyHint=false, and description adds valuable behavioral context without contradiction.

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?

Front-loaded with main purpose, each sentence provides necessary information: use case, requirements, parameters, behavior, return format, error handling. Efficient and well-structured, no wasted words.

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?

Comprehensive for a tool with no output schema: explains return values and error conditions. Covers dependencies and usage context. No significant gaps given the tool's complexity.

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?

Schema coverage is 100% with parameter descriptions. The description adds a default value for batch_size (50) and clarifies force usage for dropping embeddings, slightly augmenting 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 the tool precomputes and caches symbol embeddings for semantic/hybrid search, distinguishing it from lazy computation on first query. The verb 'embed_repo' aptly describes the action on the repo's embeddings.

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

Usage Guidelines5/5

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

Explicitly recommends use after reindex when planning semantic search, mentions avoiding first-query latency spike, and notes prerequisites like AI provider enabled. Provides context on idempotency and force mode.

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/nikolai-vysotskyi/trace-mcp'

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