Skip to main content
Glama

semantic_search

Read-only

Search code by meaning with natural-language queries to locate relevant files, functions, and classes, ranked by relevance for codebase exploration.

Instructions

Search the code by meaning with a natural-language query. Returns files, functions and classes, best first.

Args: query: For example "authentication middleware". file_filter: Optional glob, for example "*.py". branch: Remote service only. Local search reads the working tree. mode: "auto" (default), "keyword", or "vector" (waits for embeddings).

Input Schema

NameRequiredDescriptionDefault
modeNoauto
queryYes
top_kNo
branchNo
workspaceNoProject path (default: this project)
max_tokensNo
file_filterNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover the read-only safety profile, and the description adds genuinely new behavioral context: the ranked return format ('best first'), the latency implication that vector mode waits for embeddings, and the constraint that branch only applies to remote service while local search reads the working tree. It does not mention limits on result size or how top_k/max_tokens interact, which is a minor gap.

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

Conciseness4/5

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

The one-sentence purpose statement is front-loaded and the args list is compact with no filler. Each line adds information, though the args block could have absorbed the two undocumented parameters instead of stopping at four.

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 seven-parameter tool with no output schema, the description does cover return shape and the trickier parameters (mode, branch, file_filter). It falls short on the token-budget parameters (top_k, max_tokens) and does not explain the workspace default beyond what the schema already says, so an agent cannot fully predict result size.

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 only 14% (workspace alone is documented), so the description must carry the load and it does document four of seven parameters with concrete examples for query, file_filter, and mode defaults. However, top_k and max_tokens — the two parameters that control result volume and token budget — are left completely unexplained, leaving meaningful gaps.

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 — 'search the code by meaning with a natural-language query' — and describes the return shape ('files, functions and classes, best first'). The 'by meaning' phrasing implicitly separates it from keyword-oriented siblings like fast_search and search_symbols, but no sibling is named explicitly, and the presence of a 'keyword' mode slightly blurs the distinction.

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?

Usage context is implied through the mode options and the note that 'vector' mode 'waits for embeddings', which tells the agent when a mode is slow. It never says when to prefer this tool over fast_search, search_symbols, or explore_codebase, so the agent must infer routing from the sibling names.

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