Skip to main content
Glama

context_create

Create a named Docker CLI context to point at a daemon endpoint, with optional TLS verification settings.

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. It does raise ValueError 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 - Optional 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
Behavior5/5

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

The description discloses important behaviors beyond annotations: it notes that the tool does not retarget the docker-py client, does not raise on non-zero CLI exit (returns result dict instead), and raises ValueError on commas to prevent injection. All this enriches the agent's understanding of what actually happens during invocation.

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: an initial concise purpose paragraph, followed by a bulleted argument list, and a return structure. Every sentence adds value, covering purpose, caveats, parameter requirements, and output format without extraneous filler. Despite being detailed, it remains front-loaded and efficiently organized.

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?

Given the tool's complexity (7 parameters, no schema coverage, no output schema), the description is comprehensive. It explains the return dict fields, error behavior, connection to sibling tools, and critical injection protection, leaving no gaps that would hinder correct invocation. This is complete for all practical use.

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?

With 0% schema coverage, the description fully explains all 7 parameters: each argument gets a clear description, including constraints like 'may not already exist' or 'no commas', and an example for the docker_host parameter. It also clarifies that skip_tls_verify must be set directly and cannot be smuggled through the command, providing all necessary info for correct parameter usage.

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 clearly states 'Create a new Docker CLI context pointing at a daemon endpoint' and further explains it 'Registers a named endpoint for the CLI; switch with context_use, enumerate with context_list.' This distinct verb and resource, plus explicit differentiation from sibling tools (context_use, context_list), makes 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?

The description gives explicit context on when to use the tool: it registers a named endpoint for the CLI, clarifies it does not retarget the server's docker-py client, and warns about non-zero exit handling (inspect returncode/stderr). It also states constraints like 'must not already exist' and the comma injection risk, effectively explaining both appropriate usage and caveats.

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