Skip to main content
Glama
igorolv

sonar-mcp-server

getHotspot

getHotspot
Read-onlyIdempotent

Retrieve a security hotspot’s review details, rule guidance, code locations, data flows, and changelog from SonarQube to analyze and fix the flagged issue.

Instructions

Get one Security Hotspot. Returns review details, rule guidance, locations, flows, and changelog.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hotspotKeyYesHotspot key

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
ruleNo
flowsNoData-flow paths showing how user input reaches the risky code.
hotspotNo
changelogNoFull change history of the hotspot (reviews, reassignments, etc.).
textRangeNoPrecise text range in the source file; null when the hotspot spans the whole file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, so the safety profile is covered. The description adds value by specifying what the response includes, giving the agent expectations about the payload without contradicting the annotations.

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?

A single sentence that leads with the core action ('Get one Security Hotspot') and then lists the return contents efficiently. No filler or redundant phrasing.

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 one-parameter read tool with an output schema present, the description covers the essential information: what it returns and that it is a single item. It does not mention usage vs. siblings, but that is already accounted for in usage guidance. The low complexity means this is sufficient.

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 only parameter, hotspotKey, is fully described in the schema ('Hotspot key') with 100% coverage. The description adds no additional meaning beyond the schema, so the baseline of 3 applies.

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 opens with 'Get one Security Hotspot' – a specific verb plus resource that clearly distinguishes this from listHotspots (which returns many). It further differentiates by enumerating the returned content: review details, rule guidance, locations, flows, and changelog.

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 usage is implied: given a hotspotKey, this tool fetches a single hotspot. However, the description does not explicitly state when to choose this over listHotspots or getIssue, and it names no alternatives. For a simple get-by-key tool, this is adequate but not explicitly guided.

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