Skip to main content
Glama

get_dead_code

Detect dead code in your repository—unused exports, unreachable files, zombie packages—ranked by confidence 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.
    min_confidence: floor, default 0.4 (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
Behavior5/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 output rollups, confidence tiers, workspace mode's effect on confidence, and safe_only semantics ('no runtime-load risk'), offering rich behavioral detail.

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 efficiently structured: a summary line, a usage guideline, then an Args block with terse explanations. It covers 13 parameters without unnecessary verbosity.

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?

Despite 13 parameters and no annotations, the description covers all parameter semantics, usage timing, output rollups, and workspace behavior. It is complete enough for reliable tool selection and invocation.

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 compensates fully. It explains each parameter's meaning, defaults (min_confidence=0.4, limit clamped to 25), and filter behavior (kind, tier, directory, owner, group_by, etc.).

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's function: detecting 'Unused exports, unreachable files, zombie packages — tiered by confidence.' It uses specific verbs and resource types, distinguishing it from siblings like get_risk or get_overview.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit 'when' ('Run before a cleanup sprint') and 'when-not' ('not a targeted fix') guidance. Although no alternative tools are named, the usage context is unmistakable.

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