Skip to main content
Glama

search_in_symbols

Read-onlyIdempotent

Search code with regex and get the enclosing function or class for every match, plus file and line, so you can understand context without raw grep results.

Instructions

Regex search that returns the enclosing function/class for each match, in addition to file:line.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesRegular expression pattern to search for.
projectNoProject name/path (default: active).
max_resultsNoMaximum number of results to return (default 100, 0 = unlimited).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds genuine context beyond that by disclosing the return shape (enclosing function/class plus file:line), which is useful for an agent. It stops there, adding nothing about result limits or traversal scope.

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?

A single front-loaded sentence with zero filler. The distinguishing 'in addition to file:line' clause is placed where it matters, and nothing is wasted.

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?

With no output schema, the description does carry the burden of describing return values and does so adequately (enclosing symbol plus file:line). However, for a search tool sitting among many competing search siblings, the absence of usage/routing guidance leaves a meaningful gap in deciding when to reach for it.

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 documents pattern, project, and max_results (including the default 100 and 0=unlimited). The description adds no parameter-level semantics beyond what the schema provides, making the baseline 3 correct.

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 (regex search) and resource (symbols/matches) and adds a differentiating output detail: it returns the enclosing function/class per match, not just file:line. This distinguishes it from a plain text search. It does not, however, explicitly name the sibling it competes with (search_codebase, ts_search), so it stops short of full sibling differentiation.

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?

The description never says when to use this tool versus the many sibling search tools (search_codebase, ts_search, find_symbol). The 'returns enclosing function/class' phrasing implies a symbol-aware use case, but no explicit when/when-not or alternative routing is provided.

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