Skip to main content
Glama

sonar_check_connection

Read-only

Verifies SonarQube or SonarCloud setup by checking configuration, connectivity, token validity, and sonar-scanner availability before scans.

Instructions

检查 SonarQube/SonarCloud 配置、连通性、令牌和 sonar-scanner 是否可用。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sonar_check_connection"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety and network-touching behavior are covered. The description adds the list of things verified (config, connectivity, token, scanner binary), but says nothing about what happens on partial failure, whether checks are independent, or what the response looks like.

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?

A single dense sentence that front-loads the verb and enumerates the checked items with no filler. It could be slightly improved by ordering the checks in execution order, but nothing is wasted.

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

Completeness3/5

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

For a zero-param tool with annotations covering safety, the main remaining gap is output: there is no output schema and the description does not say what a result contains (e.g., per-check pass/fail status, error messages). An agent knows what it verifies but not what it will get back.

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?

The tool takes zero parameters, so there is nothing to disambiguate; the baseline for a no-param tool applies. The description correctly implies a parameterless, environment-driven check.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (检查 / check) and enumerates exactly what is verified: SonarQube/SonarCloud configuration, connectivity, token, and sonar-scanner availability. This distinguishes it from the sibling tools (sonar_issues, sonar_project_metrics, sonar_run_scan), which query data or perform scans rather than validate the setup, though it never explicitly frames itself as a preflight/diagnostic step.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer this is a setup/health check to run before sonar_run_scan, but the description never states when to call it, when not to, or which sibling to use instead. No prerequisites or failure-handling guidance are given.

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