Skip to main content
Glama

download_image

Download and save images from URLs directly to a specified absolute path, facilitating image management within the ComfyUI MCP Server.

Instructions

Download an image from a URL and save it to a file.

Args: url: The URL of the image to download. save_path: The absolute path to save the image to. Must be an absolute path, otherwise the image will be saved relative to the server location.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
save_pathYes
urlYes

Implementation Reference

  • The download_image tool handler, registered via @mcp.tool() decorator. Downloads the image from the given URL using urllib.request.urlretrieve and saves it to save_path, returning success status.
    @mcp.tool() async def download_image(url: str, save_path: str) -> Any: """Download an image from a URL and save it to a file. Args: url: The URL of the image to download. save_path: The absolute path to save the image to. Must be an absolute path, otherwise the image will be saved relative to the server location. """ urllib.request.urlretrieve(url, save_path) return {"success": True}

Other Tools

Related 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/Overseer66/comfyui-mcp-server'

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