Skip to main content
Glama

search_symbol

Find JS/TS functions, classes, or constants by name across workspace files. Narrow results by kind or path to locate symbols and inspect their positions.

Instructions

Search JS/TS files for a symbol by name (function, class, const, etc.).

JS/TS-only: the HTML/CSS language servers don't implement useful workspace-wide symbol search (webnav does not reimplement it). Prefer symbol_info for a one-call summary. Returned positions point at the identifier name 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/**/*.ts). 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.3

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 burden and delivers: it discloses that positions point at the identifier name using the same character-offset column convention as other tools, that results carry a SymbolKind label and are capped, that production code ranks before tests, and that fuzzy hits not containing the query are collapsed to a count unless `fuzzy=true`. These are non-obvious behavioral traits an agent could not infer from the schema.

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 core purpose and the alternative tool are front-loaded in the first two sentences, followed by progressively finer detail on semantics, ranking, and edge cases. Each sentence supplies distinct, actionable information and no sentence is redundant.

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

Completeness5/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 structure need not be re-explained, yet the description still adds return-relevant context (position convention, SymbolKind label, capping, fuzzy collapsing). Combined with the JS/TS restriction, ranking behavior, and full parameter coverage, an agent has everything needed to call it correctly.

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 supply all parameter meaning, and it does: `name` as an alias for `query`, `kind` as comma-separated SymbolKind labels with examples, `path` as a workspace-relative prefix or glob with an example, and `fuzzy` as the switch that lists otherwise-summarised loose hits.

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?

The first sentence states a specific verb and resource with explicit scope: searching JS/TS files for a symbol by name, with examples of the symbol kinds (function, class, const). It then distinguishes itself from the sibling `symbol_info` and explains the JS/TS-only boundary, so an agent can tell it apart from alternatives without opening a schema.

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 an explicit alternative and the condition that selects it ('Prefer `symbol_info` for a one-call summary') and a clear when-not-to-use rule (HTML/CSS language servers don't support useful workspace-wide symbol search). It does not address the other symbol-oriented siblings such as `definition`, `references`, or `outline`, leaving a few routing choices to inference.

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