Skip to main content
Glama

commit_container

Snapshot a container's filesystem state into a new image, preserving manual changes or debugging state with optional Dockerfile instructions.

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 a Dockerfile instead. 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 (default True) 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 attrs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNo
confNo
pauseNo
authorNo
changesNo
messageNo
id_or_nameYes
repositoryNo
Behavior4/5

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

The description discloses that the container is paused by default for consistency and explains the purpose of the pause parameter. It also mentions that changes apply Dockerfile instructions. There is no contradiction with annotations (readOnlyHint=false, destructiveHint=false).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: a concise one-liner purpose, followed by usage guidance, and then a list of parameter descriptions. It is front-loaded with the main action and avoids unnecessary fluff, but the parameter list could be slightly more compact.

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?

The description covers all 8 parameters, provides usage context, and mentions return type. Given the tool's complexity (nested objects, multiple parameters) and no output schema, the description is sufficiently complete for an AI agent to understand behavior and parameters.

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?

Despite 0% schema description coverage, the description provides detailed explanations for all 8 parameters, including examples for 'changes' (e.g., '["CMD ["python", "app.py"]", "ENV FOO=bar"]'). This adds significant meaning beyond the schema definitions.

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 explicitly states 'Snapshot a container's current filesystem state as a new image', clearly indicating the action and resource. It distinguishes from siblings by emphasizing debugging and manual changes, contrasting with build_image for repeatable builds.

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

Usage Guidelines4/5

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

The description advises using a Dockerfile for repeatable builds, providing a clear when-not-to-use condition. It also guides on the pause parameter, stating when to set it to False. However, it does not explicitly list alternative sibling tools for similar tasks.

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

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