Skip to main content
Glama

stop-application

Halt a specific application by its UUID on the Coolify MCP Server, making it unavailable. This tool ensures controlled application shutdown for efficient resource management.

Instructions

Stop a specific application using its UUID. This halts the application and makes it unavailable.

Input Schema

NameRequiredDescriptionDefault
uuidYesResource UUID

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "uuid": { "description": "Resource UUID", "type": "string" } }, "required": [ "uuid" ], "type": "object" }

Implementation Reference

  • The handler function for the 'stop-application' tool within the CallToolRequestSchema handler. It parses the UUID argument, calls the Coolify API endpoint `/applications/${uuid}/stop` to stop the application, and returns the JSON result as text content.
    case "stop-application": { const { uuid } = UuidSchema.parse(request.params.arguments); const result = await coolifyApiCall(`/applications/${uuid}/stop`); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; }
  • Zod schema defining the input for the 'stop-application' tool: an object containing a 'uuid' string field.
    const UuidSchema = z.object({ uuid: z.string().describe("Resource UUID"), });
  • src/index.ts:103-107 (registration)
    Registration of the 'stop-application' tool in the ListToolsRequestSchema handler, including its name, description, and input schema reference.
    { name: "stop-application", description: "Stop a specific application using its UUID. This halts the application and makes it unavailable.", inputSchema: zodToJsonSchema(UuidSchema), },
  • Helper function used by the 'stop-application' handler 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(); }

Other Tools

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

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