Skip to main content
Glama

search

Find code by keyword or identifier in an indexed project, returning file paths, line ranges, and highlighted snippets so you can locate implementations and callers without opening whole files.

Instructions

Search one project's index by keyword or identifier. Returns file paths, line ranges and short highlighted snippets, so use this before opening whole files. Good for 'where is X', 'who calls Y', 'how is Z implemented'.

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum results (1-25). Default 8.
queryYesWords or identifiers to find.
projectNoProject root. Defaults to the most recently indexed project.
path_prefixNoOnly search files under this relative path, e.g. 'src/api'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that results include file paths, line ranges, and short highlighted snippets, and that it searches one project's index, but it omits read-only status, permissions, rate limits, pagination, and error behavior.

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?

The description is three sentences, front-loaded with the core purpose, and each sentence adds distinct value about return contents and usage. There is no redundant or wasted wording.

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 simple search tool with a fully described input schema and no output schema, the definition explains what is returned and when to use it. Minor gaps remain around alternatives and operational behavior, but the core invocation context is complete.

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 the schema already defines all four parameters. The description reinforces keyword/identifier searching and the one-project scope but adds no extra syntax, default, or constraint details beyond the schema.

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 description states a specific verb and resource: search one project's index by keyword or identifier. It is clear what the tool does, though it does not explicitly name or differentiate itself from the sibling tools index_project and stats.

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?

It gives clear usage context by saying to use this before opening whole files and provides example query intents like 'where is X' and 'who calls Y'. It does not state when not to use it or name alternatives.

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

Deploy Server

Other Tools