Skip to main content
Glama

get_dead_code

Find dead code in your codebase, from unused exports to unreachable files and zombie packages, with confidence-based tiers to prioritize 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.
        An unrecognised value is dropped and named in ignored_arguments,
        never applied as a filter that matches nothing.
    min_confidence: floor, default 0.4 (0.7 = cleanup-ready only). Also
        accepts a tier name: "high" (0.8) | "medium" (0.5) | "low" (0.0).
    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.
    finding_id: stable ``id`` emitted by a dead-code finding.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does an excellent job: it discloses how invalid 'kind' values are handled, that 'limit' is clamped, that min_confidence accepts numeric values or tier names, that safe_only means deletion-ready findings, and that workspace mode lowers confidence. These are meaningful behavioral traits that an agent would not otherwise know.

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 long but appropriately so for 14 undocumented parameters, and it front-loads the core use case before the parameter list. Each argument line is terse and informative; there is minor redundancy in repeating tier thresholds across min_confidence and tier, but it's justified because both parameters accept tier concepts.

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 14 parameters, no annotations, and no schema-level descriptions, the definition is strikingly complete: it covers every parameter, explains non-obvious behaviors, provides usage context, and mentions rollups and confidence-lowering behavior in workspace mode. Since an output schema exists, the lack of detailed return-value documentation is not a gap.

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 must fully compensate, and it does: every one of the 14 parameters gets its own explanation with defaults, allowed values, and edge-case behavior. For example, min_confidence is documented with both numeric thresholds and tier-name equivalents, and kind documents what happens with unrecognized input.

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 identifies the resource: dead code (unused exports, unreachable files, zombie packages) and communicates the core capability of tiering findings by confidence. It does not use a single explicit verb like 'return' or 'list', and it doesn't explicitly distinguish itself from sibling tools, but the dead-code focus makes the purpose unambiguous.

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 line 'Run before a cleanup sprint, not a targeted fix' explicitly states when to use and when not to use the tool, which is strong usage guidance. However, it doesn't name alternative sibling tools for targeted fixes, so the guidance is clear on timing/context but lacks explicit alternative routing.

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

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