Skip to navigation

SonarQube Cloud

Connect your AI agents to SonarQube Cloud.
Ready to connect

No custom OAuth app setup required. Sign in or provide your credentials to connect.

Authentication: API token. See Magic Link for the runtime auth flow.

Sample use cases

  • Show the quality gate status for the api project’s main branch.
  • List open critical issues on a pull request and assign them to its author.
  • Show coverage and duplication history for the last 30 days.

Available Tools

add_issue_comment

Add a comment to an issue. Needs the issue key from search_issues.

assign_issue

Assign an issue to a user by login (‘_me’ for yourself), or unassign it by passing assignee null.

associate_quality_gate_project

Make a project use a quality gate, replacing its previous gate.

change_dependency_risk_status

Change a dependency risk’s status (CONFIRM, ACCEPT, SAFE, FIXED, or REOPEN to undo) with an optional comment.

create_analysis_event

Add a VERSION or OTHER event (a marker such as a release) to a project analysis.

create_project

Create (provision) a project. Needs the organization key from list_organizations, a unique project_key and a name.

create_quality_gate

Create a quality gate in an organization (organization_id is the uuid_v4 from list_organizations), empty or copied from another gate.

create_quality_gate_condition

Add a condition to a custom quality gate.

create_webhook

Create a webhook that SonarQube Cloud calls after each analysis, at organization or project level.

delete_analysis_event

Delete a VERSION or OTHER event from a project analysis.

delete_issue_comment

Delete one of your own comments from an issue.

delete_project

Permanently delete a project and all its analyses, issues and measures.

delete_quality_gate

Delete a custom quality gate with its conditions; its projects fall back to the organization default.

delete_quality_gate_condition

Delete a condition from a custom quality gate. Needs the condition id from list_quality_gate_conditions.

delete_webhook

Delete a webhook and its delivery history. Needs the webhook key from list_webhooks or create_webhook.

dissociate_quality_gate_project

Remove a project’s explicit quality gate association so it uses the organization default gate.

get_ce_task

Get one background (Compute Engine) task by id: status, timings, error message and optionally warnings or scanner context.

get_component

Get a project, directory or file by key: name, qualifier, path, language, tags, last analysis and version, plus its ancestors.

get_component_measures

Get metric values (coverage, bugs, ncloc, duplicated_lines_density, …) for a project, directory or file, on a branch or PR.

get_component_tree_measures

Get measures for every file/directory under a project or directory, filtered by type or name and sortable by a metric (e.g. lowest-coverage files: sort [‘metric’], metric_sort ‘coverage’).

get_duplications

Get the duplicated code blocks in a file and the files they are duplicated with (line ranges per block).

get_issue_changelog

Get the change history of an issue (status, assignee, severity and tag changes with who and when).

get_measures_history

Get how metrics (e.g. coverage, bugs) changed across a project’s analyses, optionally in a date window, for trend questions.

get_project

Get one project (v2) by its UUIDv4 id: key, name, visibility, organization_id, tags, links and legacy_id.

get_project_quality_gate_status

Get whether a project (or a branch / pull request) passes its quality gate: overall ‘OK’ or ‘ERROR’ plus every condition with its threshold and actual value, and the failing ones.

get_quality_gate

Get one quality gate by UUID: name, built-in flag, Clean as You Code and AI-qualified flags.

get_raw_source

Read a file’s source code as plain text, optionally a from_line/to_line range, bounded by max_chars with a truncated flag and total_lines for paging.

get_rule

Get a coding rule’s full description (why it is an issue, how to fix it), impacts and tags, optionally with its quality-profile activations.

get_scm_info

Get SCM blame for a file (author, date and revision per line or per run of lines), optionally for a line range.

get_webhook_delivery

Get one webhook delivery with the payload that was sent, to debug a failing webhook.

list_branches

List a project’s analyzed branches with their quality gate status and last analysis.

list_ce_activity

List background (Compute Engine) tasks that processed analysis reports: status, timings and errors, filtered by project, text, status, type and dates.

list_component_tree

Browse the directories and files under a project or directory, filtered by type and name, sorted and paginated (assumed 10,000-result cap).

list_enterprises

List the SonarQube Cloud enterprises visible to the caller (Enterprise plan).

list_issue_tags

List tags used on issues, optionally scoped to an organization or project and filtered by text.

list_languages

List the programming languages SonarQube Cloud analyzes (key and name), optionally filtered by text.

list_organization_members

List an organization’s members (login, name), filtered by text or role, paginated.

list_organizations

List the SonarQube Cloud organizations the token’s user is a member of.

list_portfolios

List enterprise portfolios (Enterprise plan) with name search and pagination.

list_projects

List projects (v2) by organization UUID (uuid_v4 from list_organizations), project keys, ids, legacy ids or tags, with pagination.

list_pull_requests

List a project’s analyzed pull requests with quality gate status and issue counts.

list_quality_gate_conditions

List a quality gate’s conditions (metric id, operator LT/GT, threshold).

list_quality_gate_projects

List explicit project-to-quality-gate associations in an organization (uuid_v4 from list_organizations), filtered by gate (list_quality_gates) or project legacy ids (list_projects); one is required.

list_quality_gates

List an organization’s quality gates (built-in and custom), filtered by name, paginated.

list_rule_tags

List the tags used on an organization’s rules, optionally filtered by text, for search_rules (tags).

list_webhook_deliveries

List recent webhook delivery attempts (success, HTTP status, duration) for exactly one of: a webhook (list_webhooks), a project (search_projects) or a CE task (list_ce_activity).

list_webhooks

List the webhooks of an organization (project_key null) or of one project.

search_dependency_risks

Search a project’s dependency risks (vulnerable, malicious or license-prohibited packages) by type, severity, status, package, CVE, scope or assignee (logins from list_organization_members); sortable,…

search_issues

Search code issues by organization, project/file keys, branch or PR, status, impact, rule, tag, language, assignee, author, dates, security standards; sort, facets, pagination (assumed 10,000-result…

search_metrics

List metric definitions (key, name, type, domain, integer id), paginated.

search_project_analyses

List a project’s analyses (newest first) with their events, filtered by branch, event category and date window, paginated.

search_project_tags

Search the project tags in use, optionally by text.

search_projects

Search an organization’s projects by name/key text, keys, UUIDs, last-analysis date or provisioned state, paginated (assumed 10,000-result cap).

search_quality_profiles

Search an organization’s quality profiles (the rule sets used per language), by language, project, name or default.

search_rules

Search an organization’s coding rules by text, language, repository, impact severity/quality, tag, key, status, security standard, template, or activation in a quality profile…

set_issue_tags

Replace an issue’s tags with the given set (pass [] to clear).

set_project_tags

Replace a project’s tags with the given set (at least one tag).

transition_issue

Change an issue’s status: confirm, accept, falsepositive, resolve, or undo with reopen/unconfirm.

update_analysis_event

Rename a VERSION or OTHER analysis event.

update_quality_gate

Rename a custom quality gate or change its AI-qualified flag.

update_quality_gate_condition

Change a quality gate condition’s metric, operator or threshold.

update_webhook

Update a webhook’s name, URL and secret (name and url are both required; send current values to keep them).