doppler_projects_list
Retrieve a complete list of all projects configured in your Doppler workspace for secrets management and access control.
Instructions
List all Doppler projects
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/doppler.ts:79-82 (handler)Specific switch case handling the doppler_projects_list tool by building the CLI command 'doppler projects list --json'.case "doppler_projects_list": parts.push("projects", "list"); parts.push("--json"); break;
- src/doppler.ts:10-36 (handler)Core handler function that executes the Doppler CLI command for doppler_projects_list (and other tools), parsing JSON output or returning raw.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}`); } }
- src/tools.ts:91-98 (schema)Input/output schema definition for the doppler_projects_list tool (no input parameters required).{ name: "doppler_projects_list", description: "List all Doppler projects", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:27-31 (registration)Registers the doppler_projects_list tool (via toolDefinitions array) in the MCP server's ListTools handler.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: toolDefinitions, }; });
- src/index.ts:34-51 (handler)MCP CallTool request handler that dispatches calls to doppler_projects_list (and other tools) by invoking executeCommand.server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { const result = await executeCommand(name, args || {}); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); throw new McpError(ErrorCode.InternalError, `Doppler CLI error: ${errorMessage}`); } });