system
Manage Coolify deployments by performing operations such as checking version, monitoring health, enabling/disabling APIs, and reviewing resource status through a CLI or programmatic interface.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Operation to perform |
Implementation Reference
- src/mcp/tools/system.ts:14-36 (handler)Core handler function implementing the 'system' tool logic. Dispatches the 'operation' parameter to underlying API functions (version, healthcheck, etc.) wrapped in safeApiCall.export async function systemHandler(args: SystemToolArgs) { const { operation } = args; switch (operation) { case 'version': return await safeApiCall(() => version()); case 'health': return await safeApiCall(() => healthcheck()); case 'enable_api': return await safeApiCall(() => enableApi()); case 'disable_api': return await safeApiCall(() => disableApi()); case 'resources': return await safeApiCall(() => listResources()); default: throw new Error(`Unknown operation: ${operation}`); } }
- src/mcp-server.ts:335-366 (registration)MCP server registration of the 'system' tool, including Zod input schema validation for the 'operation' parameter and a wrapper handler that invokes the core systemHandler.// Register system tool with proper Zod schema format server.tool( 'system', { operation: z.enum([ 'version', 'health', 'enable_api', 'disable_api', 'resources' ]).describe("Operation to perform") }, async ({ operation }) => { try { console.error('System tool received args:', JSON.stringify({ operation }, null, 2)); const result = await systemHandler({ operation }); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } );
- src/mcp-server.ts:338-342 (schema)Zod schema defining the input for the 'system' tool: requires 'operation' enum matching supported system operations.{ operation: z.enum([ 'version', 'health', 'enable_api', 'disable_api', 'resources' ]).describe("Operation to perform") },