Skip to main content
Glama

type_hierarchy

Analyze class and interface inheritance relationships by displaying supertypes and subtypes for code at a specific position.

Instructions

Show type hierarchy for a type at a position. Returns supertypes (parent classes/interfaces), subtypes (subclasses/implementations), or both depending on the direction parameter. Direction defaults to "both". Use this to understand class and interface inheritance relationships.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
language_idNo
lineYes
columnYes
directionNo
Behavior2/5

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

With no annotations provided, the description carries full burden. It discloses that the tool returns supertypes and subtypes based on direction, which is useful behavioral context. However, it omits critical details: whether this is a read-only operation, potential performance impacts, error conditions, or output format. For a tool with 5 parameters and no annotations, this is insufficient.

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?

The description is appropriately sized with three sentences that are front-loaded: the first states the core purpose, the second explains direction, and the third provides usage context. There is minimal waste, though the last sentence could be more precise.

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?

Given 5 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It covers the tool's purpose and one parameter but lacks details on other parameters, behavioral traits like safety or performance, and return values. For a complex tool in this context, more comprehensive information is needed.

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 0%, so the description must compensate. It explains the 'direction' parameter's purpose and default value, adding meaning beyond the schema. However, it does not clarify the semantics of 'file_path', 'language_id', 'line', or 'column', leaving most parameters undocumented. The baseline is lowered due to low coverage, but partial compensation earns a minimal score.

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 clearly states the tool's purpose: 'Show type hierarchy for a type at a position' with specific verbs ('show', 'understand') and resources ('type hierarchy', 'class and interface inheritance relationships'). It distinguishes from siblings like 'call_hierarchy' or 'go_to_definition' by focusing on inheritance rather than calls or definitions, though not explicitly named.

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?

The description implies usage context ('to understand class and interface inheritance relationships') and mentions the direction parameter's default, but lacks explicit guidance on when to use this tool versus alternatives like 'get_symbol_documentation' or 'go_to_type_definition'. No exclusions or prerequisites are stated.

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/blackwell-systems/agent-lsp'

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