Skip to main content
Glama

get_dead_code

Scan codebase for unused exports, unreachable files, and zombie packages. Tier findings by confidence (high/medium/low) and filter by directory, owner, or kind for targeted cleanup.

Instructions

Unused exports, unreachable files, zombie packages — tiered by confidence.

Run before a cleanup sprint, not a targeted fix. Findings tier
high/medium/low with per-directory and per-owner rollups; workspace
mode lowers confidence on findings other repos import.

Args:
    repo: usually omitted.
    kind: unreachable_file | unused_export | unused_internal | zombie_package.
    min_confidence: floor, default 0.5 (0.7 = cleanup-ready only).
    safe_only: deletion-ready findings only (no runtime-load risk).
    limit: max findings per tier (clamped to 25).
    tier: "high" (>=0.8) | "medium" | "low".
    directory: path-prefix filter.
    owner: primary-owner filter.
    group_by: "directory" | "owner" rollup.
    include_internals: also scan private symbols (more false positives).
    include_zombie_packages: monorepo package findings (default true).
    no_unreachable: skip file-level reachability findings.
    no_unused_exports: skip public-export findings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo
repoNo
tierNo
limitNo
ownerNo
group_byNo
directoryNo
safe_onlyNo
min_confidenceNo
no_unreachableNo
include_internalsNo
no_unused_exportsNo
include_zombie_packagesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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 that findings are tiered (high/medium/low), includes per-directory and per-owner rollups, and notes that workspace mode lowers confidence. It also explains parameters like safe_only and min_confidence that affect behavior. However, it does not explicitly state that the tool is read-only or describe auth/rate limits.

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 extremely concise and well-structured. The first line states the purpose, the second gives usage guidance, and the remaining lines are a clean parameter list. No redundant sentences or words.

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?

Given the tool's complexity (13 parameters, no required, output schema exists), the description covers the purpose, usage context, parameter semantics, and output format (tiered rollups). It is complete enough for an agent to understand when and how to use the tool, without needing to infer from the schema alone.

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

Parameters5/5

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

Schema description coverage is 0%, so the description fully compensates. It provides clear, concise explanations for all 13 parameters, including example values for 'kind', default values (e.g., min_confidence default 0.5), and behavioral notes (e.g., limit clamped to 25). This adds essential meaning beyond the bare schema.

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 what the tool does: finds unused exports, unreachable files, and zombie packages, tiered by confidence. The verb 'get' and noun 'dead_code' are precise, and the description distinguishes it from sibling tools like generate_refactoring_code or get_answer by focusing on dead code detection for cleanup sprints.

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 advises to 'Run before a cleanup sprint, not a targeted fix,' providing clear usage context. However, it does not mention when not to use the tool or suggest alternative tools for specific scenarios, such as targeted fixes.

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/repowise-dev/repowise'

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