Skip to main content
Glama

download_image

Download images from URLs and save them to specified file paths for use in ComfyUI workflows.

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
urlYes
save_pathYes

Implementation Reference

  • The handler function for the 'download_image' tool. It is registered via the @mcp.tool() decorator. Downloads an image from the provided URL and saves it to the specified path using urllib.request.urlretrieve, then returns a success indicator. The function signature and docstring define the input schema.
    @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}

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