Skip to main content
Glama

logout

Clears in-memory cached Docker registry credentials. Specify a registry key to remove a single entry, or leave empty to clear all.

Instructions

Clear cached registry credentials from this server's in-memory Docker client.

docker-py / the Engine have no true logout: login validates against the registry (the daemon's /auth is stateless) and caches credentials in-process. This drops that in-memory cache; it does NOT contact the daemon or touch the host's ~/.docker/config.json. With no registry, clears every cached credential; pass one to clear just that entry (key must match login; Docker Hub is cached under "docker.io"). close/reconnect also clear it by discarding the client.

Reaches into a private docker-py attribute (api._auth_configs); degrades to clearing nothing if that internal shape changes.

args: registry - Registry key to clear, or None to clear every cached credential host - host label whose client cache to clear (default: the default host) returns: dict - {"cleared": []}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
registryNo
Behavior5/5

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

The description is highly transparent, disclosing that the tool reaches into a private docker-py attribute, that it does not contact the daemon or modify host config files, and that it degrades gracefully to clearing nothing if the internal structure changes. This goes well beyond the annotations (readOnlyHint=false, destructiveHint=false) and provides critical 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is relatively long but each sentence adds important context (behavior, parameter details, return value, internal mechanism). It is well-structured with clear sections. Minor improvement could be condensing the implementation detail, but it remains informative 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 exceptionally complete: it covers purpose, behavior, parameter semantics, return value structure, edge cases (no registry, wrong key), and degradation. Given the lack of an output schema, providing the return dict format is especially valuable. No gaps are evident.

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?

Despite the input schema only providing a type and default for 'registry', the description fully explains its semantics: clearing every cached credential when omitted, clearing a specific entry when provided, and noting that Docker Hub is cached under 'docker.io'. This adds significant value beyond the schema, which had 0% coverage.

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 explicitly states the tool clears cached registry credentials from the in-memory Docker client. It distinguishes itself from sibling tools like login (which caches) and close/reconnect (which also clear cache but differently). The verb 'clear' and resource 'cached registry credentials' are specific and unambiguous.

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?

The description explains the context of Docker authentication (login caches, this clears) and mentions that close/reconnect also clear the cache. It implies when to use this tool (to clear credentials without closing the client) but does not explicitly state when not to use it or provide a direct comparison to all alternatives. The guidance is strong but not exhaustive.

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/GavinLucas/docker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server