Ragex. MCP. Handlers. ImageTools
(Ragex v0.28.0)
View Source
MCP tool definitions and handlers for image operations backed by the Image library.
Provides 10 tools:
image_info-- Extract metadata, dimensions, color space, EXIF, and format detailsimage_resize-- Resize image by scale factor, width, height, or thumbnail bounding boximage_crop-- Crop an image by bounding box or auto-trim whitespace/bordersimage_rotate-- Rotate by angle or flip image horizontally/verticallyimage_convert-- Convert image format (PNG, JPEG, WebP, AVIF, TIFF, GIF)image_apply_filter-- Apply visual filter (grayscale, blur, sharpen, brightness, contrast, invert, sepia, etc.)image_composite-- Overlay an image onto another at coordinates (x, y) with opacityimage_compare-- Compare two images for difference/similarity and generate visual diffimage_avatar-- Create a circular, squircle, or square avatar imageimage_draw_text-- Render text overlay onto an image at specified position
Summary
Functions
Dispatch an image tool call. Returns {:ok, result} or {:error, reason}.
Returns the list of image tool definitions for tools/list.