Skip to main content
Glama

find_superclasses

Find all superclasses of a given class by traversing its extends chain up to a configurable depth, returning each class with its depth and repository name.

Instructions

Walk the EXTENDS chain upward from the given class (BFS, max depth 10).

Returns:
    List of dicts with keys ``class_fqn``, ``depth``, ``repo_name``.
    Depth 1 = direct parent. Starting class not included.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
class_fqnYes
max_depthNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

The description discloses the algorithm (BFS), max depth, and that the starting class is excluded from results. However, it lacks information about side effects, authorization needs, or whether the tool is read-only. Given no annotations, this is adequate but incomplete.

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 very concise: two sentences plus a bullet list for the return format. It front-loads the main action and is well-structured.

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?

The description covers the essential details: purpose, parameters, behavior, and output. It could benefit from specifying the scope (e.g., which repositories) or whether it works cross-repo, but it is sufficient for a tool in a code analysis context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description adds crucial meaning: it explains that class_fqn is the starting point and max_depth has a default of 10. It also describes the return format beyond the schema.

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 that the tool walks the EXTENDS chain upward using BFS with max depth 10, and defines the return format. This distinguishes it from sibling tools like find_implementations which might find subclasses.

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?

No guidance is provided on when to use this tool versus alternatives, such as find_callees or find_implementations. The description does not mention prerequisites or when not to use it.

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/srinivasan-sundaresan95/orihime'

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