Skip to main content
Glama

Verify dead code with an LLM

verify_dead_code
Read-only

Review suspected unused code candidates with an LLM after static analysis to reduce false positives before deleting dead code; requires SKYLOS_API_KEY and provider credentials.

Instructions

Ask an LLM to review selected unused function, class, import and variable candidates, with its reasoning.

Use it after analyze when you need fewer false positives before deleting code. Sends code snippets and search results to the chosen model provider, so it needs the skylos[llm] extra and provider configuration, including credentials when required. Candidates outside the review limits, or whose use remains uncertain, can remain unverified. Does not edit files. Refuses to run when the static analysis was incomplete.

Requires SKYLOS_API_KEY: this tool returns an authentication error unless the MCP server is started with SKYLOS_API_KEY set. Without a key only analyze works (5 calls/day). The local CLI needs no key: skylos verify <file> and skylos agent install-hooks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesDirectory or file to scan. A relative path resolves against the MCP server's working directory.
modelNoLLM model name passed to the provider (e.g. gpt-4.1 or a Claude model). Configure the provider's credentials in the MCP server's environment when required by that provider.gpt-4.1
confidenceNoMinimum confidence (0-100) for dead-code findings. Higher values report fewer, surer candidates; 60 is the CLI default.
max_verifyNoMaximum findings in the main LLM verification pass. Entry discovery, prefiltering and challenges can make additional model calls.
max_challengeNoMaximum number of surviving findings the model re-checks in a second pass.
exclude_foldersNoExtra folder names to skip, comma-separated (e.g. "migrations,scripts"). Added to the default excludes.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv4.49.0
    • addedInput schema / properties / confidence / description
      Added value: +"Minimum confidence (0-100) for dead-code findings. Higher values report fewer, surer candidates; 60 is the CLI default."
    • addedInput schema / properties / exclude_folders / description
      Added value: +"Extra folder names to skip, comma-separated (e.g. \"migrations,scripts\"). Added to the default excludes."
    • addedInput schema / properties / max_challenge / description
      Added value: +"Maximum number of surviving findings the model re-checks in a second pass."
    • addedInput schema / properties / max_verify / description
      Added value: +"Maximum findings in the main LLM verification pass. Entry discovery, prefiltering and challenges can make additional model calls."
    • addedInput schema / properties / model / description
      Added value: +"LLM model name passed to the provider (e.g. gpt-4.1 or a Claude model). Configure the provider's credentials in the MCP server's environment when required by that provider."
    • addedInput schema / properties / path / description
      Added value: +"Directory or file to scan. A relative path resolves against the MCP server's working directory."
  2. Addedv4.10.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnlyHint=true, destructiveHint=false), and the description adds substantial context beyond them: code snippets are sent to an external model provider, the `skylos[llm]` extra and provider credentials are required, files are never edited, and it refuses to run on incomplete static analysis.

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?

Front-loaded with the purpose followed by prerequisites, limits, and auth. Most sentences earn their place, though the API-key/CLI paragraph is somewhat verbose and restates the credential requirement already implied earlier.

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?

For a network-dependent LLM-backed tool with an output schema, the description covers everything an agent needs: prerequisite ordering after `analyze`, external-provider auth, SKYLOS_API_KEY requirement with the 5-calls/day fallback, non-destructive behavior, and the fact that some candidates may remain unverified.

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 all six parameters are already documented in the schema; the description adds little parameter-level detail beyond implying review-limit behavior ('candidates outside the review limits... can remain unverified'). Baseline 3 is appropriate when the schema does the heavy lifting.

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?

States a specific verb (verify) and resource (dead-code candidates: unused functions, classes, imports, variables) plus the mechanism (an LLM review with reasoning). It is clearly separable from 'analyze' (the static pass) and from sibling scanners like security_scan or quality_check.

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?

Explicitly sequences usage: 'Use it after `analyze` when you need fewer false positives before deleting code.' It also states when it will not help ('candidates outside the review limits, or whose use remains uncertain, can remain unverified') and when it refuses to run (incomplete static analysis).

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