Skip to main content
Glama

index

Build or rebuild the vex code search database from scratch per project, then use update for incremental refreshes. Set semantic true to enable embeddings and similar search.

Instructions

Build or rebuild the vex index from scratch. Run once per project; use update afterward for incremental refreshes. Set semantic=true to also generate embeddings (slower; required for find_similar / similar / duplicates).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gpuNoUse the GPU for embedding generation if this vex build supports it (DirectML on Windows / CoreML on macOS prebuilts; CUDA via source build), with silent CPU fallback. Only speeds up cold/large semantic builds. Omit to let .vex.toml gpu/device or $VEX_DEVICE decide; pass false to force CPU even when config enables GPU.
deviceNoAdvanced: pin a specific embedding execution provider (cpu | auto | cuda | directml | coreml). Mutually exclusive with `gpu`.
semanticNoAlso generate per-symbol embeddings (enables semantic search / similar / duplicates; adds ~30-90s on a medium repo)
workspaceNoMulti-repo: fan out across every repo declared in the nearest `.vex-workspace.toml` (set `project_root` at or above it — the manifest is found by walking up). Results become an object `{workspace, repos:[...]}` grouped by repo, NOT the flat per-tool array — branch on shape. `why` is ignored in workspace mode (single-repo only).
project_rootYesAbsolute path to the project root to index

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.27.3

TDQS

A4.4/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 does disclose meaningful behavior: the build starts 'from scratch' (implying replacement of any prior index), it is a once-per-project operation, and semantic mode is slower. It stops short of explicitly stating that an existing index is overwritten or that the operation is expensive/irreversible, which would raise this to a 5.

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?

Three short sentences, each earning its place: the action, the run-once/use-update rule, and the semantic prerequisite. Front-loaded and free of filler.

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 five-parameter tool with no output schema and no annotations, the description covers the essential action, lifecycle guidance, and the key semantic prerequisite. Minor gaps remain around workspace-mode fan-out and what happens to pre-existing index data, but structured fields cover the parameter detail.

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%, so every parameter (gpu, device, semantic, workspace, project_root) is already documented in detail. The description only reiterates the semantic flag and its downstream effect; it adds no syntax or constraints beyond the schema, so baseline 3 applies.

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 ('Build or rebuild the vex index from scratch') and explicitly distinguishes itself from the sibling `update` tool by contrasting full build vs incremental refresh. An agent can route between the two without opening either schema.

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?

Gives explicit when-to-use guidance ('Run once per project; use update afterward for incremental refreshes') and names the condition that selects the alternative. It also states the prerequisite for dependent tools (semantic=true required for find_similar / similar / duplicates).

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