Skip to main content
Glama

coolify_service_envs

Manage service environment variables in Coolify by listing, creating, updating, bulk updating, or deleting configuration values for application deployment and runtime settings.

Instructions

Service environment variables management - list, create, update, bulk update, and delete environment variables

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform: list (list environment variables), create (create environment variable), update (update environment variable), bulk_update (bulk update environment variables), delete (delete environment variable)
uuidYesService UUID (required for all actions)
keyNoEnvironment variable key (required for create and update actions)
valueNoEnvironment variable value (required for create and update actions)
env_uuidNoEnvironment variable UUID (required for delete action)
envsNoArray of environment variables (required for bulk_update action)
is_previewNoIs preview variable (optional for update action, default: false)
is_build_timeNoIs build time variable (optional for update action, default: false)
is_literalNoIs literal variable (optional for update action, default: false)
is_multilineNoIs multiline variable (optional for update action, default: false)
is_shown_onceNoIs shown once variable (optional for update action, default: false)

Implementation Reference

  • The core handler function for 'coolify_service_envs' tool that processes actions like list, create, update, bulk_update, and delete for service environment variables by making API calls to the Coolify server.
    async serviceEnvs(action: string, args: any) {
      if (!args.uuid) throw new Error('Service UUID is required for all environment variable actions');
      
      switch (action) {
        case 'list':
          const response = await this.apiClient.get(`/services/${args.uuid}/envs`);
          return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] };
        case 'create':
          if (!args.key || !args.value) throw new Error('Key and value are required for create action');
          const createResponse = await this.apiClient.post(`/services/${args.uuid}/envs`, {
            key: args.key,
            value: args.value,
          });
          return { content: [{ type: 'text', text: JSON.stringify(createResponse.data, null, 2) }] };
        case 'update':
          if (!args.key || !args.value) throw new Error('Key and value are required for update action');
          const updateResponse = await this.apiClient.patch(`/services/${args.uuid}/envs`, {
            key: args.key,
            value: args.value,
            is_preview: args.is_preview || false,
            is_build_time: args.is_build_time || false,
            is_literal: args.is_literal || false,
            is_multiline: args.is_multiline || false,
            is_shown_once: args.is_shown_once || false,
          });
          return { content: [{ type: 'text', text: JSON.stringify(updateResponse.data, null, 2) }] };
        case 'bulk_update':
          if (!args.envs) throw new Error('Environment variables array is required for bulk_update action');
          const bulkResponse = await this.apiClient.patch(`/services/${args.uuid}/envs/bulk`, {
            envs: args.envs,
          });
          return { content: [{ type: 'text', text: JSON.stringify(bulkResponse.data, null, 2) }] };
        case 'delete':
          if (!args.env_uuid) throw new Error('Environment variable UUID is required for delete action');
          await this.apiClient.delete(`/services/${args.uuid}/envs/${args.env_uuid}`);
          return { content: [{ type: 'text', text: 'Service environment variable deleted successfully' }] };
        default:
          throw new Error(`Unknown service environment variables action: ${action}`);
      }
    }
  • The input schema and metadata definition for the 'coolify_service_envs' tool, defining parameters and validation for all supported actions.
    {
      name: 'coolify_service_envs',
      description: 'Service environment variables management - list, create, update, bulk update, and delete environment variables',
      inputSchema: {
        type: 'object',
        properties: {
          action: { 
            type: 'string', 
            enum: ['list', 'create', 'update', 'bulk_update', 'delete'],
            description: 'Action to perform: list (list environment variables), create (create environment variable), update (update environment variable), bulk_update (bulk update environment variables), delete (delete environment variable)'
          },
          uuid: { 
            type: 'string', 
            description: 'Service UUID (required for all actions)' 
          },
          key: { 
            type: 'string', 
            description: 'Environment variable key (required for create and update actions)' 
          },
          value: { 
            type: 'string', 
            description: 'Environment variable value (required for create and update actions)' 
          },
          env_uuid: { 
            type: 'string', 
            description: 'Environment variable UUID (required for delete action)' 
          },
          envs: { 
            type: 'array', 
            description: 'Array of environment variables (required for bulk_update action)',
            items: {
              type: 'object',
              properties: {
                key: { type: 'string' },
                value: { type: 'string' },
                is_preview: { type: 'boolean', default: false },
                is_build_time: { type: 'boolean', default: false },
                is_literal: { type: 'boolean', default: false },
                is_multiline: { type: 'boolean', default: false },
                is_shown_once: { type: 'boolean', default: false },
              },
              required: ['key', 'value'],
            },
          },
          is_preview: { type: 'boolean', description: 'Is preview variable (optional for update action, default: false)' },
          is_build_time: { type: 'boolean', description: 'Is build time variable (optional for update action, default: false)' },
          is_literal: { type: 'boolean', description: 'Is literal variable (optional for update action, default: false)' },
          is_multiline: { type: 'boolean', description: 'Is multiline variable (optional for update action, default: false)' },
          is_shown_once: { type: 'boolean', description: 'Is shown once variable (optional for update action, default: false)' },
        },
        required: ['action', 'uuid'],
      },
    },
  • src/index.ts:132-133 (registration)
    The switch case in handleToolCall that registers and dispatches calls to the 'coolify_service_envs' handler.
    case 'coolify_service_envs':
      return await this.handlers.serviceEnvs(args.action, args);
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. While it lists the available actions, it doesn't describe important behavioral traits: what permissions are required, whether operations are destructive (delete action), how changes affect running services, rate limits, or error conditions. For a multi-action tool with destructive operations, this is a significant gap in transparency.

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?

The description is efficiently structured in a single sentence that lists all available actions. It's front-loaded with the core purpose and wastes no words. However, it could be slightly more structured by grouping related actions or indicating which are read vs write operations.

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 multi-action tool with 11 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain the tool's scope (service vs application), doesn't provide behavioral context for destructive operations, and offers no guidance on action selection. The agent would struggle to use this tool correctly without trial and error.

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 11 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain parameter relationships, dependencies between action and other parameters, or provide usage examples. Baseline 3 is appropriate when 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 as 'Service environment variables management' with specific verbs (list, create, update, bulk update, delete) and resource (environment variables). It distinguishes from sibling tools like 'coolify_application_envs' by specifying 'service' rather than 'application' environment variables, though it doesn't explicitly mention this distinction in the description text itself.

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. It doesn't mention prerequisites, appropriate contexts, or when to choose specific actions (like bulk_update vs individual updates). There's no comparison to sibling tools like 'coolify_application_envs' that might handle similar functionality for different resource types.

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/HowieDuhzit/CoolifyMCP'

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