Skip to main content
Glama

Find orphan code

orphans
Read-onlyIdempotent

Scan a project for functions, classes, and modules unreachable from its entry points; flag dead, test-only, and uncertain dynamic-dispatch code, judged against an optional goal contract.

Instructions

Functions, classes and modules nothing reachable from the project's entry points uses: dead, test-only or uncertain (dynamic dispatch). Judged against the goal contract when there is one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalNogoal contract file; default PATH/code-guardian.goal.toml if present
pathYesthe project directory to read

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description goes further by disclosing the result taxonomy (dead, test-only, uncertain via dynamic dispatch) and that judgment is scoped to the goal contract, which is real added context.

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 dense sentence that front-loads the definition of an orphan and layers qualifications after it. Every clause earns its place, though the phrasing is compressed to the point of being slightly hard to parse.

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?

For a read-only analysis tool with annotations covering safety and no output schema, the description is adequate but not rich: it omits what the result list looks like at a summary level and how it relates to the sibling analysis tools. It is complete enough to invoke but not to choose confidently.

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 both parameters are documented in the schema itself. The description reinforces the goal-contract concept that the goal parameter controls, but adds no syntax, default, or format detail beyond the schema. 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?

The description names a specific analysis task and even defines its core term: code nothing reachable from entry points uses, split into dead, test-only, or uncertain categories. It is clear what the tool produces, but it never distinguishes itself from the scan or explain siblings.

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 statement of when to run this versus scan or explain, and no prerequisites beyond the implicit 'point it at a project'. The clause about the goal contract hints at behavior but is not usage guidance.

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

Deploy Server

Other Tools