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
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| tls_ca | No | ||
| tls_key | No | ||
| tls_cert | No | ||
| description | No | ||
| docker_host | Yes | ||
| skip_tls_verify | No |