Skip to main content
Glama
ProfessioneIT

lsp-mcp-server

lsp_type_hierarchy

Read-onlyIdempotent

Analyze class and interface inheritance hierarchies to understand supertypes and subtypes for code navigation and refactoring planning.

Instructions

Get the type hierarchy for a class/interface - supertypes (parents, interfaces) and subtypes (children, implementations). Use for understanding inheritance and planning refactoring that affects class hierarchies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed)
directionNoDirection of type hierarchy: supertypes (parents), subtypes (children), or bothboth
Behavior3/5

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

Annotations already provide key behavioral hints: readOnlyHint=true (safe read operation), openWorldHint=false (limited scope), and idempotentHint=true (repeatable). The description adds context about the tool's purpose (inheritance analysis) and use cases (refactoring planning), but does not disclose additional behavioral traits like performance characteristics, error conditions, or data format of the hierarchy output. With annotations covering safety and idempotency, the description adds moderate value.

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 appropriately sized and front-loaded: the first sentence states the core purpose, and the second sentence adds usage context. Every sentence earns its place with no redundant or vague language, making it efficient and easy to parse.

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?

Given the tool's moderate complexity (inheritance analysis), rich annotations (readOnlyHint, idempotentHint), and full schema coverage, the description is mostly complete. It covers purpose and usage well but lacks details on output format (no output schema provided) and potential limitations (e.g., language-specific constraints). This minor gap prevents a perfect score.

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 100%, so the input schema already fully documents all parameters (file_path, line, column, direction). The description does not add any parameter-specific semantics beyond what the schema provides, such as explaining how the hierarchy is derived from the source location or format details. Baseline 3 is appropriate when the schema does the heavy lifting.

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's purpose with specific verbs ('Get the type hierarchy') and resources ('class/interface'), distinguishing it from siblings like lsp_find_implementations or lsp_goto_type_definition by focusing on inheritance relationships rather than single-direction lookups or definitions. It explicitly mentions what the hierarchy includes: 'supertypes (parents, interfaces) and subtypes (children, implementations).'

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?

The description provides clear context for when to use the tool: 'for understanding inheritance and planning refactoring that affects class hierarchies.' However, it does not explicitly state when not to use it or name specific alternatives among siblings (e.g., lsp_find_implementations for subtypes only), which prevents a perfect score.

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/ProfessioneIT/lsp-mcp-server'

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