Skip to main content
Glama

list-resources

Retrieve a comprehensive list of all resources managed by Coolify, including applications, services, databases, and deployments.

Instructions

Retrieve a comprehensive list of all resources managed by Coolify. This includes applications, services, databases, and deployments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'list-resources' tool. It calls the Coolify API at '/resources' using the helper function and returns the JSON-formatted list of resources as text content.
    case "list-resources": {
      const resources = await coolifyApiCall('/resources');
      return {
        content: [{
          type: "text",
          text: JSON.stringify(resources, null, 2)
        }]
      };
    }
  • src/index.ts:83-87 (registration)
    Registration of the 'list-resources' tool in the list of available tools, including its name, description, and empty input schema (no parameters required).
    {
      name: "list-resources",
      description: "Retrieve a comprehensive list of all resources managed by Coolify. This includes applications, services, databases, and deployments.",
      inputSchema: zodToJsonSchema(z.object({})),
    },
  • Input schema for 'list-resources' tool: an empty object, indicating no input parameters are required.
    inputSchema: zodToJsonSchema(z.object({})),
  • Helper function 'coolifyApiCall' used by the 'list-resources' handler (and others) to make authenticated API calls to the Coolify server.
    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