Skip to main content
Glama

get_inlay_hints

Retrieve inlay hints from a language server to display inline type and parameter annotations in your code editor.

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
end_lineYes
file_pathYes
end_columnYes
start_lineYes
language_idNo
start_columnYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It states the return format (array of InlayHint objects with position, label, optional kind), includes failure behavior (empty array if server unsupported), and mentions the underlying protocol (LSP). However, it does not explicitly confirm the operation is read-only or side-effect free, which is implied by 'Get' but not made explicit.

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 concise (4 sentences) and front-loaded with the action and resource. It efficiently covers what inlay hints are, their utility, and return structure. However, the explanatory sentence about inlay hints could be shortened or integrated with the rest.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema and 0% parameter coverage, the description covers the return format (array of InlayHint objects) and a failure scenario but lacks detailed parameter semantics. The use case is mentioned, but critical details like coordinate system (0/1-indexed) and the optional language_id are omitted, leaving gaps for accurate invocation.

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?

Schema description coverage is 0%, so the description must compensate. It mentions 'range within a document' which broadly relates to start/end line/column parameters but provides no specific explanations or constraints for any of the 6 parameters (e.g., whether lines are 0-indexed, the role of language_id). The description adds minimal meaning beyond the parameter 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?

Clearly states verb 'Get', resource 'inlay hints for a range within a document via LSP', and explains the specific LSP method (textDocument/inlayHint). The description distinguishes inlay hints from other LSP features by defining them as inline annotations for type names and parameter labels, which differentiates it from sibling tools like get_completions or get_diagnostics.

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 contexts ('useful in languages with type inference... to see what the compiler knows') but does not explicitly state when to use this tool versus alternatives or when not to use it. No exclusions or prerequisites are mentioned.

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