Skip to main content
Glama

identify_unreachable_modules

Identifies orphaned source files that are never imported, flagging dead code candidates for safe deletion while automatically excluding entry points.

Instructions

Finds source files that are never imported by any other file — dead code candidates safe to delete. Automatically excludes known entry points (index.ts, main.ts, pages/, routes/, app/, api/, bin/). Use to answer: which files in this codebase are orphaned and can be safely removed?

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax unreachable files to return (default: 50)
entry_pointsNoAdditional entry point files to exclude (absolute or relative to project_root). Common patterns like index.ts and pages/ are auto-excluded.
project_rootYesAbsolute path to the TypeScript project root (must contain tsconfig.json)
Behavior4/5

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

No annotations are provided, so the description carries the responsibility. It discloses a key behavioral trait: automatically excludes known entry points (index.ts, main.ts, pages/, etc.), affecting results. It also qualifies findings as 'candidates' rather than guarantees, adding nuance.

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?

The description is two concise sentences: the first states the purpose and key behavior, the second gives a direct usage question. Every word earns its place, with no filler or redundancy.

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 read-only analysis tool with three parameters and no output schema, the description covers the core context: purpose, auto-exclusion behavior, and an example query. It does not explicitly describe the return format, but that is not critical given the straightforward list-like output implied.

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 baseline is 3. The description mentions entry point exclusions but does not add detail beyond what the schema already provides for parameters like limit, entry_points, and project_root.

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 the tool 'Finds source files that are never imported by any other file' with a specific verb (Finds) and resource (unreachable modules), distinguishing it from sibling tools like get_dependency_graph. It also frames the purpose as identifying 'dead code candidates safe to delete'.

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 provides clear usage context with 'Use to answer: which files in this codebase are orphaned and can be safely removed?' It does not explicitly mention when not to use or alternatives, but the intended use case is well-defined.

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/vola-trebla/ast-impact-mapper-mcp'

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