Skip to main content
Glama
jgauffin

ts-language-mcp

by jgauffin

get_module_dependencies

Resolve and display all import dependencies of a TypeScript file, including what it imports and what imports it, using the TypeScript compiler to handle path aliases and package entry points.

Instructions

Show what a file imports and what imports it, resolved through the TypeScript compiler so tsconfig "paths" aliases and package entry points are handled correctly. Covers static imports, re-exports, dynamic import() and require(). Includes efferent/afferent coupling and instability.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the file (relative to project root)
directionNoWhich edges to return: what this file imports, what imports it, or both (default: both).
includeExternalNoInclude modules outside the project such as node_modules (default: false).
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the use of the TypeScript compiler, handling of tsconfig paths/aliases, and coverage of various import types. It also mentions including efferent/afferent coupling and instability. Missing info on performance, error handling, or rate limits, but the given behavioral detail is good.

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 a single sentence that packs significant detail without being overly long. It is front-loaded with the main action. Minor improvement could be breaking it into two sentences for readability, but it is concise and clear.

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?

Given the tool has 3 parameters and no output schema, the description is adequate but incomplete. It does not explain the output format, structure of dependencies, or how coupling metrics are presented. The schema covers parameters, but the agent would benefit from knowing what the return data looks like.

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 schema already documents parameters. The description adds context about the resolution mechanism and import types covered, which hints at the behavior of the parameters but does not directly add per-parameter meaning beyond the schema. Baseline 3 is appropriate.

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?

Clearly states the tool shows what a file imports and what imports it, resolved through the TypeScript compiler, covering static, re-export, dynamic, and require imports. It also mentions coupling metrics, distinguishing it from similar tools like 'get_imports' which may not resolve paths or include coupling.

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 description implies it is used for dependency analysis with TS compiler resolution, but it does not explicitly state when to use this tool versus siblings like 'get_imports', 'calculate_metrics', or 'find'. No guidance on when not to use it or prerequisites.

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/jgauffin/ts-language-mcp'

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