Skip to main content
Glama
nielspeter

SonarLint MCP Server

by nielspeter

check_quality

Analyze a file to detect bugs, code smells, security vulnerabilities, and complexity issues. Returns exact line numbers, severity levels, and available quick fixes.

Instructions

Check a file for code quality issues — bugs, code smells, security vulnerabilities, and complexity problems. Like having SonarLint in your IDE. Use after writing or modifying code to catch issues early. Returns issues with exact line numbers, severity, and available quick fixes. For multiple files use check_files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesAbsolute path to the file to analyze (e.g., /path/to/file.js)
minSeverityNoMinimum severity level to include. Filters out issues below this level. Default: INFO (show all)
excludeRulesNoList of rule IDs to exclude (e.g., ['typescript:S1135', 'javascript:S125'])
Behavior4/5

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

With no annotations, the description carries full burden. It explains the output format (exact line numbers, severity, quick fixes) and scope (bugs, code smells, etc.), implying a read-only analysis. Lacks details on potential side effects or permissions but is sufficient.

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?

All five sentences serve a purpose: defining the task, providing an analogy, stating when to use, describing output, and giving an alternative for multiple files. No wasted words.

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 tool with 3 parameters, no output schema, and no annotations, the description covers purpose, usage, and output format adequately. It lacks explicit mention of return type or error cases but is sufficient for selection.

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%, so baseline is 3. The description adds no additional semantic info beyond the schema's parameter descriptions.

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 clearly states it checks a file for code quality issues, listing types. It distinguishes from sibling 'check_files' for multiple files, but does not explicitly differentiate from 'check_code' which is a sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides explicit when to use ('after writing or modifying code') and when not to use ('For multiple files use check_files'), but does not mention alternatives like check_code or fix tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nielspeter/sonarlint-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server