Skip to main content
Glama

find_symbol

Read-onlyIdempotent

Find where a function, class, or variable is defined: file, line, signature, and preview in one call, returning definitions rather than all textual mentions.

Instructions

Where is X defined: file, line, signature and preview in one call, the definition only where Grep returns every mention. Functions and classes first, then module constants and variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
hintsNoAdd a `_hints` key with next-step tool calls (default true).
kindsNoSymbol kinds to search. Default: function+class (plus variable when TOKEN_SAVIOR_VARIABLES=search).
levelNo0 full, 1 no preview, 2 minimal.
namesNoBatch mode: list of names (max 10). Returns {name: result} dict. Mutually exclusive with 'name'.
queryNoAlias de `name`.
symbolNoAlias de `name`.
projectNoProject name/path (default: active).
compressNoCompact rows (default true).
symbol_nameNoAlias de `name`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.24.0
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Alias de `name`. ",
      +  "type": "string"
      +}
  2. Changed3 schema fields changedv4.20.0
    • addedInput schema / properties / kinds
      Added value: +{
      +  "description": "Symbol kinds to search. Default: function+class (plus variable when TOKEN_SAVIOR_VARIABLES=search).",
      +  "items": {
      +    "enum": [
      +      "function",
      +      "class",
      +      "variable"
      +    ],
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / symbol
      Added value: +{
      +  "description": "Alias de `name`. ",
      +  "type": "string"
      +}
    • addedInput schema / properties / symbol_name
      Added value: +{
      +  "description": "Alias de `name`. ",
      +  "type": "string"
      +}
  3. Addedv4.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world, so the safety profile is fully covered structurally. The description contributes result-shape context (file/line/signature/preview in one call, definition-only vs. all mentions) beyond the annotations, but adds nothing on truncation, limits, or failure behavior, so it stays at a minimum-viable 3.

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?

Essentially one dense, front-loaded sentence that leads with the core value proposition (definition location in one call) and then qualifies scope against Grep. Efficient with no filler, though the run-on structure makes it slightly harder to parse than a clean 5.

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?

With no output schema, the description does the work of describing the return payload (file, line, signature, preview) and result ordering, which is the right compensation for a 10-parameter tool. It is complete enough to invoke, though return-format absolutes and multi-result/pagination behavior remain unaddressed.

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 90% and the schema already documents name aliases, kinds, level, names batching, hints, project, and compress. The description adds no parameter-level meaning at all (nothing about the name-alias set or batch mode), so the baseline 3 applies for high-coverage schemas.

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 concrete verb+resource ('where is X defined: file, line, signature and preview') and explicitly contrasts with Grep's every-mention behavior, so an agent knows this is a definition-locator, not a text search. It does not differentiate itself from close code-intel siblings such as search_in_symbols, get_class_source, or get_function_source, which caps it below a 5.

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?

Usage is implied rather than stated: it says results are ordered 'functions and classes first, then module constants and variables,' which hints at defaults, but there is no explicit when-to-use/when-not or named alternative (e.g., 'use get_function_source for the full body'). A 3 reflects adequate but inferential guidance.

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