Skip to main content
Glama

sonarqube_get_issues

Read-onlyIdempotent

Search SonarQube project issues with filters for severity, type, branch, or pull request. Paginate results to triage bugs or scan for vulnerabilities.

Instructions

Search issues for a SonarQube project.

Wraps /api/issues/search. Use the filter parameters to narrow results — e.g. severities=['BLOCKER','CRITICAL'] for triage, or types=['VULNERABILITY'] for a security sweep.

Pagination: if has_more is True, call again with page + 1. SonarQube caps total pagination at 10 000 issues; tighten the filters if you need to go deeper.

Examples: - Use when: "Triage top BLOCKER / CRITICAL bugs in einvy:aut_einvy" → severities=['BLOCKER','CRITICAL'], types=['BUG']. - Use when: "Security sweep on the PR" → types=['VULNERABILITY'], pull_request='42'. - Use when: "Show closed issues from March 2024" → resolved=True (then post-process by creation_date). - Don't use when: You want an issue count only — get_issues always returns full issue objects; for a cheap count call with page_size=1 and read total from the response. - Don't use when: You want Security Hotspots — they live on /api/hotspots/search (this tool rejects them with a clear error so you won't get silently empty results).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_keyYesSonarQube project key to query issues for.
severitiesNoFilter by severity. Valid values: BLOCKER, CRITICAL, MAJOR, MINOR, INFO. Case-insensitive. Omit to return all severities.
typesNoFilter by issue type. Valid values: BUG, VULNERABILITY, CODE_SMELL. Case-insensitive. Security Hotspots live on a separate API endpoint (not supported by this tool). Omit to return all supported types.
resolvedNoWhether to include resolved issues. Default False — only unresolved issues, which is what an agent fixing code usually wants.
branchNoBranch name to query (e.g. 'feature/xyz'). If omitted, the project's main branch is used. Mutually exclusive with pull_request.
pull_requestNoPull request identifier (e.g. '42'). If set, fetches issues raised on the PR decoration analysis. Mutually exclusive with branch.
pageNoPage number (1-based).
page_sizeNoItems per page (1-500). SonarQube caps total pagination at 10 000.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_keyYes
totalYes
returnedYes
pageYes
page_sizeYes
has_moreYes
next_pageYes
by_severityYes
by_typeYes
issuesYes
Behavior5/5

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

Annotations already provide readOnlyHint, idempotentHint, etc. The description adds pagination details (has_more, page+1), total cap of 10,000 issues, and notes that Security Hotspots are rejected with an error, providing valuable context beyond annotations.

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 well-structured with a summary, pagination section, and bulleted examples. Every sentence earns its place without redundancy or excess.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, annotations, and output schema, the description covers all necessary aspects: purpose, parameters, pagination, limitations, and usage examples. It is fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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 usage examples for parameters (e.g., 'severities=['BLOCKER','CRITICAL']') and clarifies defaults like 'resolved=False', adding extra semantic value.

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 'Search issues for a SonarQube project' and wraps '/api/issues/search'. It provides specific verb+resource and distinguishes from siblings like 'sonarqube_list_projects' and 'sonarqube_worst_metrics'.

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?

The description gives explicit when-to-use and when-not-to-use examples, including alternatives for issue counts and Security Hotspots. Examples cover triage, security sweep, and closed issues, making usage clear.

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/mshegolev/sonarqube-mcp'

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