Skip to main content
Glama

SonarLint: list rules

sonarlint_list_rules

Lists the SonarLint rules currently active in your workspace, helping you inspect which static analysis checks apply before scanning files or projects.

Instructions

List the SonarLint rules currently active for the workspace.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sonarlint_list_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

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 provided, so the description must carry the behavioral burden. "List ... currently active" reasonably conveys a read-only, non-destructive enumeration scoped to the workspace, which is useful. It says nothing about whether results reflect live analysis state vs. a cached snapshot, how large the result can be, or whether any workspace/project must be open first.

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 sentence, front-loaded with the verb and resource, with the scope qualifier immediately after. No filler or redundancy.

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 zero-parameter list tool this is minimally adequate, but with no output schema the description is the only place to learn what a returned rule looks like (rule key, name, severity, enabled state) or how many to expect. An agent knows what the tool does but not what it gets back.

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?

The tool takes zero parameters, so there is no parameter meaning for the description to add. Baseline for a parameterless schema is 4.

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 names a specific verb+resource pair ("List the SonarLint rules") and adds a scope qualifier ("currently active for the workspace"), which separates it from the sibling sonarlint_get_rule that presumably returns a single rule. It never names the sibling explicitly, so differentiation is inferred rather than stated.

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: an agent can infer this is the tool to call when it needs the set of active rules. There is no explicit when-to-use guidance, no exclusions, and no mention of how this relates to sonarlint_get_rule for looking up individual rule details.

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