Skip to main content
Glama

container_commit

Snapshot a container's current filesystem state as a new image, capturing debugging states or manual changes. Apply Dockerfile instructions to adjust the image.

Instructions

Snapshot a container's current filesystem state as a new image.

Useful for capturing a debugging state or saving manual changes made inside a container. For repeatable builds use image_build with a Dockerfile instead; publish the result with image_tag + image_push. The container is paused by default during the snapshot to ensure filesystem consistency - set pause=False only if the container cannot be paused. changes accepts Dockerfile instructions to apply on top of the snapshot, e.g. ["CMD ["python", "app.py"]", "ENV FOO=bar"].

Args: id_or_name: Container id or name to snapshot repository: Repository name for the new image, e.g. "myorg/myimage" tag: Tag for the new image (default: "latest") message: Commit message stored in the image metadata author: Author string stored in the image metadata pause: Pause the container during commit for consistency changes: Dockerfile instructions (CMD, ENV, EXPOSE, etc.) to apply to the image conf: Additional image configuration overrides as a dict

Returns: dict: The new image's full inspect payload (Id is the new image id)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNo
confNo
pauseNo
authorNo
changesNo
messageNo
id_or_nameYes
repositoryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A5/5.0
Behavior5/5

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

Without useful annotation detail (readOnlyHint=false and destructiveHint=false are generic), the description carries the behavioral burden. It discloses a key runtime behavior: 'The container is paused by default during the snapshot to ensure filesystem consistency.' It also explains the effect of changes ('Dockerfile instructions to apply on top of the snapshot') and the return value ('full inspect payload (Id is the new image id)'). This is transparency beyond any structured field.

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 front-loaded with a one-sentence summary, then supplies usage context, an alternative, behavioral notes, and a structured Args/Returns section. Every sentence adds information; there is no fluff or repetition of schema defaults except where it adds clarity (e.g., tag default). It is appropriately sized for a tool with 8 parameters.

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

Completeness5/5

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

Despite no output schema and no schema-level parameter descriptions, the description covers the full contract: what it does, when to use it, which sibling to use instead, all 8 parameters with meanings and examples, a critical default behavior (pause), and the return payload. An agent has enough information to call this tool correctly without inspecting further.

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

Parameters5/5

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

Schema description coverage is 0%, so the description fully compensates. Every parameter is explained: id_or_name ('Container id or name to snapshot'), repository ('Repository name for the new image, e.g. "myorg/myimage"'), tag (default 'latest'), message, author, pause, changes (with Dockerfile instruction examples), and conf ('Additional image configuration overrides as a dict'). The changes example is especially valuable: '["CMD ["python", "app.py"]", "ENV FOO=bar"]'.

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?

The description opens with a precise action: 'Snapshot a container's current filesystem state as a new image.' This states the verb (snapshot), resource (container filesystem), and result (new image). It also distinguishes itself from the sibling image_build by saying 'For repeatable builds use image_build with a Dockerfile instead,' making the tool's unique role clear.

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?

Usage context is explicit: 'Useful for capturing a debugging state or saving manual changes made inside a container.' It then gives an explicit alternative and routing: 'For repeatable builds use image_build with a Dockerfile instead; publish the result with image_tag + image_push.' It even provides behavioral guidance on the pause parameter: 'set pause=False only if the container cannot be paused.' This tells the agent exactly when to use this tool versus the sibling build/publish tools.

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

Deploy Server

Other Tools