Skip to main content
Glama

hover

Read-only

Retrieve type and documentation details for a Python symbol at a 1-indexed file position to resolve definitions and understand usage without text search.

Instructions

Get type/documentation info for the symbol at a position.

line and column are 1-indexed. column is a UTF-16 character offset on the line (not a visual/display column): a leading tab counts as one character. Put the position on the symbol's name: on a def/class keyword there is no hover. Paths outside the workspace are refused before the file is read.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_path": "<file_path>",
      "line": "<line>",
      "column": "<column>"
    },
    "name": "hover"
  }
}

Input Schema

NameRequiredDescriptionDefault
lineYes
columnYes
file_pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.4
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "hoverOutput",
      -  "type": "object"
      -}New value: +null
  2. First observedv0.1.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description still adds non-obvious behavior: workspace path enforcement happens before the file is read, and hover returns nothing on a def/class keyword. It does not describe the response payload or empty-result behavior, which keeps it short of a 5.

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?

Front-loaded one-sentence purpose followed by terse, high-value constraints. No restatement of the tool name, no filler; every clause (indexing, encoding, tab handling, keyword failure, path restriction) prevents a concrete misuse.

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?

For a three-parameter, non-destructive read tool with no output schema, the definition covers purpose, positioning semantics, and a failure mode. The main remaining gap is what the result looks like when no hover information exists (null vs empty), which matters for agent loops but is a minor omission given the tool's simplicity.

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

Parameters4/5

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

Schema coverage is 0% — the parameters carry only titles — so the description must compensate, and it largely does: 1-indexed line, UTF-16 column offset rather than display column, tab counted as one character, and which token to target. These are exactly the off-by-one errors that break this class of tool. file_path semantics (must be inside the workspace) are covered indirectly by the refusal note.

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 opens with a specific verb and resource: 'Get type/documentation info for the symbol at a position.' That is clearly distinct from mutation siblings like rename_symbol or edit_symbol. It stops short of naming the closely related read siblings (definition, symbol_info, references), so sibling differentiation is only implicit via the note that a def/class keyword yields no hover.

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?

It gives useful placement guidance ('Put the position on the symbol's name') and one negative case (def/class keyword), which is effectively when-not-to-use context for a position. However it never points to an alternative such as definition for navigating to a declaration, so an agent must infer tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.