Skip to main content
Glama
igorolv

sonar-mcp-server

listProjectPullRequests

listProjectPullRequests
Read-onlyIdempotent

Retrieve pull request analyses for a SonarQube project, including branches, quality gate, and issue counts, to identify findings and use the returned key for further inspection.

Instructions

List project PR analyses. Returns key, title, source/base branches, URL, analysis date, quality gate, and issue counts; use the key as pullRequest in other tools. Returns empty when DevOps integration is unavailable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyNoProject key; omit only if the server has a default. Discover with `listProjects`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyNoKey of the project these pull requests belong to.
pullRequestsNoList of pull requests with analysis status and issue counts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish readOnly/idempotent/non-destructive behavior. Beyond that, the description adds a genuine behavioral disclosure not available in structured data: 'Returns empty when DevOps integration is unavailable.' It does not contradict any annotation; only the field enumeration is somewhat redundant with the output schema.

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?

Three short clauses pack purpose, return shape, downstream chaining guidance, and an edge-case behavior into roughly 40 words, with the core purpose front-loaded. No filler or repetition of annotation facts; every sentence earns its place.

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?

For a single-optional-parameter, read-only list tool with an output schema and full annotations, the description covers everything an agent needs: what it lists, what fields come back, how to use the key downstream, and the no-integration edge case. Pagination or ordering details are minor given the output schema exists.

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 the projectKey parameter is already fully documented in the schema, including the default-server nuance and the pointer to listProjects. The description adds no input-parameter semantics beyond the schema; baseline 3 applies because the schema carries the burden.

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 opens with a specific verb-resource pair ('List project PR analyses') and enumerates the returned fields (key, title, branches, URL, analysis date, quality gate, issue counts), making the tool's function unambiguous. It is clearly distinct from siblings like listProjectBranches and listIssues, which operate on different resources.

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

Usage Guidelines4/5

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

The description gives actionable usage guidance: it instructs the agent to feed the returned key into other tools as `pullRequest`, and its note about empty results signals when the DevOps integration is absent. It does not explicitly name alternatives or state when not to use this tool, but the resource is distinct enough among siblings that the implied usage is clear.

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