Skip to main content
Glama

context_remove

Destructive

Remove a Docker CLI context by deleting its connection metadata, leaving the daemon untouched. Use force to delete the active context.

Instructions

Remove a Docker CLI context.

Deletes only the CLI's connection metadata — the daemon it pointed at is untouched. The current context needs force=True (or context_use another first). Does not raise on a non-zero CLI exit — inspect returncode/stderr in the result.

args: name - Context name to remove force - Force removal even if the context is the current one returns: dict - {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
forceNo
Behavior5/5

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

Beyond the destructiveHint=true annotation, the description discloses critical behavior: it deletes only CLI connection metadata while leaving the daemon untouched, and it does not raise on non-zero CLI exits, requiring inspection of returncode/stderr. These details are valuable and not present in the annotations or schema.

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 and compact. It opens with a clear one-line purpose, uses a concise paragraph for behavioral nuances, and lists parameters/returns in a readable format. Every sentence contributes meaningful information without repetition or fluff.

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 simplicity, the description covers all essential aspects: purpose, side effects (deletion scope), edge case (current context), error handling (non-zero exit), parameters, and return value shape. No output schema exists, so documenting the return dict is especially valuable.

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 schema description coverage at 0%, the description fully compensates by explaining each parameter: 'name - Context name to remove' and 'force - Force removal even if the context is the current one'. This adds meaning beyond the raw schema types and defaults.

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 begins with 'Remove a Docker CLI context', using a specific verb and resource that clearly differentiates it from sibling tools like context_create, context_list, context_inspect, and context_use. It also clarifies that it only affects CLI metadata, not the daemon, further pinning down its purpose.

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 provides concrete guidance on when this tool is appropriate and how to handle the current context: 'The current context needs force=True (or `context_use` another first)'. This explicitly offers an alternative approach via a sibling tool, satisfying the when-to-use vs alternatives criterion.

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