Skip to main content
Glama

create_service_env

Add environment variables to services in Coolify to configure application settings and deployment behavior, supporting preview deployments and multiline values.

Instructions

Create an environment variable for a service

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYesService UUID
keyYesEnvironment variable key
valueNoEnvironment variable value
is_previewNoUse in preview deployments
is_literalNoIs literal value
is_multilineNoIs multiline value

Implementation Reference

  • Handler implementation for the 'create_service_env' tool. Validates required parameters 'uuid' and 'key', then makes a POST request to the Coolify API endpoint `/services/{uuid}/envs` with the provided arguments.
    case 'create_service_env': requireParam(args, 'uuid'); requireParam(args, 'key'); return client.post(`/services/${args.uuid}/envs`, args);
  • Tool definition including name, description, and input schema for 'create_service_env'. Defines parameters like service UUID, env key, value, and optional flags for preview, literal, and multiline values.
    { name: 'create_service_env', description: 'Create an environment variable for a service', inputSchema: { type: 'object', properties: { uuid: { type: 'string', description: 'Service UUID' }, key: { type: 'string', description: 'Environment variable key' }, value: { type: 'string', description: 'Environment variable value' }, is_preview: { type: 'boolean', description: 'Use in preview deployments', default: false }, is_literal: { type: 'boolean', description: 'Is literal value', default: false }, is_multiline: { type: 'boolean', description: 'Is multiline value', default: false } }, required: ['uuid', 'key'] } },
  • src/index.ts:36-37 (registration)
    Registration of tool list handler in MCP server, which provides all tool definitions including 'create_service_env' via getToolDefinitions().
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions()
  • Uses requireParam helper to validate required arguments before API call.
    requireParam(args, 'uuid'); requireParam(args, 'key'); return client.post(`/services/${args.uuid}/envs`, args);

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

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