Skip to main content
Glama

find_dead_code

Detects functions and methods with no callers to identify potentially unused code in a project, helping you clean up and maintain codebases.

Instructions

Find potentially dead code - functions/methods with no callers

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
limitNoMax results
projectNoProject namedefault

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. The word 'potentially' correctly signals that this is static call-graph analysis with false positives (dynamic dispatch, entry points, exports), but it never explains that limitation, nor whether results are truncated by limit, nor what indexing state is required.

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 sentence with zero filler, front-loading the action and then the scoping definition. It is efficient, though a brief note on prerequisites or interpretation would have been worth the extra words.

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

Completeness2/5

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

For a tool with no annotations and no output schema, the definition leaves the agent guessing about prerequisites (does the project need to be indexed?), result contents, and how to interpret 'potentially'. The complexity is low, but the missing index prerequisite and false-positive caveat are material.

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% for both parameters ('Max results', 'Project name'), so the schema already does the work and the description adds no further meaning. Baseline 3 applies.

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 ... code') and narrows the target precisely to 'functions/methods with no callers', which lets an agent distinguish it from graph/trace tools like trace_calls. It stops short of explicitly contrasting with those siblings, so it is clear but not fully differentiated.

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

Usage Guidelines3/5

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

Usage is implied by the name and the 'no callers' definition — an agent can infer this is the cleanup/dead-code sweep tool. There is no explicit when-to-use, no stated prerequisites (e.g., that the project must be indexed first), and no guidance on verifying flagged results with trace_calls or query_graph.

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