Skip to main content
Glama

search_semantic

Find relevant code by natural-language query using vector similarity across Git worktrees and registered directories, indexing new worktrees when needed.

Instructions

Vector similarity search. Supply 'repo' (absolute checkout/directory path) or 'cwd' (a directory inside it); 'repo' takes precedence. Git worktrees resolve through Git and registered families; directory roots through database registration. A first search can register and index a new linked worktree when its family already permits indexing. Subsequent searches use that checkout's last completed index; incomplete Git operations retain it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoDirectory inside the target checkout or registered directory. Used when 'repo' is absent; no configuration marker is needed.
repoNoAbsolute path of the target checkout/worktree or indexed directory. Optional if 'cwd' is provided.
limitNo
queryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/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 real side effects: a first search may register and index a new linked worktree, subsequent runs reuse that checkout's last completed index, and incomplete Git operations retain it. It does not state read-only-ness or return format, but the registration/indexing disclosure is unusually rich.

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

Conciseness3/5

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

Front-loaded and not bloated, but several sentences ('Git worktrees resolve through Git and registered families') are jargon-dense and hard to parse. The behaviorally important indexing caveat is buried mid-paragraph.

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

Completeness3/5

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

For a no-annotation, no-output-schema search tool it covers indexing/registration lifecycle well, but omits what is returned, how ranking works, and the semantics of 'limit'. An agent can invoke it, but not fully predict its output or cost.

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 50%. The repo/cwd descriptions already cover much of what the prose repeats, but the description adds genuine value with the precedence rule ('repo' takes precedence). 'limit' and 'query' remain undocumented in both schema and description.

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?

The opening 'Vector similarity search' gives a specific mechanism+verb that implicitly distinguishes this from search_fulltext, search_hybrid, and search_structural. It never names those siblings, though, so the agent must infer the routing rather than being told it.

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

Usage Guidelines3/5

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

It explains the repo-vs-cwd selection well, including precedence, but gives no guidance on WHEN to pick semantic search over the sibling search_* tools. Usage relative to alternatives is left entirely to inference.

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