Skip to main content
Glama
minhhua-EH

Semantica Search MCP

by minhhua-EH

index_codebase

Indexes a codebase for semantic code search by extracting functions, classes, and modules, generating embeddings, and storing them in a vector database.

Instructions

Index a codebase for semantic code search. Runs in BACKGROUND by default - returns immediately and you can check progress with get_index_status. Extracts functions, classes, and modules, generates embeddings, and stores in vector database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the codebase root directory
languagesNoLanguages to index (optional, auto-detects if not specified)
backgroundNoRun in background (default: true). Allows checking status while indexing. Set false to wait for completion.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/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 behavioral burden and does well: it discloses the async-by-default execution model, immediate return, and the full pipeline (extraction, embeddings, vector storage). It omits whether re-indexing an existing path overwrites prior data, permission requirements, or rough duration for large repos.

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 sentences, zero filler, and the most operationally important fact (background by default) is front-loaded in the second sentence where an agent will see it.

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?

No output schema and no annotations, so the description must stand alone for a mutating tool that writes to a vector store; it covers purpose, mechanism, and the async contract. Gaps remain around idempotency/overwrite behavior and failure modes on an invalid path, which matter for a write operation.

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%, so the baseline is 3; the description earns an extra point by explaining the runtime consequence of the background flag ('returns immediately', status checkable) rather than merely naming it. The path and languages parameters are left to the schema, which already documents them fully.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Index a codebase for semantic code search') and even enumerates what gets extracted (functions, classes, modules), so the agent knows exactly what this produces. It does not, however, distinguish itself from the sibling reindex_changed_files, leaving the initial-vs-incremental distinction to inference.

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 clear operational context: the default is background execution and progress is checked via get_index_status, which is a genuine workflow hint. It stops short of explicit when-not-to-use guidance (e.g., use reindex_changed_files instead of a full re-index, or clear_index first).

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