Skip to main content
Glama
gclluch
by gclluch

call_graph

Generates a Mermaid flowchart of call relationships in a Python file or package. Optionally roots the graph at a specific function, adjusts direction, and includes external calls.

Instructions

Emit a Mermaid flowchart of the call relationships in a file or package.

Args: path: Path to a .py file. function: Optional root; only calls reachable from it are drawn. direction: Mermaid layout direction: TD, TB, LR, RL or BT. include_external: Include calls to names not defined in scope. scope: "file" (default) or "package" to walk every .py file in the containing directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
scopeNofile
functionNo
directionNoTD
include_externalNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description must carry the transparency burden. It discloses the output type (Mermaid flowchart), the effect of parameters like function and include_external, and that package scope walks all .py files. However, it does not discuss error handling, performance, or whether any modifications occur, leaving some behavioral aspects undisclosed.

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 opens with a clear purpose sentence and proceeds to a structured Args list. While the parameter list is somewhat long, it is necessary and each line serves a purpose. The information is well-organized and not redundant.

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 the purpose, all parameters, and important scope semantics. Since an output schema exists, the return format does not need to be detailed. It misses potential edge cases or when to choose package over file scope, but overall it is sufficiently complete for invocation.

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, but the description's Args section clearly documents all five parameters, including defaults and options. This fully compensates for the lack of schema coverage and adds meaning beyond the raw schema.

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 clearly states the tool emits a Mermaid flowchart of call relationships in a file or package, which specifies both the action and resource. It does not explicitly differentiate from sibling tools like get_callers or list_functions, so it falls short of 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?

The description implies usage for visualizing call relationships and explains scope options, but it does not provide explicit when-to-use or alternative guidance compared to sibling tools. This is implied rather than explicit.

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