Skip to main content
Glama

anyindex_search

Read-onlyIdempotent

Search your entire locally indexed codebase by meaning or exact name to find functions, classes, and features. Returns file paths and line numbers when the answer is not in context.

Instructions

Semantic and keyword search over the ENTIRE locally indexed codebase. Every indexed file is already available to you — do not ask the user to paste code, and do not read files directory-by-directory looking for it. Use this when the answer is not in your current context, when you need to locate a function, class or feature by name or by meaning, or when you need to understand how parts of the project fit together. Skip it when the answer is already in context, or for general programming questions unrelated to this repository. Each result carries file path and line numbers. If no results come back, the code may not exist here — say so instead of inventing it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNohybrid
topKNoMaximum number of results. Counts files, not chunks: you get at most one chunk per file, so fewer results may come back. Use get_file_outline for the rest of a file.
queryYesNatural language query, or an exact symbol name

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hitsYes
indexYes
totalYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered. The description adds behavior beyond that: results carry file path and line numbers, the tool counts files not chunks, and it prescribes what to do when no results return (say so rather than invent). It does not describe pagination or ranking behavior, so it stops short of 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?

Four tight sentences, front-loaded with scope and the most important behavioral instruction (don't ask for pasted code, don't crawl directories). Every sentence carries actionable content.

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?

An output schema exists, so return values need not be explained, yet the description still notes path/line payload and the zero-result case. For a search tool with annotations covering safety, nothing an agent needs to call it correctly is missing.

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 67% — topK and query are documented in the schema, but mode has only an enum with no explanation of hybrid vs semantic vs keyword. The description text offers no parameter guidance at all, so it neither compensates for the gap nor adds meaning.

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 ('search') and resource ('the ENTIRE locally indexed codebase') and names both modalities (semantic and keyword). An agent can immediately tell this apart from siblings like index_status or get_file_outline.

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 enumerates when to use ('answer not in current context', 'locate a function/class/feature', 'understand how parts fit together') and when to skip ('answer already in context', 'general programming questions unrelated to this repository'). It also names a follow-up alternative, get_file_outline, and warns against directory-by-directory reading.

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