Skip to main content
Glama

SonarLint: scan project

sonarlint_scan_project

Run a full local SonarLint scan over the current workspace or project to detect code issues and return structured JSON with rule, severity, message, and line/column ranges.

Instructions

Run a local SonarLint analysis over the entire current workspace/project (equivalent to a full folder scan from the workspace root).

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_scan_project"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxFilesNoMaximum number of files to scan (default 1000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations, the description must carry the full behavioral burden. It discloses that analysis is local and scoped to the workspace root, but it does not state whether the scan is read-only, what output or side effects to expect, or how long a full scan may take.

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?

The description is a single front-loaded sentence with no redundant wording. It states the main action, scope, and equivalent behavior efficiently.

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 relatively simple scan tool with one optional parameter and no output schema, the description gives enough scope information to invoke it. However, because annotations are absent, it should do more to clarify safety, expected results, and operational behavior.

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 description coverage is 100%, and the only parameter, maxFiles, is fully documented in the schema including default and bounds. The description adds no parameter-specific meaning, which is acceptable at the baseline for high coverage.

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 states a specific verb and resource: run a local SonarLint analysis over the entire current workspace/project. It also clarifies scope by equating it to a full folder scan from the workspace root, which distinguishes it from file- or narrower folder-scoped scans.

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 when to use it by specifying the entire current workspace/project, but it does not explicitly compare it with siblings such as sonarlint_scan_file or sonarlint_scan_folder. There are no explicit exclusions or prerequisites.

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