Skip to main content
Glama

sonarqube_quality_gate_status

Read-onlyIdempotent

Retrieve the Quality Gate status (OK/WARN/ERROR/NONE) for any SonarQube project, including per-condition breakdown. Supports branches and pull requests to identify why a gate fails.

Instructions

Fetch the Quality Gate status for a project.

Wraps /api/qualitygates/project_status. Returns the overall status (OK / WARN / ERROR / NONE) plus a per-condition breakdown — exactly what's needed for "why is my QG failing?" or "is PR #42 passing the gate?" queries.

NONE means the project exists but has no Quality Gate attached or no analysis yet.

Examples: - Use when: "Is einvy:aut_einvy passing its Quality Gate?" → project_key='einvy:aut_einvy'. - Use when: "Which conditions fail on PR #42?" → project_key=..., pull_request='42'. - Use when: "Does feature/xyz still pass the gate?" → add branch='feature/xyz'. - Don't use when: You want raw metric values without the pass/fail verdict — sonarqube_project_metrics is leaner. - Don't use when: You want the list of failing projects org-wide — use sonarqube_worst_metrics with metric='alert_status' or aggregate manually.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_keyYesSonarQube project key.
branchNoBranch name to check (e.g. 'feature/xyz'). If omitted, the main branch's gate status is returned. Mutually exclusive with pull_request.
pull_requestNoPull request identifier (e.g. '42'). Returns the PR's gate status from the decoration analysis. Mutually exclusive with branch.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_keyYes
statusYes
passedYes
conditions_countYes
failing_conditionsYes
conditionsYes
Behavior4/5

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

Annotations already indicate readOnlyHint=true, idempotentHint=true, etc. The description adds operational context: wraps /api/qualitygates/project_status, returns per-condition breakdown, explains NONE meaning, and notes mutual exclusivity constraints. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear opening sentence, followed by bullet-point examples and 'Don't use' sections. It is slightly long but every sentence adds value and is front-loaded.

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 presence of an output schema (not shown but indicated 'Has output schema: true'), the description focuses on input parameters and purpose. It explains status values, use cases, and edge case (NONE). No gaps identified.

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 coverage is 100% with descriptions. The description adds usage context through examples showing how to use project_key, branch, and pull_request, and clarifies mutual exclusivity. This goes beyond the schema alone.

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 starts with 'Fetch the Quality Gate status for a project,' using a specific verb and resource. It clearly distinguishes from sibling tools by noting alternatives like sonarqube_project_metrics for raw metrics and sonarqube_worst_metrics for org-wide failures.

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 provides explicit when-to-use examples ('Use when: Is project passing?') and when-not-to-use alternatives ('Don't use when: want raw metric values'). It also explains mutual exclusivity of branch and pull_request.

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