Skip to main content
Glama

codebase_flow

Trace code execution flow forward from an entry point to reveal downstream calls, or return ranked auto-detected entry points when none is supplied.

Instructions

Trace the EXECUTION FLOW forward from an entry point — what does this code call into? With NO args, returns a ranked list of auto-detected entry points (orphans with outgoing calls, conventional names like main(), framework routes, tests). With an entrypoint argument, returns the call tree.

Input Schema

NameRequiredDescriptionDefault
fileNoOptional file hint to disambiguate the symbol.
depthNoMaximum DFS depth (default 5, max 10).
limitNoMaximum candidates to list when the entrypoint is ambiguous. Omit to list all.
entrypointNoSymbol name to trace from. Omit to list auto-detected entry points.
projectPathNoAbsolute path to the project directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.16.1
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Maximum candidates to list when the entrypoint is ambiguous. Omit to list all.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. Addedv1.8.2
  3. Removedv1.8.1
  4. Addedv1.7.2

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses what each mode returns (ranked entry points vs. call tree) and what counts as an auto-detected entry point. It says nothing about prerequisites (index/graph build required), performance, or side effects, which matters for a 5-parameter analysis tool.

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 sentences, front-loaded with the core verb and the directional cue, then the mode-dependent behavior. The parenthetical enumeration is dense but each clause contributes distinct information; there is no filler.

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?

Covers both modes and their outputs adequately for a tool with no output schema, and the individual parameters are fully documented in the schema. It leaves a small gap around the shape of the returned call tree and any requirement that the project be indexed first.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it explains the no-argument case and what 'auto-detected entry points' actually are (orphans with outgoing calls, conventional names, framework routes, tests). That definitional context is not present in any parameter description.

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?

States a specific verb and resource — 'Trace the EXECUTION FLOW forward from an entry point' — and uses the directional word 'forward' to signal it is not reverse/impact analysis. Sibling tools such as codebase_impact and codebase_graph_query are never named, so an agent must infer the distinction rather than being told it.

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

Usage Guidelines4/5

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

It clearly separates the two invocation modes: no args lists candidate entry points, passing an entrypoint traces the call tree. That is genuine when-to-use guidance for a dual-mode tool, though it offers no exclusions or named alternatives for overlapping graph tools.

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