Skip to main content
Glama
ConnorBoetig-dev

Unrestricted Development MCP Server

docker_pull

Pull Docker images from registries to your development environment. Download specific images or all tagged versions for container deployment.

Instructions

Pull an image or repository from a registry

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesImage name and tag (e.g., "nginx:latest")
allTagsNoDownload all tagged images
cwdNoWorking directory

Implementation Reference

  • The main handler function that executes the 'docker pull' command by constructing the docker pull CLI command and calling the shared executeDockerCommand helper.
    export async function dockerPull(args: z.infer<typeof dockerPullSchema>): Promise<ToolResponse> {
      const allTagsFlag = args.allTags ? '-a' : '';
      return executeDockerCommand(`docker pull ${allTagsFlag} ${args.image}`.trim(), args.cwd);
    }
  • Zod schema defining the input validation for the docker_pull tool, used in the dispatch handler.
    export const dockerPullSchema = z.object({
      image: z.string().describe('Image name and tag (e.g., "nginx:latest")'),
      allTags: z.boolean().optional().default(false).describe('Download all tagged images'),
      cwd: z.string().optional().describe('Working directory')
    });
  • src/index.ts:479-482 (registration)
    Dispatch/registration logic in the main MCP server handler that matches tool name 'docker_pull', validates args with schema, and invokes the handler function.
    if (name === 'docker_pull') {
      const validated = dockerPullSchema.parse(args);
      return await dockerPull(validated);
    }
  • Tool metadata registration in the dockerTools array, including JSON schema for MCP tool listing, exported and used in index.ts listTools handler.
    {
      name: 'docker_pull',
      description: 'Pull an image or repository from a registry',
      inputSchema: {
        type: 'object',
        properties: {
          image: { type: 'string', description: 'Image name and tag (e.g., "nginx:latest")' },
          allTags: { type: 'boolean', default: false, description: 'Download all tagged images' },
          cwd: { type: 'string', description: 'Working directory' }
        },
        required: ['image']
      }
    },
  • Shared helper function that executes docker CLI commands via child_process.exec, handles output/error formatting in MCP ToolResponse format, used by dockerPull.
    async function executeDockerCommand(command: string, cwd?: string): Promise<ToolResponse> {
      try {
        const { stdout, stderr } = await execAsync(command, {
          cwd: cwd || process.cwd(),
          shell: '/bin/bash',
          maxBuffer: 10 * 1024 * 1024, // 10MB buffer for logs
          timeout: 60000 // 60 second timeout for builds
        });
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                success: true,
                command: command,
                stdout: stdout.trim(),
                stderr: stderr.trim(),
                cwd: cwd || process.cwd()
              }, null, 2)
            }
          ]
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                success: false,
                command: command,
                stdout: error.stdout?.trim() || '',
                stderr: error.stderr?.trim() || error.message,
                exitCode: error.code || 1,
                cwd: cwd || process.cwd()
              }, null, 2)
            }
          ],
          isError: true
        };
      }
    }
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 doesn't describe what happens: whether this downloads to local Docker cache, requires network connectivity, has authentication requirements, shows progress output, or handles errors. For a network-dependent operation with potential auth needs, this is insufficient 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 a single, efficient sentence that states the core action without unnecessary words. It's front-loaded with the essential information (pull from registry) and contains no redundant phrases. Every word earns its place in this minimal but complete statement of purpose.

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 tool with no annotations, no output schema, and 3 parameters (one optional with default), the description is inadequate. It doesn't cover behavioral aspects (network dependency, auth, caching), doesn't explain the relationship between parameters, and provides no information about return values or error conditions. The agent would need to guess about many operational details.

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%, so the schema already documents all three parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema. It doesn't explain parameter interactions (e.g., how 'allTags' modifies 'image' behavior) or provide examples beyond the schema's example. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('pull') and resource ('image or repository from a registry'), making the purpose immediately understandable. It distinguishes from siblings like docker_build or docker_images by specifying the download-from-registry action. However, it doesn't explicitly contrast with git_pull (a different domain) or mention that this is specifically for Docker images.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing Docker installed, registry authentication), when to use docker_pull versus docker_build (build locally vs. pull from registry), or when to use the allTags parameter versus pulling specific tags. The agent must infer usage from the tool name alone.

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/ConnorBoetig-dev/mcp2'

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