Skip to main content
Glama

search_symbol

Find a class, function, or method by name across the workspace to get its file and position. Use that location for type-resolved definitions, references, or hover.

Instructions

Search the whole workspace for a symbol by name (class, function, method, etc.).

Use this to find a symbol's file/position first, then pass that position to definition/references/hover for precise, type-resolved navigation. Returned positions point at the identifier name (not the class/def keyword) and use the same character-offset column convention as the other tools. Results include a SymbolKind label and are capped. name is accepted as an alias for query. Narrow broad queries with kind (SymbolKind labels, comma-separated: class, function,method, interface, ...) and path (workspace-relative prefix such as src/, or a glob such as src/**/*.py). Production code ranks before tests. Loose fuzzy hits whose names don't contain the query are summarised as a count when real matches exist; pass fuzzy=true to list them too.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo
nameNo
pathNo
fuzzyNo
queryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so richly: results are capped, loose fuzzy hits are collapsed to a count unless `fuzzy=true`, production code ranks before tests, positions point at the identifier name rather than the keyword, and columns use the shared character-offset convention.

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?

Front-loaded with the core purpose and organized purpose-first, then return semantics, then parameter guidance. It is a touch long and dense with several independent facts packed into single sentences, but every sentence carries information.

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-value explanation is not required, and the description covers behavior, parameter meaning, and the sibling workflow well. The minor gap is that with zero required parameters it never states that at least one of `query`/`name` must be supplied, leaving a degenerate no-argument call plausible.

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

Parameters5/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 compensate, and it documents every parameter: `name` as an alias for `query`, `kind` accepting comma-separated SymbolKind labels with examples, `path` accepting a workspace-relative prefix or glob (with an example), and `fuzzy` toggling fuzzy-hit listing.

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 and resource with scope ('Search the whole workspace for a symbol by name (class, function, method, etc.)') and explicitly positions itself in a workflow relative to siblings (definition/references/hover). An agent can tell this is the discovery step versus the precise-navigation tools without opening either schema.

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?

Gives an explicit when-to-use rule ('find a symbol's file/position first, then pass that position to definition/references/hover for precise, type-resolved navigation') and names the alternative tools with the condition that selects them. It also tells the agent how to narrow overly broad searches via `kind` and `path`.

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