Skip to content
Sonar MCP Server
Sonar MCP Server

Tools

Everything Sonar MCP Server exposes to your AI client: tools, resources and prompts.

14 capabilities14 tool
Automated heuristic

Tool docs quality: B — 14 tools graded

Average 78/100 for how clearly each description tells an AI client what the tool does, what it needs, and what it changes. It is not a security audit.

  • Grade A: 4
  • Grade B: 8
  • Grade C: 2
  • Grade D: 0
  • Grade F: 0
How grades work
  • Security Hotspot details: full rule description (risk, vulnerability, fix recommendations), primary textRange, secondary flows, changelog. Hotspot keys are globally unique, so no branch/pullRequest parameter is needed.

    Description quality grade B, 75/100 · 2 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • Details of a single issue by key plus its change history (changelog). Accepts optional branch / pullRequest.

    Description quality grade B, 75/100 · 2 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • Source-code snippets around all issue locations (primary plus flows for cross-file rules). For each location: componentPath, language, and an array of source lines with SCM info. Useful when the repository isn't available locally or you nee

    Description quality grade C, 65/100 · 2 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: not passed0/20

      Say what the tool needs, for example “by issue number” or “takes a file path”.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: passed10/10

      Includes when or how to use it.

  • Project overview: header info (name, qualifier, visibility, description, version, last analysis date), quality gate status with failed conditions, and curated metrics (ncloc, bugs, vulnerabilities, security hotspots, code smells, coverage,

    Description quality grade C, 55/100 · 3 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: not passed0/20

      Say what the tool needs, for example “by issue number” or “takes a file path”.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • Multi-module aggregation of issues by logical module and rule. Module is derived from the first componentPath segment. Parameters mirror getProjectIssuesSummary.

    Description quality grade B, 75/100 · 2 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • Aggregated summary of open issues in a project: total plus breakdowns by severity, type, status, rule, tag, and SCM author. Parameters mirror listIssues (incl. componentPathPrefix) except pagination.

    Description quality grade B, 75/100 · 2 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • Details of a Sonar rule by key (e.g. java:S1234): title, severity, type, language, tags, description sections (introduction, root cause, how to fix, resources). Backed by an in-memory cache — repeated calls are free.

    Description quality grade B, 75/100 · 2 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • Search/browse components inside a project using Sonar's component tree. Parameters: projectKey, query, qualifiers, branch / pullRequest, limit, offset. Returns opaque component key values plus path, qualifier, name, language, and project. U

    Description quality grade A, 90/100 · 1 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: passed15/15

      Opens with an action verb.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • List of Security Hotspots for a project. Hotspots are a separate category from issues, marking spots that require manual security review. By default Sonar returns hotspots in status TOREVIEW. Parameters: projectKey, componentPathPrefix (opt

    Description quality grade A, 100/100
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: passed15/15

      Opens with an action verb.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: passed10/10

      Includes when or how to use it.

  • Flat list of issues for a project. Parameters: projectKey (required unless defaulted), componentPathPrefix (opt.) — a single subtree-or-file filter relative to the Sonar project root (e.g. bc-doc/src/main/java/ru/foo or bc-doc/src/main/java

    Description quality grade B, 75/100 · 2 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • List of branches analysed for the project. Each entry: name, isMain, type (LONG/SHORT/BRANCH), excludedFromPurge, analysisDate, qualityGateStatus, plus bugs/vulnerabilities/codeSmells counts. No pagination — Sonar returns all branches at on

    Description quality grade B, 70/100 · 2 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: passed15/15

      Opens with an action verb.

    • Mentions its inputs: not passed0/20

      Say what the tool needs, for example “by issue number” or “takes a file path”.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • List of PR analyses for the project. Each entry: PR key (use as pullRequest= elsewhere), title, branch (head), base, url, analysisDate, qualityGateStatus, plus bugs/vulnerabilities/codeSmells counts. Empty list if the Sonar install has no D

    Description quality grade A, 90/100 · 1 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: passed15/15

      Opens with an action verb.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • List of SonarQube projects. Parameters: query (name substring), limit, offset. Returns key, name, qualifier.

    Description quality grade A, 90/100 · 1 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: passed15/15

      Opens with an action verb.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • the Sonar PR key, usually the PR/MR number. Independent from branch analyses; PR analyses often contain the most relevant findings for in-flight work. Pull request keys never fall back to a server-level default — pass the

    Description quality grade B, 75/100 · 2 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.