Skip to main content
Glama

list_images

View all Docker images available on your system to manage containers and resources through the Docker MCP Server.

Instructions

List all Docker images

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that executes the 'docker images' command, parses the output into a list of image objects (name, id, size), and returns it as JSON-formatted text content.
    private async listImages() {
      const { stdout } = await execAsync('docker images --format "{{.Repository}}:{{.Tag}}\\t{{.ID}}\\t{{.Size}}"');
      
      const images = stdout.trim().split('\n')
        .filter(line => line.trim() !== '')
        .map(line => {
          const [name, id, size] = line.split('\t');
          return { name, id, size };
        });
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(images, null, 2),
          },
        ],
      };
    }
  • src/index.ts:82-89 (registration)
    Registration of the 'list_images' tool in the ListToolsRequestSchema handler, specifying name, description, and empty input schema (no parameters required).
    {
      name: 'list_images',
      description: 'List all Docker images',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Input schema definition for the list_images tool: an empty object, indicating no input parameters are required.
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • Switch case in the CallToolRequestSchema handler that dispatches to the listImages method when 'list_images' tool is called.
    case 'list_images':
      return await this.listImages();
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states 'List all Docker images' but doesn't disclose behavioral traits like whether it returns all images or only local ones, if it requires specific permissions, what the output format is, or if there are rate limits. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 with no wasted words. It's front-loaded with the core action and resource, making it easy to parse. Every part of the sentence contributes directly to understanding the tool's purpose.

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?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'List all' entails (e.g., format, scope, or limitations), which is crucial for a tool that might return complex data. For a tool with no structured support, more context is needed to be fully helpful.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so the schema fully documents the lack of inputs. The description adds no parameter information, which is appropriate here. Baseline is 4 for 0 parameters, as the description doesn't need to compensate for any gaps.

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 verb ('List') and resource ('Docker images'), making the purpose immediately understandable. It doesn't differentiate from sibling tools like 'list_containers' or 'pull_image', which would require a 5, but it's unambiguous about what it does.

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?

The description provides no guidance on when to use this tool versus alternatives like 'list_containers' or 'pull_image'. It lacks context about prerequisites, such as whether Docker must be running, or any exclusions. This leaves the agent to infer usage from the tool name alone.

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

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