Skip to main content
Glama
gclluch
by gclluch

get_callers

Map reverse call graph to find all direct and indirect callers of a given Python function in a file or package.

Instructions

Reverse call graph: who calls this function, directly and transitively.

Args: path: Path to a .py file. function: Function name or Class.method. scope: "file" (default) or "package".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
scopeNofile
functionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses key behavioral traits: the result includes direct and transitive callers, and scope can be restricted to file or package. It does not mention edge cases (e.g., missing files) or return format, but the presence of an output schema covers return format to some extent.

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?

The description opens with a one-sentence summary that captures the tool's essence, followed by a compact, well-structured Args list. Every word is purposeful; no redundant or vague phrasing is present.

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?

The description covers purpose, parameters, and key behavioral nuances (transitive, scope). It lacks examples or caveats about failure modes, but given the presence of an output schema and only three parameters, it is sufficient for an agent to invoke correctly. It could be enhanced with a brief example or note about handling missing functions.

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 schema has no descriptions (0% coverage), but the description's Args section provides clear, essential meanings for each parameter. It explains that path is a .py file, function accepts 'Class.method', and scope has a default of 'file' or 'package'. This fully compensates for the schema gap.

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 computes a reverse call graph and lists direct and transitive callers of a given function. This specific verb+resource scope distinguishes it from siblings like 'call_graph' and 'find_usages' which have broader or different focus.

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 purpose implies usage when one needs to know who calls a function, but there is no explicit guidance on when to use this tool versus alternatives, nor any exclusions or prerequisites. It does not mention that 'call_graph' or 'find_usages' might serve different needs.

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/gclluch/py-ast-mcp'

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