Skip to main content
Glama

find_symbol

Locate where a function, class, type, or constant is defined by listing files that export the given symbol name; supports wildcard searches for codebase navigation.

Instructions

Where is symbol X defined? Lists the files that export a function, class, type or constant by that name.

Input Schema

NameRequiredDescriptionDefault
nameYesSymbol name (PHP: short or namespace-qualified); % is a wildcard
absolute_pathsNoPrint absolute paths

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.1

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It implies a read-only lookup and clarifies that the result is a list of files, which is useful, but it does not disclose scope (e.g., workspace-wide search), permissions, or any other behavioral traits.

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?

Two short sentences with the core question front-loaded and zero wasted words. The structure immediately conveys purpose and output.

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?

For a simple two-parameter read tool with fully documented schema parameters and no output schema, the description sufficiently explains what it does and what it returns (a list of files). It is nearly complete, though usage context relative to siblings is missing.

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 both parameters (name and absolute_paths) are already documented in the schema. The description adds no additional parameter meaning beyond naming the symbol concept.

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?

The description states a specific verb (lists) and resource (files that export a function, class, type or constant by name), and frames it as answering 'Where is symbol X defined?'. It is clear, but it does not explicitly distinguish itself from sibling tools like exports_in or who_imports.

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 question 'Where is symbol X defined?' implies the usage scenario, but there is no explicit guidance on when to use this tool versus alternatives such as exports_in or who_imports, and no exclusions or prerequisites are stated.

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