Skip to main content
Glama

SonarLint: rule details

sonarlint_get_rule

Retrieves severity, type, and description for a SonarLint rule key so you can understand or document the rule behind an issue.

Instructions

Get details (severity, type, description) for a SonarLint rule key, e.g. 'typescript:S3923'.

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": {
      "ruleKey": "<ruleKey>"
    },
    "name": "sonarlint_get_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
ruleKeyYesRule key, e.g. typescript:S3923

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the burden. 'Get' clearly implies a non-mutating read, and it lists what the response contains (severity, type, description), but it says nothing about behavior for an unknown/malformed rule key or about connectivity requirements.

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?

One compact sentence with the verb and resource front-loaded and the return payload parenthetical. There is no redundant or filler 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?

For a one-parameter read tool with no output schema, the description adequately names the returned fields, which is the main missing structured information. Only edge-case behavior (invalid key) is left unstated.

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 coverage is 100% with a single required 'ruleKey' string already documented with the same 'typescript:S3923' example. The description merely repeats that example rather than adding format constraints, case sensitivity, or lookup semantics.

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?

States a specific verb and resource ('Get details ... for a SonarLint rule key') and enumerates the returned fields (severity, type, description). The singular 'rule key' scope implicitly separates it from sonarlint_list_rules, but no sibling is named explicitly.

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?

Usage is only implied: the description frames this as a lookup by a known rule key, which suggests calling it after finding a key via sonarlint_list_rules. It never states when to prefer this tool over the listing sibling, nor any prerequisites such as a configured connection.

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