Skip to main content
Glama

search_code

Search indexed code within a repository snapshot using text or regex patterns, with path filters and pagination to locate relevant source across accessible projects.

Instructions

Run native CBM indexed code text search within this space snapshot. Use offset and has_more for pagination; requested limits above 25 use an effective limit of 25. Scoped searches expose the engine's first 250 matches; cross-project searches can page across the combined accessible matches.

Input Schema

NameRequiredDescriptionDefault
modeNo
limitNo
regexNo
detailNo
offsetNo
contextNo
patternYes
projectNo
path_filterNo
file_patternNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/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 burden. It usefully discloses pagination via offset and a 25-result effective cap, plus a 250-match ceiling for scoped searches, but omits result ordering, read-only/safety profile, and what the response contains. The stated caps are the main behavioral value added.

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?

It is front-loaded and only three sentences, but the sentences mix jargon ("CBM"), pagination, and an out-of-schema field, and the "requested limits above 25" clause is inconsistent with the schema's maximum of 25. Compact but not fully earned.

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

Completeness2/5

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

For a 10-parameter tool with no annotations, no output schema, and thin schema descriptions, the description leaves most parameters and the return shape unexplained. It covers caps but not enough for an agent to call this tool confidently across its modes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% across 10 parameters, yet the description only touches limit and offset; mode, regex, detail, context, project, path_filter and file_pattern are never explained. It also references "has_more", which is not even an input parameter, creating confusion rather than clarity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

It states a verb and resource ("code text search") scoped to "this space snapshot", but "native CBM indexed" is unexplained jargon and nothing distinguishes it from the sibling search_snapshot_text or search_graph. An agent can guess it searches code text, but not precisely how this differs from the other search tools.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus search_snapshot_text, search_graph, or trace_path, and no guidance on when to use regex, mode, or detail. Usage is only implied by the word "search".

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