Skip to main content
Glama

list_dependencies

Read-onlyIdempotent

Lists a module's import tree hop by hop: outgoing modules it uses or incoming modules that use it, showing how modules are wired together.

Instructions

Lists the import tree of one module, hop by hop: direction out is what the module uses, in is who uses it. Use it to see how modules are wired together. It gives no reasons and no reading order: before an edit use analyze_impact instead. module is a module ID or a file path as the other tools print it; depth is how many hops to follow, 2 by default and 0 for the module alone. Returns one line per edge, (dep A B :via imports :depth N) or (rdep A B ...). A long list stops at 200 items unless all is true. A name the graph does not hold is answered with an error line, with suggestions when similar names exist.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "module": "<module>"
    },
    "name": "list_dependencies"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNoList everything instead of stopping at 200 items.
depthNoHow many hops to follow.
moduleYesModule ID or file path, as printed by other tools (e.g. src/billing/invoice).
directionNoout: what the module uses; in: who uses the module.out

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.15.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, but the description adds real operational detail: a 200-item truncation cap with an `all` escape hatch, the one-line-per-edge return shape, and that unknown names produce an error line with suggestions. It doesn't discuss performance or graph staleness, which keeps it from a 5.

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?

Dense and front-loaded: purpose, alternative, then parameters, then output. Every sentence carries information, though the return-format and error-behavior details make it a fairly long single block for a simple read tool.

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

Completeness5/5

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

With no output schema, the description correctly compensates by specifying the returned edge format and truncation behavior, plus error handling for unknown module names. An agent has everything needed to call it correctly and interpret the result.

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 coverage is already 100%, so the bar is meaning beyond it. The description nonetheless clarifies that `depth` 0 means "the module alone" (the schema only gives a minimum), that `module` accepts an ID or a path "as the other tools print it", and how `direction` changes the result shape (`dep` vs `rdep`).

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?

"Lists the import tree of one module, hop by hop" names a specific verb and resource, and immediately disambiguates the two modes of `direction`. It also explicitly separates itself from `analyze_impact`, so an agent can pick the right tool without opening either schema.

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

Usage Guidelines5/5

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

It states the intended use ("see how modules are wired together") and an explicit exclusion with a named alternative: "It gives no reasons and no reading order: before an edit use `analyze_impact` instead." That is a clear when-to-use / when-not-to-use / alternative triad.

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