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, };

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