Skip to main content
Glama
nielspeter

SonarLint MCP Server

by nielspeter

check_files

Analyze multiple source files for bugs, code smells, and security vulnerabilities in one call. Supports glob patterns and returns compact results highlighting only files with issues.

Instructions

Check multiple files for code quality issues in one call — bugs, code smells, security vulnerabilities. Use when reviewing or modifying several files. Supports glob patterns (e.g. 'src/**/*.ts'). When using relative paths or globs, provide basePath so they resolve correctly. Output is compact: only files with issues are shown, clean files get a summary count. For a single file use check_quality.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
basePathNoProject root directory for resolving relative paths and globs (e.g., '/Users/me/project'). Required when filePaths contains relative paths.
filePathsYesArray of file paths or glob patterns to analyze (e.g., ['/path/to/file.ts', 'src/**/*.js'])
groupByFileNoGroup issues by file in output (default: true)
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?

No annotations are provided, so the description bears full responsibility. It discloses key behavioral traits: supports glob patterns, requires basePath for relative paths, output is compact showing only files with issues, and clean files get a summary count. This gives the agent a good understanding of the tool's behavior.

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 efficiently structured: first sentence states purpose, second gives usage context, third explains glob and output format. Every sentence adds value, and the length is appropriate for the complexity.

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?

Given the tool has 5 parameters and no output schema, the description covers the main behaviors: multi-file support, glob patterns, compact output, and the alternative for single file. It could mention what happens when no issues are found (implied by 'summary count') but overall it is sufficiently complete for an experienced agent.

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 context about glob patterns and basePath usage but does not significantly enhance the understanding of each parameter beyond what the schema already provides. For example, minSeverity and excludeRules are well-described in the schema.

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 clearly states the tool checks multiple files for code quality issues (bugs, code smells, security vulnerabilities). It specifies the resource ('multiple files') and the action ('check'), and distinguishes itself from the sibling tool 'check_quality' which is for a single file.

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

Usage Guidelines5/5

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

Explicit guidance is given: 'Use when reviewing or modifying several files.' It also provides a negative case: 'For a single file use check_quality.' Additionally, it explains when to provide basePath and supports glob patterns, helping the agent decide when to use this tool.

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