Skip to main content
Glama
GoCoder7
by GoCoder7

coolify_environment_configuration

Configure environment variables, set domains, and retrieve application logs for Coolify-hosted applications to manage deployment settings and monitor performance.

Instructions

Manage environment variables, configure domains, and retrieve application logs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform: update env vars, get env vars, set domain, or get logs
applicationIdYesApplication ID (required for all actions)
variablesNoArray of environment variables to set (for update_env)
domainNoDomain name to set (for set_domain action)
enableHttpsNoWhether to enable HTTPS/SSL (for set_domain action)
linesNoNumber of log lines to retrieve (for get_logs action)
sinceNoRetrieve logs since this timestamp (ISO format, for get_logs action)

Implementation Reference

  • Main handler function that dispatches environment configuration actions (update_env, get_env, set_domain, get_logs) using CoolifyApiClient methods.
    export async function handleEnvironmentConfiguration(
      coolifyClient: CoolifyApiClient,
      args: any
    ): Promise<any> {
      try {
        const { action, applicationId, ...params } = args;
        let result;
        let message;
    
        switch (action) {
          case 'update_env':
            if (!params.variables || !Array.isArray(params.variables)) {
              throw new Error('variables array is required for update_env action');
            }
            result = await coolifyClient.updateEnvironmentVariables(applicationId, params.variables);
            message = `Updated ${params.variables.length} environment variables for application ${applicationId}`;
            break;
    
          case 'get_env':
            result = await coolifyClient.getEnvironmentVariables(applicationId);
            message = `Retrieved environment variables for application ${applicationId}`;
            break;
    
          case 'set_domain':
            if (!params.domain) {
              throw new Error('domain is required for set_domain action');
            }
            result = await coolifyClient.setDomain(applicationId, params.domain, params.enableHttps);
            message = `Set domain ${params.domain} for application ${applicationId}`;
            break;
    
          case 'get_logs':
            result = await coolifyClient.getApplicationLogs(
              applicationId, 
              params.lines || 100, 
              params.since
            );
            message = `Retrieved ${params.lines || 100} log lines for application ${applicationId}`;
            break;
    
          default:
            throw new Error(`Unknown environment action: ${action}`);
        }
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                success: true,
                data: result,
                message: message
              }, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                success: false,
                error: error instanceof Error ? error.message : 'Unknown error occurred'
              }, null, 2)
            }
          ],
          isError: true
        };
      }
    }
  • Tool definition including input schema for parameters like action, applicationId, variables array, domain, logs options.
    export const environmentConfigurationTool: Tool = {
      name: 'coolify_environment_configuration',
      description: 'Manage environment variables, configure domains, and retrieve application logs',
      inputSchema: {
        type: 'object',
        properties: {
          action: {
            type: 'string',
            enum: ['update_env', 'get_env', 'set_domain', 'get_logs'],
            description: 'Action to perform: update env vars, get env vars, set domain, or get logs',
          },
          applicationId: {
            type: 'string',
            description: 'Application ID (required for all actions)',
          },
          // Environment variable parameters
          variables: {
            type: 'array',
            description: 'Array of environment variables to set (for update_env)',
            items: {
              type: 'object',
              properties: {
                key: {
                  type: 'string',
                  description: 'Environment variable key/name',
                },
                value: {
                  type: 'string',
                  description: 'Environment variable value',
                },
                is_sensitive: {
                  type: 'boolean',
                  description: 'Whether this is a sensitive variable (will be hidden in UI)',
                  default: false,
                },
                is_build_time: {
                  type: 'boolean',
                  description: 'Whether this variable is available at build time',
                  default: false,
                },
              },
              required: ['key', 'value'],
            },
          },
          // Domain parameters
          domain: {
            type: 'string',
            description: 'Domain name to set (for set_domain action)',
          },
          enableHttps: {
            type: 'boolean',
            description: 'Whether to enable HTTPS/SSL (for set_domain action)',
            default: true,
          },
          // Log parameters
          lines: {
            type: 'number',
            description: 'Number of log lines to retrieve (for get_logs action)',
            default: 100,
            minimum: 1,
            maximum: 1000,
          },
          since: {
            type: 'string',
            description: 'Retrieve logs since this timestamp (ISO format, for get_logs action)',
          },
        },
        required: ['action', 'applicationId'],
      },
    };
  • src/index.ts:125-134 (registration)
    Registers the tool in the MCP server's list of available tools.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          applicationManagementTool,
          environmentConfigurationTool,
          systemManagementTool,
          documentationTool,
        ],
      };
    });
  • src/index.ts:153-154 (registration)
    Registers the handler dispatch in the tool call switch statement.
    case 'coolify_environment_configuration':
      return await handleEnvironmentConfiguration(this.coolifyClient, args);
  • src/index.ts:39-42 (registration)
    Imports the tool definition and handler for registration.
    import {
      environmentConfigurationTool,
      handleEnvironmentConfiguration,
    } from './tools/environment-unified';
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'manage', 'configure', and 'retrieve' but doesn't clarify permissions needed, whether operations are destructive, rate limits, or what happens during failures. For a multi-action tool with potential mutations (update_env, set_domain), this is inadequate.

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 extremely concise (8 words) and front-loaded with all key functionality. Every word earns its place by listing the three core capabilities without redundancy or fluff. It's appropriately sized for a multi-action tool.

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?

For a complex tool with 7 parameters, multiple actions (including mutations), no annotations, and no output schema, the description is insufficient. It doesn't address behavioral aspects, output format, error handling, or usage context. The agent lacks critical information to use this tool effectively.

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%, so the schema already documents all 7 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain relationships between actions and parameters). Baseline 3 is appropriate when the schema does the heavy lifting.

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?

The description clearly states the tool's purpose with specific verbs ('manage', 'configure', 'retrieve') and resources ('environment variables', 'domains', 'application logs'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'coolify_application_management' or 'coolify_system_management', which might have overlapping functionality.

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, when to choose this over sibling tools, or any contextual constraints. The agent must infer usage solely from the action parameter enum.

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/GoCoder7/coolify-mcp-server'

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