Skip to main content
Glama
reflex-search

Reflex

Official

get_transitive_deps

Walk the transitive dependency tree of a file up to a specified depth, revealing the full static import chain to analyze coupling and refactoring impact.

Instructions

Walk the transitive dependency tree of a file up to depth levels (default 3). Prefer this over hand-rolling recursive grep across imports — Reflex traverses the static import graph directly, returning a map of file → depth.

Use this for: understanding the full dependency chain, analyzing deep coupling, planning refactoring blast radius. Example: depth=2 finds file → deps → deps of deps. Only static imports (string literals) are followed; dynamic imports are filtered by design. On "Index not found" / "stale" error, call index_project, then retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path (supports fuzzy matching)
depthNoMaximum depth to traverse (default: 3, max recommended: 5)
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: only static imports are followed, dynamic imports are filtered, it returns a map of file to depth, and handles errors. This exceeds the burden for a tool without annotations.

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 description is well-structured with separate concerns: main action, use cases, example, constraints, and error handling. Each sentence contributes meaningful information, though it could be slightly more concise without losing clarity.

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?

Despite lacking an output schema, the description explains the return format as a map of file to depth. It covers error recovery and constraints. Some detail about the map's exact structure (e.g., depth as integer) is implied but not explicit, which is acceptable.

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% with descriptions for both parameters. The description adds value by specifying default depth (3), max recommended depth (5), and that path supports fuzzy matching. This goes beyond the schema's explanations.

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?

The description clearly states it walks the transitive dependency tree of a file up to a specified depth. It specifies verb 'walk', resource 'transitive dependency tree', and result 'map of file → depth'. It distinguishes from siblings by recommending this over 'hand-rolling recursive grep' and noting that it only follows static imports.

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?

The description explicitly lists use cases: understanding dependency chains, analyzing coupling, planning refactoring. It provides an example with depth=2 and advises on error handling (call index_project on 'Index not found' and retry). It could be improved by explicitly contrasting with siblings like get_dependencies or find_references.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/reflex-search/reflex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server