Skip to main content
Glama

get_inlay_hints

Retrieve inlay hints for a specified code range to display inferred type annotations and parameter labels, helping developers understand compiler-inferred information without reading every type annotation.

Instructions

Get inlay hints for a range within a document via LSP (textDocument/inlayHint). Inlay hints are inline annotations that IDEs display in source code — typically inferred type names (e.g. : string) and parameter name labels (e.g. count:). Useful in languages with type inference (TypeScript, Rust, Go) to see what the compiler knows without reading every type annotation. Returns an array of InlayHint objects, each with a position, label, and optional kind (1=Type, 2=Parameter). Returns an empty array if the language server does not support inlay hints.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
language_idNo
start_lineYes
start_columnYes
end_lineYes
end_columnYes
Behavior4/5

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

Description explains the return type (array of InlayHint objects) and fields, including the optional kind enum. It also notes the edge case of an empty array if the language server lacks support. With no annotations, it sufficiently discloses behavior.

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?

Description is moderately concise, providing necessary explanatory context about inlay hints without verbosity. It front-loads the core purpose and uses efficient wording.

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 no output schema, the description adequately covers the return value and edge cases. It covers the LSP mechanism and practical use. Missing parameter explanations are the main gap.

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

Parameters2/5

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

Input schema has 6 parameters (file_path, language_id, start_line, etc.) but the description does not explain their meaning or format. Schema coverage is 0%, so the burden falls on the description, which is not met.

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?

Description clearly states the tool retrieves inlay hints via LSP and provides concrete examples of what inlay hints are (type names, parameter labels). It distinguishes its function from other LSP tools like get_completions by specifying the exact LSP method and use case.

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?

Description mentions usefulness in languages with type inference but does not explicitly state when not to use this tool or suggest alternatives among siblings. It provides some context but lacks clear guidance on when to choose other tools.

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