Skip to main content
Glama

find_dependency_path

Finds the shortest dependency path between two project files and returns the dependency chain or a message if no path exists.

Instructions

Finds the shortest dependency path between two files.

Args:
    from_file: Source file path (relative to project root)
    to_file: Target file path (relative to project root)
    max_depth: Maximum search depth (default 10)

Returns:
    Dependency chain from source to target, or message if no path found

Input Schema

NameRequiredDescriptionDefault
to_fileYes
from_fileYes
max_depthNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

B3.3/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 does disclose the no-path case ('message if no path found') and the depth default, which helps, but it never states that the operation is read-only, whether edge direction means dependencies-of-source or dependents, how cycles are handled, or the cost of raising max_depth on a large graph.

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 one-line purpose sentence is front-loaded, and the Args/Returns blocks are compact and skimmable. The only waste is restating the max_depth default that already appears in the schema's default field.

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?

The output schema means return values needn't be spelled out, and the args are covered, but for a graph-traversal tool sitting among many dependency-related siblings the definition omits the routing guidance and traversal semantics an agent needs to call it with confidence.

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 0%, and the description fully compensates for the two path parameters by specifying they are relative to the project root, plus the default and intent of max_depth. It falls short of explaining what a max_depth cutoff does (truncated result vs. error) or how paths are normalized.

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: 'Finds the shortest dependency path between two files.' This is clearly distinct from set-like siblings such as get_file_relations or get_dependencies_with_depth, but the description never explicitly contrasts itself with those nearby tools, so differentiation is left to inference.

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 statement of when to reach for this tool versus check_dependencies, get_dependencies_with_depth, or get_file_relations, all of which operate on the same dependency graph. The Args block implies the shape of a call but gives no selection criteria or exclusions.

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