Skip to main content
Glama

find_orphans

Identify code entities with no incoming calls, imports, or extends edges to surface dead-code candidates during cleanup audits; entry points and test code are excluded.

Instructions

Find code entities with no incoming calls/imports/extends edges — dead-code candidates. Use during cleanup audits. Entry points like main() surface by design; test code is excluded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesAbsolute path to the project root containing `.cogz/`.
limitNo
entity_typeNoCode entity type to check: function, class, file, or module. Default: functions and classes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.6

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does real work: it warns that entry points like main() surface by design (a known false-positive class) and that test code is excluded. It does not state read-only nature, performance characteristics, or result ordering, but the two disclosed caveats are exactly the traps an agent would otherwise mis-handle.

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?

Three short sentences, front-loaded with the core definition, followed by usage context and two caveats. No filler, no restatement of the tool name.

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

Completeness4/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 no output schema, the description covers purpose, when-to-use, and two important caveats (entry points, test exclusion). It stops short of describing what a result item contains or how to disambiguate entity_type/limit, but that is a modest gap rather than a blocking one.

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 67%: `repo` and `entity_type` are documented in the schema, while `limit` has no description anywhere. The description adds the edge-relation vocabulary (calls/imports/extends) and confirms the default entity scope, but does nothing to clarify `limit` or how entity_type values map to results, so it only marginally exceeds the schema baseline.

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 precise verb+resource ('find code entities') and defines the exact condition that qualifies one ('no incoming calls/imports/extends edges'), which is genuinely distinguishing information an agent cannot get from the name alone. It is clearly separable from siblings like list_entities, query_entities, and get_callers.

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?

Gives a clear when-to-use context ('use during cleanup audits'), which is more than most siblings offer, but names no explicit alternative or exclusion condition (e.g., when to prefer get_callers or query_entities instead).

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