Skip to main content
Glama

find_symbol

Search and locate functions, classes, structs, interfaces, variables, and type aliases by name pattern, kind, file, language, or exported status to navigate a codebase.

Instructions

Find code symbols (functions, classes, structs, interfaces, variables, type aliases) by name pattern, kind, file, or language.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "find_symbol"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoOptional repo-relative file path or glob pattern.
kindNoOptional symbol kind filter (Function, Class, Struct, Interface, Enum, Variable, TypeAlias, Property).
nameNoSymbol name or glob pattern (supports * and ?; plain text matches case-insensitive substring).
limitNoMaximum symbols to return (default 50).
languageNoOptional canonical language filter (go, python, typescript, tsx, javascript, rust, java).
exported_onlyNoWhen true, return only exported/public symbols.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. The verb 'Find' implies a read-only, non-destructive lookup, but the description says nothing about result ordering, truncation behavior beyond the schema's limit, or what a returned symbol record contains.

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?

A single well-formed sentence with the resource and filters front-loaded and no filler. It is efficient, though the trailing filter list largely mirrors the schema rather than adding information.

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?

For a six-parameter, zero-required search tool with no annotations and no output schema, the description covers the query surface adequately but leaves the return shape and result ordering unstated. Nothing an agent needs to invoke it is missing, but the picture is only partially complete.

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 baseline is 3. The description restates four of the six parameters (name pattern, kind, file, language) without adding syntax or matching semantics, and it omits any mention of limit or exported_only.

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?

Specific verb 'Find' plus resource 'code symbols', with the symbol kinds enumerated (functions, classes, structs, interfaces, variables, type aliases) and the query axes named. It is clear what the tool does, but it never contrasts itself with the overlapping siblings search_code or file_outline, so an agent must infer the distinction.

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 lists the filters available but gives no explicit when-to-use, when-not-to-use, or alternative routing. An agent deciding between find_symbol, search_code, and file_outline gets no guidance from this text.

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