Skip to main content
Glama

context_create

Create a Docker CLI context for a daemon endpoint, registering a named connection to switch and list contexts while preserving the server's client configuration.

Instructions

Create a new Docker CLI context pointing at a daemon endpoint.

Registers a named endpoint for the CLI; switch with context_use, enumerate with context_list. It does not retarget this server's docker-py client (pinned at startup). Does not raise on a non-zero CLI exit — inspect returncode/stderr in the result.

args: name - Name for the new context (must not already exist) docker_host - Daemon URL, e.g. "tcp://10.0.0.5:2376" or "unix:///var/run/docker.sock" description - Optional human description shown in context ls tls_ca - Path on the local host to the CA cert (for TLS daemons) tls_cert - Path on the local host to the client cert tls_key - Path on the local host to the client key skip_tls_verify - Disable TLS verification (insecure; for testing only) returns: dict - {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
tls_caNo
tls_keyNo
tls_certNo
descriptionNo
docker_hostYes
skip_tls_verifyNo
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description adds crucial behavioral context: the tool does not retarget the server's docker-py client, and it does not raise on non-zero CLI exits. These are non-obvious traits that have significant impact on how an agent should interpret results.

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 well-structured: a front-loaded purpose statement, then two crucial caveats, followed by an args list and return format. Every sentence adds value, and the format is scannable and appropriately sized for a 7-parameter tool.

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?

The description covers all essential aspects despite the absence of an output schema: it defines the return dict shape, clarifies non-exception behavior, and explains the docker-py limitation. This makes the tool fully comprehensible without needing to consult sibling tools or external docs.

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 carries the full burden. It provides detailed explanations for all 7 parameters, including examples for `docker_host`, constraints on `name`, and clarity on TLS fields. This fully compensates for the lack of schema descriptions.

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 'Create a new Docker CLI context pointing at a daemon endpoint,' which is a specific verb and resource. It distinguishes itself from siblings by explicitly referencing `context_use` and `context_list` for follow-up actions, clarifying the unique role of this creation tool.

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?

The description states when to use the tool (to create a new context) and names alternatives (`context_use`, `context_list`). It also provides critical usage caveats: the docker-py client is pinned at startup, and non-zero CLI exits do not raise exceptions, directing the user to inspect `returncode`/`stderr`. This is explicit, actionable guidance.

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