Skip to main content
Glama

system

Check Coolify system version and health, enable or disable API access, and list available resources using system operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYesOperation to perform

Implementation Reference

  • The systemHandler function that executes the 'system' tool logic. It dispatches operations (version, health, enable_api, disable_api, resources) by calling the corresponding generated SDK functions via 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}`);
      }
    }
  • Registration of the 'system' tool on the MCP server using server.tool('system', ...). Defines the Zod schema for the 'operation' parameter and wires up the handler that calls 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
          };
        }
      }
    );
  • The systemTool input schema definition with the 'operation' enum and the handler property. Defines the tool's name, description, and inputSchema with allowed operations.
    export const systemTool = {
      name: "system_tool",
      description: "Access system-wide operations, health checks, and API management",
      inputSchema: {
        type: "object",
        properties: {
          operation: {
            type: "string",
            description: "Operation to perform",
            enum: ["version", "health", "enable_api", "disable_api", "resources"]
          }
        },
        required: ["operation"]
      },
      handler: systemHandler
  • CLI registration of the 'system' command via Commander, calling systemHandler for the 'info' operation.
    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);
          }
        });
  • The safeApiCall helper that wraps API calls with error handling, used by systemHandler to safely invoke SDK functions like version(), healthcheck(), etc.
    export async function safeApiCall<T>(apiCall: () => Promise<T>): Promise<T> {
      try {
        return await apiCall();
      } catch (error) {
        return handleApiError(error);
      }
    }
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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