listIssues
listIssuesRetrieve project issues with filters for severity, type, status, rule, path, or ref, providing rule details, severity, status, message, file location, and cross-file flows. Defaults to open issues.
Instructions
List project issues with optional severity, type, status, rule, path, and ref filters. Returns rule, severity, type, status, message, file location/text range, and cross-file flows. Defaults to open issues. 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
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Page size; server default if omitted. | |
| 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`. | |
| offset | No | Offset; default 0. | |
| 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 | Sonar `componentPath` prefix relative to the project root; an exact file path is also allowed. Uses directory boundaries, so `src` does not match `srcExtra`. For Java/Kotlin packages use slashes. Sonar paths may differ from repository paths; use `listComponents` instead of guessing. If `pathPrefixTruncated=true`, narrow the prefix. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | Issues in this page. | |
| limit | No | Maximum number of items per page. | |
| total | No | Total number of issues matching the query across all pages. | |
| offset | No | Zero-based offset of this page within the full result set. | |
| branchAdvisory | No | ||
| pathPrefixTruncated | No | True when componentPathPrefix was supplied and the underlying scan hit the configured maximum issue count before exhausting Sonar. The returned `total` and `items` reflect only the scanned slice; tighten the prefix to see the rest. |