Skip to main content
Glama

search_code

Read-onlyIdempotent

Locate literal, case-sensitive code text in a project and return file paths with line numbers. Search current code by default, or a previous/reused snapshot handle.

Instructions

Locate literal, case-sensitive code text with paths and lines. Omit snapshot for current code, use 'previous', or reuse an opaque handle. Keep handles out of the answer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
snapshotNo
project_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower; the description adds real behavioral detail on matching semantics (literal, case-sensitive) and the snapshot-handle lifecycle, including the caution to keep handles out of the answer. It stops short of describing result ordering or pagination behavior.

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?

Two short sentences, front-loaded with the core behavior and no filler. The trailing 'Keep handles out of the answer' is terse and slightly ambiguous but earns its place as an operational caution.

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?

An output schema exists, so return values need no explanation here. With matching semantics, snapshot modes, and the safety profile covered by annotations, the definition is nearly sufficient; only limit/pagination behavior is unaddressed.

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 0%, so the description must carry the load. It does explain query semantics (literal, case-sensitive) and snapshot modes, but says nothing about limit or project_id, leaving two of four parameters undocumented anywhere.

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 ('Locate literal, case-sensitive code text') plus what is returned ('paths and lines'). It does not explicitly contrast itself with read_file or get_diff, but 'search' vs 'read' is a reasonably clear split for an agent.

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?

The snapshot guidance ('Omit snapshot for current code, use previous, or reuse an opaque handle') is useful mode-selection advice, but it is parameter usage rather than tool-selection guidance. There is no statement of when to prefer this over read_file or get_diff, so usage is only implied.

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