Skip to main content
Glama
okeefeco

PyEye Server

by okeefeco

find_references

Find all usages of a Python symbol, including subclass references, with options to filter fields and include subclasses. Supports precise location or symbol name input.

Instructions

Python: Find ALL usages of a symbol. Understands inheritance - grep misses subclass refs.

For general use, prefer lookup() which accepts any identifier form. This tool provides fields filtering, include_subclasses, and symbol_name for full reference lists.

Two calling conventions (coordinates take precedence if both provided):

  1. Coordinates: file + line + column (precise, unambiguous)

  2. Symbol name: symbol_name only (convenient; fails if name is ambiguous)

If symbol_name matches multiple symbols, returns error with a "matches" list so you can pick the right one and retry with coordinates.

Args: file: Path to the file (required with line and column) line: Line number (1-indexed, required with file and column) column: Column number (0-indexed, required with file and line) symbol_name: Symbol name (alternative to file+line+column) project_path: Root path of the project include_definitions: Include definitions in results include_subclasses: Also find references to all subclasses (polymorphic search) fields: Fields to include per reference. Valid: name, type, line, column, description, full_name, file, is_definition. Default: all fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
lineNo
columnNo
project_pathNo.
include_definitionsNo
include_subclassesNo
fieldsNo
symbol_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Despite no annotations, the description fully discloses behavioral traits: it understands inheritance, returns error with matches list if ambiguous, and explains precedence of coordinates over symbol name. It also details output fields and defaults. No contradictions.

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?

The description is well-structured with a summary, usage guidance, conventions, and parameter details. It is front-loaded with key information. However, it is somewhat lengthy and could be slightly trimmed without losing clarity, but it remains effective.

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?

Given 8 parameters, no annotations, and complex features (two conventions, inheritance, error handling), the description covers all necessary aspects. It also has an output schema (not shown) so return values are handled. The description is complete for an agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the schema, which has 0% coverage. It explains each parameter, including indexing conventions (line 1-indexed, column 0-indexed), the interaction between coordinate parameters and symbol_name, and the valid values for fields. This is essential for correct usage.

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?

The description clearly states the tool finds all usages of a symbol in Python, understands inheritance, and distinguishes itself from grep. It also mentions an alternative tool (lookup()) and explains two calling conventions, making the purpose very specific.

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?

The description explicitly advises to prefer lookup() for general use, explains when to use coordinates vs symbol name, and warns that symbol name can fail if ambiguous. This gives clear guidance on when to use this tool vs alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/okeefeco/pyeye-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server