Skip to main content
Glama

docker_system

Perform Docker system operations such as viewing info, version, events, disk usage, and pruning unused resources with optional flags.

Instructions

Docker system operations and information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesSystem action to perform
allNoApply to all resources (for prune)
volumesNoInclude volumes in operation
forceNoForce operation without confirmation

Implementation Reference

  • The systemOperations method that handles the 'docker_system' tool logic. It builds and executes docker system commands (info, version, events, df, prune) based on the action argument.
    async systemOperations(args: DockerSystemArgs): Promise<ToolResult> {
      const { action, all, volumes, filter, force, since, until, format } = args;
    
      ValidationUtils.validateRequired({ action }, ['action']);
    
      let command = 'docker system';
    
      switch (action) {
        case 'info':
          command = 'docker system info';
          if (format) command += ` --format ${format}`;
          break;
          
        case 'version':
          command = 'docker version';
          if (format) command += ` --format ${format}`;
          break;
          
        case 'events':
          command = 'docker system events';
          if (since) command += ` --since ${since}`;
          if (until) command += ` --until ${until}`;
          if (filter) command += ` --filter ${filter}`;
          break;
          
        case 'df':
          command = 'docker system df';
          break;
          
        case 'prune':
          command = 'docker system prune';
          if (all) command += ' -a';
          if (volumes) command += ' --volumes';
          if (force) command += ' -f';
          if (filter) command += ` --filter ${filter}`;
          break;
          
        default:
          throw new Error(`Unsupported system action: ${action}`);
      }
    
      try {
        return await this.executeDockerCommand(command, { cwd: this.getCurrentWorkspace() });
      } catch (error: any) {
        throw new Error(`Docker system ${action} failed: ${error.message}`);
      }
    }
  • The DockerSystemArgs interface defining the input schema for the docker_system tool, with action as a union type of 'info' | 'version' | 'events' | 'df' | 'prune' and optional parameters.
    export interface DockerSystemArgs {
      action: 'info' | 'version' | 'events' | 'df' | 'prune';
      all?: boolean;
      volumes?: boolean;
      filter?: string;
      force?: boolean;
      since?: string;
      until?: string;
      format?: string;
    }
  • src/index.ts:219-220 (registration)
    The router case statement that dispatches the 'docker_system' tool to systemOperations on the DockerService.
    case 'docker_system':
      return await this.dockerService.systemOperations(args as DockerSystemArgs);
  • The tool definition/registration for 'docker_system', declaring the name, description, and inputSchema with properties like action, all, volumes, force.
    {
      name: 'docker_system',
      description: 'Docker system operations and information',
      inputSchema: {
        type: 'object',
        properties: {
          action: { 
            type: 'string', 
            enum: ['info', 'version', 'events', 'df', 'prune'],
            description: 'System action to perform' 
          },
          all: { type: 'boolean', description: 'Apply to all resources (for prune)' },
          volumes: { type: 'boolean', description: 'Include volumes in operation' },
          force: { type: 'boolean', description: 'Force operation without confirmation' },
        },
        required: ['action'],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It fails to disclose that actions like 'prune' are destructive and irreversible. 'info' and 'version' are read-only, but this is not stated.

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

Conciseness3/5

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

Extremely short at 6 words, but lacks sufficient information to be considered efficient. It is under-specified rather than concise.

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

Completeness2/5

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

No output schema and 4 parameters with varying behaviors. The description is insufficient; it should at least summarize key actions like info, events, df, prune, and their implications.

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

Parameters3/5

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

Schema description coverage is 100% (all parameters described in schema). The description adds no additional meaning beyond what the schema already provides, so baseline score of 3 is appropriate.

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

Purpose2/5

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

Description 'Docker system operations and information' is vague and does not specify what actions are included (info, prune, etc.). While the schema lists actions, the description fails to distinguish this tool from siblings like docker_containers, docker_images, etc.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus other Docker sibling tools. The description provides no context about appropriate scenarios or exclusions.

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/agentics-ai/code-mcp'

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