Skip to main content
Glama

docker_list_images

List local Docker images with repository, tag, and size information to manage container infrastructure.

Instructions

List local Docker images with repository, tag, and size

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoShow all images including intermediate

Implementation Reference

  • The actual implementation of the tool 'docker_list_images'.
    export async function listImages(args: Record<string, unknown>): Promise<string> {
      const docker = getDockerClient();
      const images = await docker.listImages({ all: (args.all as boolean) || false });
    
      if (images.length === 0) {
        return "No images found.";
      }
    
      const headers = ["REPOSITORY:TAG", "IMAGE ID", "SIZE", "CREATED"];
      const rows = images.map((img) => {
        const tags = (img.RepoTags || ["<none>"]).join(", ");
        const created = new Date(img.Created * 1000);
        const age = Math.floor((Date.now() - created.getTime()) / 86400000);
    
        return [
          tags,
          img.Id.replace("sha256:", "").substring(0, 12),
          formatBytes(img.Size),
          `${age}d ago`,
        ];
      });
    
      return `Docker images:\n\n${formatTable(headers, rows)}`;
    }
  • Registration of the 'docker_list_images' tool with its input schema.
    {
      name: "docker_list_images",
      description: "List local Docker images with repository, tag, and size",
      inputSchema: {
        type: "object" as const,
        properties: {
          all: { type: "boolean", description: "Show all images including intermediate" },
        },
      },
    },
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 mentions what information is returned (repository, tag, size) but doesn't disclose behavioral aspects like whether this is a read-only operation, if it requires specific permissions, how results are formatted, or if there are rate limits. The description is minimal and lacks operational context.

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

Conciseness5/5

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

The description is a single, efficient sentence that clearly states the tool's purpose. It's front-loaded with the core functionality and includes specific output details without unnecessary words.

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

Completeness3/5

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

For a simple read operation with one parameter fully documented in the schema, the description provides basic purpose but lacks context about behavior, output format, and usage guidelines. Without annotations or output schema, more detail would be helpful, though the simplicity of the tool keeps it from being severely inadequate.

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%, so the schema fully documents the single parameter 'all'. The description doesn't add any parameter-specific information beyond what's in the schema, maintaining the baseline score of 3 for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('List') and resource ('local Docker images') with specific output fields (repository, tag, size). It distinguishes from siblings like docker_list_containers by focusing on images, but doesn't explicitly differentiate from other image-related tools like docker_inspect_image.

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 alternatives is provided. The description doesn't mention when to choose docker_list_images over docker_inspect_image or other sibling tools, nor does it specify prerequisites or context for usage.

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/batu-sonmez/infraclaude'

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