read_image
Read an image file for the model to view, returning base64 data and metadata. Detects format by magic bytes, supports common types, and rejects non-images or oversized files.
Instructions
Read an image file so the model can see it.
Returns an MCP image block (base64 data + mime type) plus a small JSON
metadata sidecar (size, mime). Use this only when the model needs to
view the image; for text or any other file type use read.
The format is detected from the file's magic bytes, not its extension, so
a mis-named image still works and a non-image (e.g. text saved as .png)
is rejected. Supports PNG, JPEG, GIF, TIFF, BMP, and WebP. Images are
never cached — every call re-reads from disk. Oversized images are
rejected before encoding; the cap is SCMCP_MAX_IMAGE_BYTES (default
5 MiB), bounded by Anthropic's ~5 MB upload limit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Image file path (absolute, or relative to the project root). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mime | No | ||
| path | No | ||
| size | No | ||
| truncated | No |