Skip to main content
Glama

find_symbol

Locate function, class, or method definitions by exact or partial name with the AST symbol graph, returning file, line, and caller/callee counts.

Instructions

Finds where a function/class/method is defined using the AST symbol graph.
Works without the vector index (no embedding model needed).

Args:
    name: Symbol name — exact or partial (case-insensitive).
    n_results: Max results (default 8).

Returns:
    Definitions with file:line plus caller/callee counts.

Input Schema

NameRequiredDescriptionDefault
nameYes
n_resultsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral load; it does disclose that matching is case-insensitive, that partial names are accepted, and that it works without the vector index — genuinely useful traits. It says nothing about ranking/ordering of results, ambiguity handling, or the fact that it is a read-only lookup, which a no-annotation tool should ideally make explicit.

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?

Front-loaded one-line purpose followed by compact Args and Returns blocks. Every line carries information; nothing repeats the name or pads the text.

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 shape needn't be spelled out, and the description nonetheless sketches file:line plus caller/callee counts. For a two-parameter lookup tool, the only real gap is result ordering and how partial matches are ranked.

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: it explains that 'name' matches exactly or partially and is case-insensitive, and that 'n_results' caps results with a default of 8. That covers both parameters with meaning the bare schema does not provide.

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 and resource: finds where a function/class/method is defined, via the AST symbol graph. The 'works without the vector index' clause implicitly separates it from the embedding-based search tools (search_codebase, search_codebase_advanced), though no sibling is named outright.

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

Usage Guidelines3/5

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

The 'no embedding model needed' note implies when this is the right pick over vector search, but the connection is left for the agent to infer. There is no explicit 'use this when / prefer search_codebase when' routing, and no noted prerequisites or exclusions.

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