doppler_configs_create
Create a new configuration in a Doppler project for specific environments to organize and manage application settings and secrets.
Instructions
Create a new config in a Doppler project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the config to create | |
| project | Yes | The Doppler project name | |
| environment | Yes | The environment for the config (e.g., dev, staging, prod) |
Implementation Reference
- src/doppler.ts:96-101 (handler)Handler logic that builds the specific Doppler CLI command 'doppler configs create --project <project> --environment <env> <name> --json' for creating a config.case "doppler_configs_create": parts.push("configs", "create", getString("name")!); parts.push("--project", getString("project")!); parts.push("--environment", getString("environment")!); parts.push("--json"); break;
- src/tools.ts:133-150 (schema)Input schema defining the parameters for the doppler_configs_create tool: name, project (required), environment (required).inputSchema: { type: "object", properties: { name: { type: "string", description: "The name of the config to create", }, project: { type: "string", description: "The Doppler project name", }, environment: { type: "string", description: "The environment for the config (e.g., dev, staging, prod)", }, }, required: ["name", "project", "environment"], },
- src/tools.ts:130-151 (registration)Tool registration in toolDefinitions array, including name, description, and schema, used by the MCP server for listing tools.{ name: "doppler_configs_create", description: "Create a new config in a Doppler project", inputSchema: { type: "object", properties: { name: { type: "string", description: "The name of the config to create", }, project: { type: "string", description: "The Doppler project name", }, environment: { type: "string", description: "The environment for the config (e.g., dev, staging, prod)", }, }, required: ["name", "project", "environment"], }, },
- src/doppler.ts:10-36 (handler)Core handler function that executes the built Doppler CLI command via execSync and parses JSON output or returns raw output.export async function executeCommand( toolName: string, args: DopplerArgs ): Promise<any> { const command = buildDopplerCommand(toolName, args); try { const output = execSync(command, { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"], maxBuffer: 10 * 1024 * 1024, // 10MB buffer }); // Try to parse as JSON, if it fails return raw output try { return JSON.parse(output); } catch { return { output: output.trim() }; } } catch (error: any) { // Handle execution errors const stderr = error.stderr?.toString() || ""; const stdout = error.stdout?.toString() || ""; const message = stderr || stdout || error.message; throw new Error(`Doppler CLI command failed: ${message}`); } }