Skip to main content
Glama

system

Manage Coolify deployments by checking system health, controlling API access, viewing resources, and retrieving version information through programmatic operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYesOperation to perform

Implementation Reference

  • The core handler function for the 'system' tool that performs different system operations by calling generated API functions 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}`); } }
  • Registers the MCP tool named 'system' with input schema using Zod for the 'operation' parameter and a wrapper that calls systemHandler, formats output as MCP content.
    // 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 }; } } );
  • TypeScript interface defining the input arguments for the systemHandler, matching the operations used in the switch statement.
    interface SystemToolArgs { operation: string; }
  • Registers CLI commands under 'system' that use the systemHandler (note: uses 'info' operation which may not match MCP enums). Called from src/cli/index.ts.
    export function registerSystemCommands(program: Command) { const system = program.command('system') .description('System operations'); // Get system info system.command('info') .description('Get system information') .action(async () => { try { const result = await systemHandler({ operation: 'info' }); console.log(chalk.green('System Information:')); console.log(JSON.stringify(result.data, null, 2)); } catch (error: any) { console.error(chalk.red('Error:'), error.message); process.exit(1); } }); }

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

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