Skip to main content
Glama
codedev-mcp

codedev-mcp

by Kranthithota

find_dead_code

Read-onlyIdempotent

Detect potentially dead code by locating unused exports and unreferenced functions, with optional directory and file-pattern filters.

Instructions

Find potentially dead code: unused exports, unreferenced functions.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "find_dead_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
directoryNoSubdirectory to search
file_globNoFilter by file pattern

Output Schema

NameRequiredDescriptionDefault
checkYes
totalYes
matchesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.5

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and a closed-world scope, so the safety profile is covered for free. The description adds one genuinely useful behavioral trait beyond that: the word 'potentially' signals these are heuristic findings that may include false positives. It does not say whether analysis is language-aware or what the practical limits are.

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?

A single front-loaded sentence with zero filler; the resource comes immediately after the verb and the clarifying examples follow a colon. It is perhaps too compressed to structure the agent's next step, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema and annotations both present, the description does not need to explain return values or safety, and for a two-optional-parameter read tool it is close to sufficient. Gaps remain around analysis scope (whole repo vs. directory default) and how it differs from find_references, which matter for correct invocation.

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 'directory' and 'file_glob' are already fully documented in the schema. The description mentions neither, adding no scoping semantics (e.g. how the two filters compose, or what the default search root is). Baseline 3 applies when the schema carries the parameter burden.

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?

States a specific verb and resource ('Find ... dead code') and enumerates the two things it looks for ('unused exports, unreferenced functions'), so the agent knows exactly what class of result comes back. It does not distinguish itself from adjacent siblings such as find_references or find_duplicates, which is the only thing keeping it off a 5.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites, and no mention of any alternative tool or when this one would be the wrong choice. The agent must infer from the sibling list alone whether dead-code detection or reference lookup is the right call.

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