Skip to main content
Glama
igorolv

sonar-mcp-server

getProjectIssuesSummary

getProjectIssuesSummary
Read-onlyIdempotent

Summarize project issue counts by severity, type, status, rule, tag, and author to get a quick overview before diving into details.

Instructions

Count project issues and group them by severity, type, status, rule, tag, and SCM author. Returns the total and facet counts; use before listing details. Scope explicitly: omitting both branch and pullRequest uses the configured default (usually main). For non-main or PR work, pass the matching ref explicitly; discover it with listProjectBranches / listProjectPullRequests. If branchAdvisory is present, choose the branch matching the user's ref and retry explicitly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rulesNoComma-separated rule keys, e.g. `java:S1234`.
typesNoComma-separated: CODE_SMELL,BUG,VULNERABILITY.
branchNoBranch name; mutually exclusive with `pullRequest`. Omission uses the configured default (usually main). For non-main work, pass explicitly; use `listProjectBranches`.
resolvedNoResolved filter; defaults to false only when statuses is also omitted.
statusesNoComma-separated: OPEN,CONFIRMED,REOPENED,RESOLVED,CLOSED. With no statuses/resolved, returns open issues.
projectKeyNoProject key; omit only if the server has a default. Discover with `listProjects`.
severitiesNoComma-separated: INFO,MINOR,MAJOR,CRITICAL,BLOCKER.
pullRequestNoPR key; mutually exclusive with `branch`; no default. For PR work, pass explicitly; use `listProjectPullRequests`.
componentPathPrefixNoSame Sonar `componentPath` prefix semantics as `listIssues`; use `listComponents` instead of guessing.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
byTagNoIssues grouped by user-defined tag.
totalNoTotal number of issues matching the query.
byRuleNoIssues grouped by rule key (top rules by issue count).
byTypeNoIssues grouped by type (BUG, VULNERABILITY, CODE_SMELL).
byAuthorNoIssues grouped by SCM author who introduced them (top authors by issue count).
byStatusNoIssues grouped by lifecycle status (OPEN, CONFIRMED, REOPENED, RESOLVED, CLOSED).
bySeverityNoIssues grouped by severity (BLOCKER, CRITICAL, MAJOR, MINOR, INFO).
projectKeyNoKey of the project being summarised.
branchAdvisoryNo
pathPrefixTruncatedNoTrue when componentPathPrefix was supplied and the underlying scan hit the configured maximum issue count before exhausting Sonar. Totals/facets reflect only the scanned slice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish readOnlyHint, idempotentHint, and non-destructive behavior. The description adds useful behavioral context beyond annotations: the default-branch scope behavior and the branchAdvisory retry rule. It does not need to restate safety because annotations cover it.

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?

Four dense sentences with purpose, timing, scoping rule, and conditional retry guidance in order. No filler or schema duplication; every sentence adds value.

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?

With a rich output schema and 100% parameter coverage, the description supplies the missing operational context: when to call, default scope, and how to resolve branch ambiguity. It could briefly distinguish itself from getProjectIssuesBreakdown, but the aggregation description is sufficient for correct invocation.

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?

Input schema covers 100% of parameters, so the baseline is 3. The description adds cross-parameter context about branch/PR omission and grouping dimensions, but most parameter-level meaning is already present 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?

Description starts with a concrete verb and resource: 'Count project issues and group them by severity, type, status, rule, tag, and SCM author.' The phrase 'use before listing details' and the facet list clearly differentiate this aggregation tool from siblings like listIssues.

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?

It states when to invoke ('use before listing details'), and gives explicit conditional instructions for branch selection: omit branch/PR for default, pass matching ref for non-main/PR, discover refs with listProjectBranches/listProjectPullRequests, and retry when branchAdvisory is present. This is actionable routing guidance.

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