Skip to main content
Glama

container_restart

Restart a Docker container in one call: stop it, wait for a configurable timeout, then start it again. Returns the container's inspect payload.

Instructions

Restart a container: stop then start again in one call.

The container receives its configured stop signal (STOPSIGNAL, default SIGTERM), SIGKILL after stop_timeout_seconds, and is then started. Use container_stop/container_start to do the halves separately. When the server runs containerized it refuses to restart its own container.

args: id_or_name - The container id or name stop_timeout_seconds - Seconds between the stop signal and SIGKILL (default 10) returns: dict - The container's full inspect payload after the restart

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_or_nameYes
stop_timeout_secondsNo
Behavior5/5

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

Beyond the readOnly/destructive hints, the description discloses the STOPSIGNAL behavior, the SIGKILL timeout, the subsequent restart, and the refusal to restart the server's own container. It also states the return value (full inspect payload), adding substantial 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 well-structured: a one-sentence summary, a behavior paragraph, and an args/returns section. Every sentence provides essential information without redundancy, making it both concise and comprehensive.

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 tool has only two parameters and no output schema, and the description covers both parameters, explains the return type, and describes edge cases. It is complete for an agent to select and invoke the tool correctly.

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?

The schema has no descriptions (0% coverage), but the description lists both parameters with clear meanings: 'id_or_name - The container id or name' and 'stop_timeout_seconds - Seconds between the stop signal and SIGKILL (default 10)'. This fully compensates for the missing schema descriptions.

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 'Restart a container: stop then start again in one call,' clearly identifying the verb and resource while distinguishing from separate stop/start operations. It also mentions the self-restart refusal, further clarifying the tool's exact scope.

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?

It explicitly says 'Use container_stop/container_start to do the halves separately,' naming the alternative tools. It also includes a when-not scenario: the server refuses to restart its own container when containerized, providing clear usage boundaries.

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