Skip to main content
Glama

pull_image

Pull container images from registries to enable deployment of containerized applications using Podman. This tool retrieves specified images for container management operations.

Instructions

Pull a container image from a registry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesImage name with optional tag

Implementation Reference

  • The main handler function that implements the pull_image tool logic by executing 'podman pull' on the provided image and returning the result.
    async def pull_image(self, args: Dict[str, Any]) -> Dict[str, Any]:
        image = args.get("image")
        result = run_podman(["pull", image])
        return {"output": f"Pulled image: {image}" if result["success"] else f"Error: {result['stderr']}"}
  • The input schema definition for the pull_image tool, specifying the required 'image' parameter.
    Tool(
        name="pull_image",
        description="Pull a container image from a registry",
        inputSchema={
            "type": "object",
            "properties": {
                "image": {
                    "type": "string",
                    "description": "Image name with optional tag"
                }
            },
            "required": ["image"]
        }
    ),
  • main_b.py:459-472 (registration)
    The dictionary mapping tool names to their handler methods, registering 'pull_image' to self.pull_image.
    tool_handlers = {
        "list_containers": self.list_containers,
        "container_info": self.container_info,
        "start_container": self.start_container,
        "stop_container": self.stop_container,
        "restart_container": self.restart_container,
        "container_logs": self.container_logs,
        "run_container": self.run_container,
        "remove_container": self.remove_container,
        "exec_container": self.exec_container,
        "list_images": self.list_images,
        "pull_image": self.pull_image,
        "container_stats": self.container_stats,
    }
  • main.py:258-261 (handler)
    Alternative implementation using FastMCP decorator, combining handler logic and schema for pull_image tool.
    @mcp.tool(title="Pull image", description="Pull a container image from a registry.")
    def pull_image(image: str = Field(..., description="Image name with optional tag")) -> str:
        result = run_podman(["pull", image])
        return f"Pulled image: {image}" if result["success"] else f"Error: {result['stderr']}"

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/kunwarmahen/podman-mcp-server'

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