Skip to main content
Glama

search_symbol

Find a function, class, const, or method by name across JS/TS files; narrow broad results by kind, path, or fuzzy matching.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose non-obvious traits: results are capped, production code ranks before tests, fuzzy non-containing hits are collapsed to a count unless `fuzzy=true`, and positions use the shared character-offset column convention. It stops short of stating the cap size or the read-only/safety profile, so it is strong but not exhaustive.

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?

Dense but front-loaded: purpose and language scope come first, then alternatives, then parameter behavior. Every sentence carries information, though the middle is packed with several distinct concerns in a row.

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?

Given 5 undocumented parameters, no annotations, and no output schema, the description supplies enough for correct invocation and even describes the return shape (identifier positions, SymbolKind label, caps). The absence of an explicit cap value or safety statement is the only real gap.

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

Parameters4/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 largely does: `name` is documented as an alias for `query`, `kind` takes comma-separated SymbolKind labels with examples, `path` accepts a workspace-relative prefix or glob, and `fuzzy` controls listing of loose hits. Only the exact cap/semantics of an unbounded `query` remain unspecified.

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 ('Search JS/TS files for a symbol by name') and enumerates the symbol kinds it matches. It clearly delimits itself from the sibling symbol_info, which an agent would otherwise confuse with this search tool.

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?

Explicitly says 'Prefer `symbol_info` for a one-call summary', declares the JS/TS-only restriction and why (HTML/CSS language servers lack workspace-wide search), and tells the agent how to narrow queries with `kind` and `path`. When-to-use, when-not-to-use, and the alternative are all present.

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