pull_image
Pull Docker images from registries to your local machine for container deployment and management.
Instructions
Pull a Docker image from a registry
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Image name (e.g. "nginx:latest") |
Implementation Reference
- src/index.ts:353-371 (handler)The handler function that implements the logic for pulling a Docker image using the 'docker pull' command. It validates the image argument and returns the command output.private async pullImage(args: ImageArgs) { if (!args.image) { throw new McpError( ErrorCode.InvalidParams, 'Image parameter is required' ); } const { stdout } = await execAsync(`docker pull ${args.image}`); return { content: [ { type: 'text', text: stdout.trim(), }, ], }; }
- src/index.ts:169-182 (registration)The registration of the 'pull_image' tool in the list of tools provided to the MCP client, including its name, description, and input schema.{ name: 'pull_image', description: 'Pull a Docker image from a registry', inputSchema: { type: 'object', properties: { image: { type: 'string', description: 'Image name (e.g. "nginx:latest")', }, }, required: ['image'], }, },
- src/index.ts:36-38 (schema)TypeScript interface defining the input arguments for the pull_image tool.interface ImageArgs { image: string; }