Skip to main content
Glama

list-deployments

Retrieve a list of all running deployments in Coolify to view deployment status and history.

Instructions

Retrieve a list of all running deployments in Coolify. This includes details about the deployment status and history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'list-deployments' tool that fetches deployments from the Coolify API '/deployments' endpoint and returns the JSON response.
    case "list-deployments": {
      const deployments = await coolifyApiCall('/deployments');
      return {
        content: [{
          type: "text",
          text: JSON.stringify(deployments, null, 2)
        }]
      };
    }
  • src/index.ts:123-127 (registration)
    Tool registration in the ListToolsRequestHandler, defining name, description, and empty input schema.
    {
      name: "list-deployments",
      description: "Retrieve a list of all running deployments in Coolify. This includes details about the deployment status and history.",
      inputSchema: zodToJsonSchema(z.object({})),
    },
  • Input schema for the 'list-deployments' tool, which takes no parameters.
    inputSchema: zodToJsonSchema(z.object({})),
  • Helper function for making authenticated API calls to Coolify, used by the list-deployments handler.
    async function coolifyApiCall(endpoint: string, method: string = 'GET', body?: any): Promise<any> {
      const baseUrl = process.env.COOLIFY_BASE_URL?.replace(/\/$/, '') || 'https://coolify.stuartmason.co.uk';
      const url = `${baseUrl}/api/v1${endpoint}`;
    
      const response = await fetch(url, {
        method,
        headers: {
          'Authorization': `Bearer ${process.env.COOLIFY_ACCESS_TOKEN}`,
          'Content-Type': 'application/json',
        },
        body: body ? JSON.stringify(body) : undefined,
      });
    
      if (!response.ok) {
        const errorBody = await response.json().catch(() => ({}));
        throw new Error(JSON.stringify({
          error: `Coolify API error: ${response.status} ${response.statusText}`,
          status: response.status,
          details: errorBody
        }));
      }
    
      return await response.json();
    }

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

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