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);

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