Skip to main content
Glama

sonarcloud_create_config

Generate a sonar-project.properties configuration file to set up SonarCloud code analysis for your project.

Instructions

Generate sonar-project.properties file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'sonarcloud_create_config' tool. It generates the content for a 'sonar-project.properties' file based on the input parameters like organization, project key, name, type, and optional source directory. Supports project types: java-maven, nodejs, python.
    export function sonarcloudCreateConfig({ organization, project_key, project_name, project_type, source_dir }) {
      const configs = {
        "java-maven": `sonar.organization=${organization}
    sonar.projectKey=${project_key}
    sonar.projectName=${project_name}
    sonar.sources=src/main/java
    sonar.tests=src/test/java
    sonar.java.binaries=target/classes`,
        "nodejs": `sonar.organization=${organization}
    sonar.projectKey=${project_key}
    sonar.projectName=${project_name}
    sonar.sources=${source_dir || "src"}
    sonar.javascript.lcov.reportPaths=coverage/lcov.info`,
        "python": `sonar.organization=${organization}
    sonar.projectKey=${project_key}
    sonar.projectName=${project_name}
    sonar.sources=${source_dir || "src"}
    sonar.python.coverage.reportPaths=coverage.xml`
      };
    
      const config = configs[project_type];
      if (!config) {
        return {
          content: [{
            type: "text",
            text: `Unknown project type: ${project_type}\n\nSupported: java-maven, java-gradle, nodejs, python, golang`
          }]
        };
      }
    
      return {
        content: [{
          type: "text",
          text: `SONAR-PROJECT.PROPERTIES\n========================\n\nSave this to: ./sonar-project.properties\n\n${config}`
        }]
      };
    }
  • src/tools.js:576-597 (registration)
    The 'sonarcloudCreateConfig' tool handler is registered in the exported 'tools' object at line 594, which is likely imported and used by the MCP server to register all available tools.
    export const tools = {
      // Git
      gitStatusExplained,
      gitBranchExplained,
      gitCommitGuided,
      // Docker
      dockerCheckSetup,
      dockerAnalyzeProject,
      dockerBuild,
      // GitHub
      githubSecretsList,
      githubSecretsSet,
      // Azure
      azureCheckCli,
      azureAcrSetup,
      azureContainerAppsDeploy,
      // SonarCloud
      sonarcloudSetupGuide,
      sonarcloudCreateConfig,
      // Onboarding
      devOnboardingCheck,
    };
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Generate' which implies a write operation, but doesn't specify where the file is created (e.g., local directory, project root), whether it overwrites existing files, or what permissions are needed. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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?

The description is a single, clear sentence with no wasted words. It's front-loaded with the key action and resource, making it easy to understand at a glance. Every part of the sentence earns its place by conveying essential information.

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

Completeness2/5

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

Given the complexity (a configuration file generation tool) and lack of annotations and output schema, the description is incomplete. It doesn't explain what the generated file contains, how it's used in SonarCloud setup, or what the expected outcome is. For a tool with no structured data to fall back on, this leaves too many contextual gaps.

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 has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to compensate for any parameter gaps, and it appropriately doesn't mention parameters. A baseline of 4 is given since no parameter information is required, and the description doesn't mislead about parameters.

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

Purpose3/5

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

The description 'Generate sonar-project.properties file' clearly states the action (generate) and resource (sonar-project.properties file), but it's somewhat vague about the purpose. It doesn't specify what this file is for (SonarCloud configuration) or how it's used, and it doesn't distinguish from sibling tools like 'sonarcloud_create_workflow' or 'sonarcloud_setup_guide' which might have overlapping purposes.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, context (e.g., when setting up SonarCloud), or how it relates to siblings like 'sonarcloud_create_workflow' or 'sonarcloud_setup_guide'. Without this, users must infer usage from the tool name alone.

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/rideRTD/RTD-DevOps'

If you have feedback or need assistance with the MCP directory API, please join our Discord server