Skip to main content
Glama
aledlie

Doppler MCP Server

by aledlie

doppler_environments_list

Retrieve all environment names within a Doppler project to manage configuration settings across development, staging, and production workflows.

Instructions

List all environments in a Doppler project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoThe Doppler project name (optional if set via doppler setup)

Implementation Reference

  • Specific handler logic for 'doppler_environments_list' tool: builds the CLI command 'doppler environments list [--project PROJ] --json' and executes it via execSync.
    case "doppler_environments_list":
      parts.push("environments", "list");
      if (getString("project")) parts.push("--project", getString("project")!);
      parts.push("--json");
      break;
  • Tool schema definition for 'doppler_environments_list', specifying input parameters (optional project).
    {
      name: "doppler_environments_list",
      description: "List all environments in a Doppler project",
      inputSchema: {
        type: "object",
        properties: {
          project: {
            type: "string",
            description: "The Doppler project name (optional if set via doppler setup)",
          },
        },
      },
    },
  • src/index.ts:27-31 (registration)
    Registers the list of tools including 'doppler_environments_list' via toolDefinitions.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: toolDefinitions,
      };
    });
  • src/index.ts:34-51 (registration)
    Main tool call handler that dispatches to executeCommand based on tool name, handling 'doppler_environments_list'.
    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}`);
      }
    });
  • Core helper function that executes the built Doppler CLI command for all tools, including parsing JSON 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}`);
      }
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
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. It only states what the tool does but reveals nothing about output format, pagination, error behavior, auth requirements, or side effects. For a list operation with zero annotation coverage, more behavioral disclosure would be expected.

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?

One concise sentence with zero waste. Front-loaded and direct. Could arguably earn a 5, but the brevity trades away potentially valuable context that a fuller description could provide.

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?

The tool is simple (1 param, 0 required) and the schema covers the parameter fully, which helps. However, the distinction between environments and configs in Doppler's model is non-obvious, and with no output schema and no annotations, a bit more context would make this genuinely complete. The single line leaves meaningful gaps for a tool in a family with several similar list commands.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% — the 'project' parameter is documented as 'The Doppler project name (optional if set via doppler setup)'. The description adds nothing beyond the schema, so baseline of 3 applies since the schema already documents the single parameter fully.

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?

Clear verb+resource: lists environments in a Doppler project. The scope ('all environments in a project') is specific, though it doesn't distinguish from siblings like configs_list — configs and environments are related Doppler concepts, and the description gives no hint about the difference.

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?

No guidance on when to use this vs alternatives. Among siblings are doppler_configs_list and doppler_projects_list; the description doesn't explain what an 'environment' is relative to a config or when one would need it. No when/when-not guidance provided.

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