Skip to main content
Glama
reflex-search

Reflex

Official

get_dependencies

Trace static imports for a file: list its dependencies by path, line, and type, or find files that import it in reverse. Set depth to follow imports N levels.

Instructions

The imports of a file: path, line, internal/external/stdlib. reverse:true lists the files that import it instead; depth:N follows imports N levels (a list of {path, depth}). Static imports only; path may be a fragment or file name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path, fragment or name
depthNoFollow imports this many levels
reverseNoFiles that import this file

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.0.3
    • addedInput schema / properties / depth
      Added value: +{
      +  "description": "Follow imports this many levels",
      +  "type": "integer"
      +}
    • changedInput schema / properties / path / description
      Previous value: -"File path (supports fuzzy matching: 'Controllers/FooController.php' or just 'FooController.php')"New value: +"File path, fragment or name"
    • addedInput schema / properties / reverse
      Added value: +{
      +  "description": "Files that import this file",
      +  "type": "boolean"
      +}
  2. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/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 does well: it discloses the result shape (path, line, classification) and that depth returns a {path, depth} list. It also flags a meaningful constraint, 'Static imports only.' It stops short of any performance or indexing caveats.

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?

A single dense sentence cluster with no filler; the core behavior and the reverse alternative are front-loaded. The semicolon stacking is compact but slightly terse, and 'counter' terminology is never defined.

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?

For a 3-parameter read tool with no output schema, the description covers the return fields, the mode parameters, and the static-import limitation. An agent can call it correctly; only cross-tool routing against find_references is left unaddressed.

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 100%, so the baseline is 3, but the description earns more by explaining both optional parameters' actual effect: reverse inverts the query direction, and depth changes the return type to a {path, depth} list. It also adds that path may be a fragment or file name, useful caller-facing detail.

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 resource ('The imports of a file') and enumerates the returned fields (path, line, internal/external/stdlib), so the agent knows exactly what it retrieves. It does not, however, differentiate itself from sibling find_references, which the reverse:true mode overlaps with.

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

Usage Guidelines3/5

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

It clarifies the two mode-switching parameters ('reverse:true lists the files that import it instead; depth:N follows imports N levels') and notes the 'Static imports only' limitation, which is real usage guidance. It never states when to prefer this over find_references or analyze, leaving cross-tool selection inferred.

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