Skip to main content
Glama

Fetch Images

fetch-images
Read-only

Fetch images from URLs or local file paths, optionally compress and resize, and return as resource links, image content, or structured JSON.

Instructions

Fetch and process images from URLs or local file paths. Returns MCP CallToolResult with content[] (ResourceLink or ImageContent based on tool_result param) and structuredContent (OpenAI ImagesResponse format with data[].url, data[].path, or data[].b64_json based on response_format param).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourcesNoArray of image sources: HTTP(S) URLs or file paths (absolute or relative to the first MEDIA_GEN_DIRS entry). Max 20 images. Mutually exclusive with 'n'.
idsNoArray of image IDs to fetch by filename match (looks for filenames containing _{id}_ or _{id}. under the primary MEDIA_GEN_DIRS[0] directory). Mutually exclusive with 'sources' and 'n'.
nNoWhen set, returns the last N image files from the primary MEDIA_GEN_DIRS[0] directory (most recently modified first). Mutually exclusive with 'sources'.
compressionNoCompression options. If omitted, no compression is applied.
tool_resultNoControls content[] shape: 'resource_link' (default) emits ResourceLink items, 'image' emits base64 ImageContent blocks.resource_link
response_formatNoControls structuredContent shape: 'url' (default) emits data[].url, 'path' emits data[].path, 'b64_json' emits data[].b64_json.url
fileNoBase path for output files, absolute or relative to the first MEDIA_GEN_DIRS entry. If multiple images, index suffix is added.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate read-only and non-destructive behavior. The description adds value by detailing processing and output format options, enhancing transparency beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose, and no wasted words. Efficiently conveys the core functionality and output structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the rich schema and annotations, the description is adequate. It covers the return type and high-level behavior, though some processing details are only in the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with detailed descriptions for each parameter. The tool description does not add significant meaning beyond the schema, meeting the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it fetches and processes images from URLs or file paths, distinguishing it from sibling tools like fetch-document and fetch-videos. It specifies the output format in detail.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for fetching images but does not provide explicit guidance on when to use this tool versus alternatives like fetch-document or image generation tools. No 'when-not' or context provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/strato-space/media-gen-mcp'

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