Skip to main content
Glama
kvnpetit

SRC (Structured Repo Context)

by kvnpetit

get_call_graph

get_call_graph
Read-onlyIdempotent

Analyze function call relationships in a codebase by querying callers and callees for a specific function or retrieving full call graph statistics.

Instructions

Analyze function call relationships in a codebase. Query callers/callees for a specific function or get full call graph statistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
excludeNoGlob patterns to exclude from analysis
filePathNoOptional: file path to narrow down function search (used with functionName)
maxDepthNoMaximum depth for call chain traversal (default: 2)
maxFilesNoMaximum number of files to analyze (default: 500)
maxNodesNoMaximum number of relationship nodes returned (default: 200)
directoryNoPath to the directory to analyze.
functionNameNoOptional: specific function name to query callers/callees for

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
metaYes
errorNo
messageNo
successYes
schema_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is complete. The description adds minor behavioral context by distinguishing between targeted caller/callee queries and full statistics, but it does not disclose cap behavior, traversal limits, or potential cost/scale implications beyond what parameter defaults already imply.

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 only two sentences and is front-loaded with the core purpose. It wastes no words, though 'full call graph statistics' is slightly vague and could be more concrete without bloating the text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists and annotations cover the read-only/idempotent profile, so return values and safety need little explanation. However, the description does not explicitly state how functionName and filePath interact, whether functionName is required for caller/callee queries, or what 'full call graph statistics' means. For a tool with seven optional parameters and two modes, this leaves some ambiguity.

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 the schema fully documents all seven parameters. The description adds little beyond naming the two modes, which loosely maps to functionName and directory, but it does not add meaning to exclude, maxDepth, maxFiles, maxNodes, or filePath. A baseline of 3 is appropriate given high schema coverage.

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 and resource: 'Analyze function call relationships in a codebase' and 'Query callers/callees for a specific function or get full call graph statistics.' It clearly identifies what the tool does, but it does not explicitly differentiate it from sibling tools like get_dependency_graph or get_symbol_graph, so it falls short of the top score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives some sense of the two modes (specific function lookup vs. full statistics) but provides no guidance on when to choose this tool over alternatives such as get_dependency_graph or semantic_navigation. There are no explicit context conditions, exclusions, or sibling comparisons, leaving the agent to infer appropriate usage.

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