Skip to main content
Glama

docker_info

Retrieve Docker system information and statistics, including version details, disk usage, and performance metrics for monitoring and troubleshooting.

Instructions

Get Docker system information and statistics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesType of information to retrieve

Implementation Reference

  • src/index.ts:1321-1371 (registration)
    Registration of the 'docker_info' MCP tool, including inline schema definition and handler function that executes Docker commands based on the 'type' parameter: 'docker system info', 'docker --version && docker-compose --version', 'docker stats --no-stream', or 'docker system df', using the shared executeDockerCommand helper.
    server.registerTool( "docker_info", { title: "Docker System Information", description: "Get Docker system information and statistics", inputSchema: { type: z.enum(["info", "version", "stats", "disk_usage"]).describe("Type of information to retrieve") } }, async ({ type }) => { try { let command: string; switch (type) { case "info": command = "docker system info"; break; case "version": command = "docker --version && docker-compose --version"; break; case "stats": command = "docker stats --no-stream"; break; case "disk_usage": command = "docker system df"; break; } const result = await executeDockerCommand(command); return { content: [ { type: "text", text: `Docker ${type}:\n\n${result.stdout}${result.stderr ? `\nWarnings:\n${result.stderr}` : ""}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting Docker information: ${error instanceof Error ? error.message : String(error)}` } ], isError: true }; } } );
  • The handler function for docker_info tool. Takes 'type' input and runs the appropriate Docker command via executeDockerCommand, formats the output as markdown text block, handles errors.
    async ({ type }) => { try { let command: string; switch (type) { case "info": command = "docker system info"; break; case "version": command = "docker --version && docker-compose --version"; break; case "stats": command = "docker stats --no-stream"; break; case "disk_usage": command = "docker system df"; break; } const result = await executeDockerCommand(command); return { content: [ { type: "text", text: `Docker ${type}:\n\n${result.stdout}${result.stderr ? `\nWarnings:\n${result.stderr}` : ""}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting Docker information: ${error instanceof Error ? error.message : String(error)}` } ], isError: true }; } } );
  • Schema/metadata for docker_info tool defining title, description, and inputSchema using Zod enum for 'type' parameter.
    { title: "Docker System Information", description: "Get Docker system information and statistics", inputSchema: { type: z.enum(["info", "version", "stats", "disk_usage"]).describe("Type of information to retrieve") } },

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/TauqeerAhmad5201/docker-mcp-extension'

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