Skip to main content
Glama

get_dependencies

Analyze a source file to list its imports and dependencies, revealing which files it relies on. Supports custom scan directories, ignore patterns, and project root for flexible dependency analysis.

Instructions

Returns the list of files that a specific file imports/depends on. Useful for understanding what a file relies on.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesThe file path to analyze
src_dirNoSource directory to scansrc
scan_dirsNoOptional list of directories to scan (relative to project root unless absolute). Overrides src_dir.
project_rootNoProject root directory (defaults to server cwd if omitted)
ignore_patternsNoRegex patterns for files to ignore (applied to normalized paths).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral disclosure burden. It only states the basic return value and does not mention whether dependencies are direct or transitive, how missing files are handled, what path formats are returned, or any other operational behavior.

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 short and front-loaded with the core action. The second sentence is largely redundant with the first, but the overall structure is acceptable and free of unnecessary detail.

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?

Given there is no output schema and no annotations, the description is too minimal to fully prepare an agent for real usage. It does not explain return format, default scanning behavior, interaction with scan_dirs/src_dir/project_root, or how this tool differs from dependency-related sibling tools.

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

Parameters3/5

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

Schema description coverage is 100%, so the parameters are already well documented in the schema. The description adds no extra parameter-level context or clarification beyond the generic notion of analyzing a file.

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 clearly states the tool returns files that a specific file imports or depends on, with a specific verb and resource. It is clear, though it does not explicitly differentiate itself from siblings like get_impact or get_impact_from_diff.

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?

The phrase 'Useful for understanding what a file relies on' provides an implied use case, but there is no explicit guidance on when this tool should be chosen over related sibling tools such as get_impact or get_graph_stats.

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