Skip to main content
Glama

Map a file's dependency neighborhood

map_dependencies
Read-only

Find a file's local imports, reverse imports, and related tests in JavaScript/TypeScript to reveal static dependency chains with line-level evidence.

Instructions

Find a file's local imports, reverse imports and tests connected by imports. Each relationship includes a source path and line as evidence. Static file relationships, not runtime callers or test coverage. Scans JavaScript/TypeScript including tests, with bounded work and explicit unresolved imports and scan limits. Deterministic; no provider call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesSource file, absolute or relative to directory
depthNoImport hops in each direction, default 1
limitNoTotal neighboring files to return, default 50
maxFilesNoMaximum source files to discover, default 1000
directoryYesProject directory; source outside this directory is excluded

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.2

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/destructiveHint/openWorldHint, so the safety profile is covered; the description adds genuinely new traits: determinism ('no provider call'), bounded work with surfaced 'unresolved imports and scan limits', and the evidence format (source path + line per relationship). This goes meaningfully beyond the annotations, though it doesn't detail failure modes or how unresolved imports are reported.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with the purpose, then scope, behavior and determinism. No sentence is redundant: each adds a distinguishing constraint (edge types, static-only, language scope, bounded/deterministic execution).

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 takes on the burden of explaining returns and does so ('Each relationship includes a source path and line as evidence'), plus it discloses static vs runtime semantics, language support, bounded scanning and determinism. Nothing an agent needs to decide or invoke correctly is missing.

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 depth, limit, maxFiles and directory are already documented in the schema, including defaults and bounds. The description only loosely gestures at these via 'bounded work and explicit ... scan limits' and adds no syntax or interaction detail, so the baseline of 3 applies.

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 uses a specific verb and resource ('Find a file's local imports, reverse imports and tests connected by imports') and names the exact edge types returned, so the tool's scope is unambiguous. It does not explicitly contrast itself with siblings like analyze_file or scan_project, so it stops short of full sibling differentiation.

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?

It clearly bounds when this applies ('Static file relationships, not runtime callers or test coverage') and states the language scope ('JavaScript/TypeScript including tests'), which tells an agent when this tool is the right fit. It still never names an alternative tool to use instead for runtime callers or coverage.

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