Skip to main content
Glama

start_container

Start a stopped Docker container by providing its ID or name to resume application execution.

Instructions

Start a stopped Docker container.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesContainer ID or name

Implementation Reference

  • The handler function that implements the start_container tool logic. It gets a Docker container by ID and starts it using the Dockerode API.
    export async function startContainer(id: string): Promise<string> {
      const container = docker.getContainer(id);
      await container.start();
      return `Container ${id} started`;
    }
  • src/index.ts:70-78 (registration)
    Registration of the start_container tool with the MCP server. Defines the tool name, description, input schema, and handler function.
    server.tool(
      "start_container",
      "Start a stopped Docker container.",
      { id: z.string().describe("Container ID or name") },
      async ({ id }) => {
        const result = await startContainer(id);
        return { content: [{ type: "text", text: result }] };
      },
    );
  • Input schema definition for start_container tool using Zod. Validates that the 'id' parameter is a string representing the container ID or name.
    { id: z.string().describe("Container ID or name") },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action but lacks critical details: whether this requires specific permissions, if it's idempotent (starting an already running container), what happens on failure, or what the response looks like. For a mutation tool with zero annotation coverage, this is a significant gap.

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 a single, efficient sentence that immediately conveys the core purpose without any wasted words. It's appropriately sized for a simple tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't address behavioral aspects like error conditions, permissions needed, or what constitutes success/failure. Given the complexity of container management and lack of structured data, more context would be helpful.

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

Parameters3/5

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

Schema description coverage is 100%, with the single parameter 'id' documented as 'Container ID or name'. The description doesn't add any parameter-specific information beyond what the schema provides, but since the schema fully covers the parameter, the baseline score of 3 is appropriate.

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 clearly states the specific action ('Start') and resource ('a stopped Docker container'), distinguishing it from siblings like 'restart_container' (which implies a running container) and 'stop_container' (the opposite action). The verb+resource combination is precise 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 implies usage context by specifying 'a stopped Docker container', which helps differentiate from 'restart_container' (for running containers). However, it doesn't explicitly state when NOT to use this tool or name alternatives, leaving some ambiguity about edge cases like containers in other states (e.g., paused).

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

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