Skip to main content
Glama

list_images

Retrieve a detailed list of all available Docker images on your system, enabling efficient container management and resource tracking through the MCP protocol.

Instructions

List all Docker images

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • The handler function that lists Docker images by executing 'docker images' command, parsing the output, and returning 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)
    Tool registration in the ListTools response, including name, description, and empty input schema.
    { name: 'list_images', description: 'List all Docker images', inputSchema: { type: 'object', properties: {}, }, },
  • src/index.ts:191-192 (registration)
    Dispatch case in the CallToolRequest handler that routes to the listImages method.
    case 'list_images': return await this.listImages();
  • Input schema definition for the list_images tool (empty object, no parameters required).
    inputSchema: { type: 'object', properties: {}, },

Other Tools

Related 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