Skip to main content
Glama

context_remove

Destructive

Remove a Docker CLI context, deleting only its connection metadata without affecting the daemon. Supports force removal of the current 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 annotations (readOnlyHint=false, destructiveHint=true), the description details exactly what gets deleted (CLI metadata, not the daemon), notes that non-zero CLI exits do not raise exceptions, and instructs to inspect returncode/stderr. This provides rich behavioral context.

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 compact but structured: purpose, behavioral nuance, prerequisite, error behavior, args, and returns. Every sentence carries useful information with no redundancy.

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?

For a simple 2-parameter tool with no output schema, the description covers the action, side effects, prerequisites, error handling, and return format. It is fully sufficient for correct invocation and result interpretation.

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 description coverage, the description fully compensates by explaining 'name' (context to remove) and 'force' (force even if current). It also documents the return dict fields, adding 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 'Remove a Docker CLI context', using a specific verb and resource. It further clarifies that only connection metadata is deleted (not the daemon), distinguishing it from other context operations like context_create, context_inspect, and context_use.

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 states a clear prerequisite: the current context requires force=True or using context_use first. This gives practical guidance for when the tool can be used, though it doesn't explicitly compare against sibling tools beyond that precondition.

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