Skip to main content
Glama

get_docker_image_history

Retrieve a Docker image's layer history—sizes and creation times—to understand what the image is built from; raw build commands are omitted.

Instructions

Returns an image's layer history: sizes and creation times. Raw build commands are omitted. Read-only via the Docker API. Use to understand what an image is built from; get_docker_image_details for config and labels.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "image_id": "<image_id>"
    },
    "name": "get_docker_image_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
image_idYesimage name or ID

Output Schema

NameRequiredDescriptionDefault
errorsNo
layersYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedOutput schema / properties / layers / items / properties / created_by / description
      Added value: +"always redacted to prevent build command disclosure"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does well: it discloses read-only access via the Docker API and, importantly, that raw build commands are omitted from the output — a non-obvious data-omission trait an agent would otherwise assume wrong. It stops short of stating prerequisites (Docker daemon/socket access) or failure behavior for an unknown image_id, which keeps it below a 5.

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?

Three short sentences, front-loaded with the return content, then the omission caveat, then safety and sibling routing. Every sentence earns its place and nothing is repeated from structured fields.

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

Completeness4/5

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

An output schema exists, so return shape need not be explained, and the description still notes sizes and creation times plus what is excluded. The only shortfall for a single-parameter read tool is the absence of any note on prerequisite Docker access or behavior when the image is not found.

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?

Only one parameter and schema coverage is 100%, with 'image name or ID' already documented in the schema, so the baseline of 3 applies. The description adds no acceptance details such as whether short IDs, tags, or digests are valid inputs.

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

Purpose5/5

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

States a specific verb and resource ('Returns an image's layer history') and immediately scopes the content to sizes and creation times. It also distinguishes itself from the sibling get_docker_image_details, which covers config and labels, so an agent can pick between them without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the use case ('Use to understand what an image is built from') and routes the agent to the correct alternative with its own purpose ('get_docker_image_details for config and labels'). This is the same pattern as the reference high-scoring definition and leaves little to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.