Skip to main content
Glama

context_list

Read-only

List Docker CLI contexts to see available daemons and identify the active one.

Instructions

List Docker CLI contexts known to the host running this MCP server.

Contexts are a CLI concept (stored in the docker config dir) letting one CLI target multiple daemons. This server uses whatever DOCKER_HOST / current-context resolved to at startup, so changing contexts only affects future subprocess-based tools, not the docker-py SDK client. Use context_inspect for one context's full config and context_use to switch. Raises RemoteFailureError if the CLI call fails.

Returns: list: One dict per context, keyed as the CLI emits them - Name, Description, DockerEndpoint and Current, the last being true for the context the CLI would use by default

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark the tool as read-only and non-destructive. The description adds valuable behavioral nuance: the server uses whatever DOCKER_HOST/current-context resolved at startup, so context changes have limited effect on the SDK client. It also discloses the RemoteFailureError condition and the exact output shape, going well beyond the annotations.

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?

Every sentence earns its place: the opening states the core action, then the description explains the CLI concept, startup behavior, sibling alternatives, error behavior, and return format. It is front-loaded and structured without 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?

The description is complete for a zero-parameter read-only tool. It explains the underlying concept, the tool's relationship to the server process, exactly what the return value contains, when to use sibling tools, and the error case. No separate output schema exists, so the description fully compensates.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, so the baseline for this dimension is 4. The description correctly includes no parameter explanations because none are needed; it instead documents the returned dict keys, which is more relevant to output than parameters.

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 a specific verb ('List') and resource ('Docker CLI contexts known to the host running this MCP server'), making the tool's scope immediately clear. It also differentiates from siblings by naming context_inspect and context_use and summarizing their distinct purposes.

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 explicitly routes usage: 'Use context_inspect for one context's full config and context_use to switch.' It also gives important contextual guidance about how changing contexts affects only future subprocess-based tools, not the docker-py SDK client, which informs when this tool's output is relevant.

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