Skip to main content
Glama

Find a symbol

find_symbol
Read-onlyIdempotent

Retrieves full code for functions, classes, methods, or constants by name, including file, line range, callers, and callees, so you can inspect a definition without reading files or grepping.

Instructions

Get the whole code of functions, classes, methods or constants by name ("show me create_order"), with file, line range, callers and callees. Use it instead of a file read or grep for a definition. Pass several names in one call. A class over 2,000 characters gives an outline; ask for "Class.method" for one method. For every use of a name, use graph.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
exactNoFalse matches part of a name
symbol_nameYesOne name, or several with commas

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.4.6
    • changedInput schema / properties / exact / description
      Previous value: -"True for exact match, False for fuzzy substring"New value: +"False matches part of a name"
    • changedInput schema / properties / symbol_name / description
      Previous value: -"One name, or several with commas (e.g. 'create_server, TokenBudget, MAX_RETRIES')"New value: +"One name, or several with commas"
  2. Changed3 schema fields changedv2.1.0
    • removedInput schema / properties / name
      Removed value: -{
      -  "description": "Symbol name (e.g. 'create_server', 'TokenBudget')",
      -  "type": "string"
      -}
    • addedInput schema / properties / symbol_name
      Added value: +{
      +  "description": "One name, or several with commas (e.g. 'create_server, TokenBudget, MAX_RETRIES')",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "name"
      -]New value: +[
      +  "symbol_name"
      +]
  3. First observedv1.0.4

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare it read-only, idempotent and non-destructive, so the description's job is to add behavior — and it does: classes over 2,000 characters return an outline rather than full code, and 'Class.method' targets a single method. Those are non-obvious response-shaping behaviors not derivable from the annotations or the input schema.

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 action and packed with actionable detail in five short sentences, none wasted. The parenthetical example phrasing ('show me create_order') is slightly informal and the return-format and usage guidance interleave, but density is high throughout.

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?

For a two-parameter lookup tool with an output schema and full annotation coverage, this covers the remaining gaps: the large-class outline behavior, method-level addressing, batch names, and the alternative tool for usage searches. Nothing an agent needs in order to call it correctly is missing.

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 coverage is 100%, so the baseline is 3; the description earns above that by explaining that several names can be passed in one call and by introducing the 'Class.method' addressing form for symbol_name, which the schema does not describe. It does not restate the exact/partial-match flag, but the schema covers that fully.

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 — retrieving full source for functions, classes, methods or constants by name — and immediately distinguishes itself from file reads, grep, and the graph tool. An agent can tell exactly what it returns (file, line range, callers, callees) without opening the 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?

Explicitly says to use this 'instead of a file read or grep for a definition' and routes the alternative case away: 'For every use of a name, use `graph`.' Both the when and the when-not are named with the sibling to use instead.

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

Deploy Server

Other Tools