Skip to main content
Glama

Build Dependency Graph

build_dependency_graph

Scans project files to map dependencies and references, revealing how code modules connect for impact analysis and onboarding.

Instructions

Scan files and construct a complete mapping of dependencies and references in the project.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "build_dependency_graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and discloses almost nothing: it never says the operation is read-only (implied only by "scan"), whether it writes a cache or index to disk, how expensive a full-project scan is, or how broad "references" is (imports only, or symbol-level usage). For a potentially heavy whole-project analysis tool, that omission matters.

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?

One sentence, front-loaded with the action and ending on the output artifact; nothing is padded or redundant. It is under-specified rather than verbose, which is a different problem from wordiness.

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

Completeness2/5

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

An output schema exists, so return-value details are legitimately omitted, but the description still leaves the agent unable to predict scope or cost: which files are scanned, whether generated/vendored directories are excluded, and what "dependencies" means for this project. For a graph-construction tool with one undocumented parameter and no annotations, this is too thin.

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

Parameters2/5

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

The single parameter "path" has zero schema description coverage, and the description never mentions it at all — not that it scopes the scan root, not the default of ".", and not how subdirectory scoping affects the resulting graph. With coverage at 0%, the description needed to compensate and does not.

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 names a concrete verb pair ("scan files and construct") and a concrete artifact ("a complete mapping of dependencies and references in the project"), so an agent knows this produces a dependency graph rather than raw file contents. It does not distinguish itself from conceptually adjacent siblings such as impact_analysis or validate_architecture, which likely consume or produce similar graph data.

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?

There is no guidance on when to call this versus search_code, impact_analysis, or validate_architecture, and no statement of prerequisites or cost. The only contextual hint is "in the project," which implies whole-project scope but gives no trigger condition.

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