Skip to main content
Glama

docker_inspect_image

Retrieve detailed configuration and metadata from Docker images to analyze their structure, dependencies, and runtime requirements.

Instructions

Get detailed information about a Docker image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesImage name or ID

Implementation Reference

  • Handler function that executes the "docker_inspect_image" tool logic using the Docker client.
    export async function inspectImage(args: Record<string, unknown>): Promise<string> {
      const docker = getDockerClient();
      const name = args.name as string || args.id as string;
      if (!name) throw new Error("Image name or ID is required");
    
      const image = docker.getImage(name);
      const info = await image.inspect();
    
      const lines = [
        `Image: ${(info.RepoTags || []).join(", ")}`,
        `ID:    ${info.Id.replace("sha256:", "").substring(0, 12)}`,
        `Size:  ${formatBytes(info.Size)}`,
        `Arch:  ${info.Architecture}`,
        `OS:    ${info.Os}`,
        "",
        `Cmd:   ${(info.Config.Cmd || []).join(" ")}`,
        `Env:   ${(info.Config.Env || []).length} variables`,
      ];
    
      const layers = info.RootFS?.Layers || [];
      lines.push(`Layers: ${layers.length}`);
    
      return lines.join("\n");
    }
  • Schema definition for the "docker_inspect_image" tool.
    {
      name: "docker_inspect_image",
      description: "Get detailed information about a Docker image",
      inputSchema: {
        type: "object" as const,
        properties: {
          name: { type: "string", description: "Image name or ID" },
        },
        required: ["name"],
      },
  • Registration of the "docker_inspect_image" tool in the switch handler.
    case "docker_inspect_image": return inspectImage(a);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('Get'), implying it's non-destructive, but doesn't cover aspects like authentication needs, rate limits, error conditions, or the format/scope of the 'detailed information' returned. This leaves significant gaps for a tool with no annotation coverage.

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 zero waste. It's front-loaded with the core purpose and appropriately sized for a simple tool, making it easy to parse quickly.

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 'detailed information' includes, potential behavioral traits, or usage context. For a tool with no structured data beyond the input schema, more descriptive content is needed to adequately guide an agent.

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?

The schema description coverage is 100%, with the single parameter 'name' documented as 'Image name or ID'. The description doesn't add any meaning beyond this, such as examples or constraints, so it meets the baseline of 3 where the schema does the heavy lifting.

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 'Get detailed information about a Docker image' clearly states the verb ('Get') and resource ('Docker image'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'docker_inspect_container' or 'docker_list_images', which would require more specificity to earn a 5.

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. It doesn't mention sibling tools like 'docker_inspect_container' for container details or 'docker_list_images' for listing images, nor does it specify prerequisites or contexts 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