Skip to main content
Glama

context_create

Create a new Docker CLI context pointing at a daemon endpoint. Register a named endpoint for the CLI, switch with context_use, and list with context_list.

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 (a missing docker binary or a timeout still raises) - inspect returncode/stderr in the result. It does raise ToolInputError before running anything if docker_host or a TLS path contains a comma, which would inject extra keys (including skip-tls-verify) into the endpoint spec.

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"; no commas description: Human description shown in context ls tls_ca: Path on the local host to the CA cert (for TLS daemons); no commas tls_cert: Path on the local host to the client cert; no commas tls_key: Path on the local host to the client key; no commas skip_tls_verify: Disable TLS verification (insecure; for testing only). The only way to set it: it cannot be smuggled through docker_host

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.9.0

TDQS

A4.8/5.0
Behavior5/5

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

The description discloses several non-obvious behaviors: it does not retarget the docker-py client, does not raise on a non-zero CLI exit, and raises ToolInputError if docker_host or TLS paths contain a comma that could inject extra keys. With minimal annotations present, this fully carries the burden of behavioral disclosure without contradiction.

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 dense but every sentence earns its place, front-loaded with the core purpose followed by critical caveats and a clear Args/Returns structure. It manages to communicate all essential operational details without waste.

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 having no output schema, the description explicitly states the return dict format and covers parameter constraints, error handling, and core behavior. Given the tool's complexity (7 parameters, security-sensitive comma restrictions), the description is complete for correct invocation.

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 coverage is 0% and the description compensates thoroughly. The Args section documents every parameter, including constraints like 'no commas' on docker_host and TLS paths, and explains the unique role of skip_tls_verify as the only way to set that flag. This adds substantial meaning beyond the bare schema.

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+resource statement. It clearly distinguishes creation from siblings like context_use, context_list, and context_remove by focusing on registration of a named endpoint.

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?

It explains the relationship to related actions: 'switch with context_use, enumerate with context_list,' and notes the tool does not retarget the server's docker-py client. This gives clear context for when to use it, though it does not explicitly state exclusion criteria or when to avoid using it.

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