Skip to main content
Glama

dead_code

Read-onlyIdempotent

Find candidate dead code by listing functions and methods with no inbound references. Returns symbols to verify before cleanup.

Instructions

Find symbols that nothing in the indexed graph references — candidate dead code. Lists functions/methods (optionally types/vars) with no inbound call or read edge, after excluding entrypoints, tests, and HTTP handlers that a runtime invokes. Returns CANDIDATES to verify, not a delete list: the call graph misses dynamic dispatch, reflection, and cross-repo callers. Use before a cleanup pass; confirm each with impact(upstream) + a name search first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNoRepository name
kindsNoComma list of symbol kinds to scan: function,method,class,variable,type_alias,enum (default function,method)
top_kNoMax candidates to return (default 50)
formatNoResponse text encoding: toon (default) | json
include_testsNoInclude symbols defined in test files. Default false.
include_exportedNoAlso report exported/public symbols (higher false-positive rate — they may have external callers). Default false.
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive. The description adds that it returns CANDIDATES not a delete list, and discloses limitations (missing dynamic dispatch, reflection, cross-repo callers). This adds value beyond annotations.

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 concise (three sentences) with no fluff. It front-loads the core purpose and immediately follows with critical context (exclusions, limitations, usage guidance). Every sentence serves a clear purpose.

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 having 6 parameters and no output schema, the description is highly complete. It explains what the tool returns (CANDIDATES), what it excludes, its limitations, and how to use it properly (verify with impact calls and name search). This provides sufficient context for an agent to invoke it correctly.

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 coverage is 100%, so baseline 3. The description hints at the 'kinds' parameter ('Lists functions/methods (optionally types/vars)') but does not elaborate beyond the schema descriptions. It adds no new semantic detail for other parameters like top_k, format, include_tests, or include_exported.

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 finds symbols not referenced in the indexed graph, listing candidate dead code. It specifies the symbol kinds (functions/methods, optionally types/vars) and exclusions (entrypoints, tests, HTTP handlers). The verb 'find' and resource 'dead code' are precise and distinct from sibling tools.

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?

Explicit guidance is provided: 'Use before a cleanup pass; confirm each with impact(upstream) + a name search first.' It also explains limitations (dynamic dispatch, reflection, cross-repo callers) implying when not to rely solely on the tool. It does not explicitly compare to sibling tools but the context is clear.

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/VeyrForge/codehelper'

If you have feedback or need assistance with the MCP directory API, please join our Discord server