Skip to main content
Glama

typeHierarchy

Retrieves immediate supertypes and subtypes for a symbol in a repository. Returns an explicit error when the index lacks relationship data, preventing false conclusions about absent types.

Instructions

Single-level super/subtypes for symbol within repo.

Returns an explicit error when the index carries no relationship data —
`scip expt-convert` does not populate `global_symbols.relationships`, so
an empty result would wrongly imply the symbol has no supertypes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYes
symbolYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the full burden. It discloses a critical behavior: returning an explicit error when relationship data is absent, and explains the underlying reason (`scip expt-convert` does not populate `global_symbols.relationships`). This goes beyond the tool's nominal function and helps prevent misinterpretation of empty results.

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 exceptionally concise: two sentences. The first states the core purpose, and the second adds a crucial caveat about error behavior. No unnecessary words or redundancy.

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 tool is simple with an output schema, so it doesn't need to describe the return format. The description covers the main functionality and a significant edge case that could otherwise mislead users. However, it stops short of providing explicit guidance on when to prefer this tool over sibling tools like callHierarchy.

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?

The description references `symbol` and `repo` within its sentence, providing minimal contextual clues, but does not elaborate on their meanings, types, or formats. Schema description coverage is 0%, so the description does not significantly augment the schema's parameter definitions beyond the obvious names.

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 returns 'Single-level super/subtypes for `symbol` within `repo`', using a specific verb-like purpose that distinguishes it from sibling tools like callHierarchy. The 'single-level' qualifier prevents confusion with transitive or multi-level hierarchies.

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 for type hierarchy queries but does not explicitly mention when not to use it or compare with alternatives like callHierarchy. It does provide a caution about the error condition, which partially guides usage, but lacks explicit when-to-use/versus guidance.

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/phuongddx/codeintel'

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