getProjectIssuesBreakdown
getProjectIssuesBreakdownRetrieve a project's issue counts grouped by module and rule, with severity and type summaries for multi-module projects. Specify a branch or pull request; defaults to main when omitted.
Instructions
Count project issues by logical module and rule; intended for multi-module projects. A module is the first componentPath segment. Returns totals, module/rule facets, and per-module severity/type summaries. 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.
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": "getProjectIssuesBreakdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | No | Comma-separated rule keys, e.g. `java:S1234`. | |
| types | No | Comma-separated: CODE_SMELL,BUG,VULNERABILITY. | |
| branch | No | Branch name; mutually exclusive with `pullRequest`. Omission uses the configured default (usually main). For non-main work, pass explicitly; use `listProjectBranches`. | |
| resolved | No | Resolved filter; defaults to false only when statuses is also omitted. | |
| statuses | No | Comma-separated: OPEN,CONFIRMED,REOPENED,RESOLVED,CLOSED. With no statuses/resolved, returns open issues. | |
| projectKey | No | Project key; omit only if the server has a default. Discover with `listProjects`. | |
| severities | No | Comma-separated: INFO,MINOR,MAJOR,CRITICAL,BLOCKER. | |
| pullRequest | No | PR key; mutually exclusive with `branch`; no default. For PR work, pass explicitly; use `listProjectPullRequests`. | |
| componentPathPrefix | No | Same Sonar `componentPath` prefix semantics as `listIssues`; use `listComponents` instead of guessing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| total | No | Total number of issues matching the query. | |
| byRule | No | Issues grouped by rule key across the selected scope. | |
| modules | No | Per-module issue summaries, including rule/severity/type breakdowns. | |
| byModule | No | Issues grouped by logical module. | |
| projectKey | No | Key of the project being analysed. | |
| branchAdvisory | No | ||
| pathPrefixTruncated | No | True when componentPathPrefix was supplied and the underlying scan hit the configured maximum issue count before exhausting Sonar. Totals/modules reflect only the scanned slice. |