Skip to main content
Glama

volume_create

Create a Docker-managed volume to persist data across container restarts, supporting custom drivers, options, and labels for databases or uploads.

Instructions

Create a volume managed by Docker.

Named volumes persist after their containers stop or are removed; use them for databases, uploads, or any data that must outlive a container. Anonymous volumes (no name) are only removed automatically when the container was started with --rm or removed with docker rm -v; otherwise they accumulate and must be pruned manually. Common driver_opts for the default local driver: bind-mount an existing host path with {"type": "none", "device": "/host/path", "o": "bind"}, or mount an NFS share with {"type": "nfs", "device": "server:/export", "o": "addr=server,rw"}. Third-party drivers (e.g. rexray, convoy) accept their own option keys. List existing volumes with volume_list; reclaim unused ones with volume_prune. Created volumes are stamped with provenance labels.

args: name - Volume name; auto-generated if omitted (creates an anonymous volume) driver - Volume driver to use (default: "local") driver_opts - Driver-specific options dict labels - Labels to set on the volume returns: dict - The created volume's attrs ({"Name", "Driver", "Mountpoint", "Labels", ...})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
driverNo
labelsNo
driver_optsNo
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses persistence semantics, automatic removal conditions for anonymous volumes, driver_opts examples, and provenance label stamping. This gives the agent a clear behavioral model of what happens after creation.

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 long but every sentence conveys necessary information: volume persistence, anonymous volume cleanup, driver_opts examples, related tools, and return format. It is logically organized with context first, then parameter details, and finally return type.

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?

With no output schema, the description defines the return shape. It covers the core lifecycle concerns (persistence, cleanup), parameter semantics, and driver behavior. The inclusion of related tool references (volume_list, volume_prune) places it in the broader workflow.

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?

The input schema has 0% description coverage, but the description compensates with an 'args:' section explaining each parameter, including defaults and the effect of omitting 'name'. It also gives concrete examples for driver_opts, which is not inferable from schema types alone.

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 specific verb+resource ('Create a volume managed by Docker') and immediately distinguishes between named and anonymous volumes. It also references sibling tools (volume_list, volume_prune) to clarify scope, making the purpose unmistakable.

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?

Provides explicit use cases ('databases, uploads, or any data that must outlive a container') and contrasts with anonymous volume behavior. It names alternative tools for listing and pruning, effectively telling the agent when to choose this tool versus volume_list or volume_prune.

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

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