Skip to main content
Glama

Apply a pipeline to many images

image_batch

Apply a sequence of image operations (resize, crop, watermark, etc.) to every image in a directory, glob, or file list. Each file is processed independently, with per-file failure reporting and support for name placeholders.

Instructions

Run the same operation list across every image in a directory, a glob, or an explicit list of paths. Each file is independent: a failure is reported per file and does not abort the run. Use a {name} placeholder in output_name for per-file suffixes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
globNoGlob pattern inside an input root, e.g. 'photos/**/*.jpg'.
limitNoMaximum files to process in this call.
pathsNoExplicit list of input paths.
qualityNoLossy quality for every output.
directoryNoDirectory (inside an input root) to process recursively.
operationsYesOrdered operations applied to every file.
output_formatNoOutput codec; defaults to each input's own format.
strip_metadataNoStrip metadata from every output.
return_first_imageNoEmbed only the first output inline, to bound payload size.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
filesNo
notesNo
failedYes
operationNoimage_batch
processedYes
succeededYes
totalInputBytesYes
totalOutputBytesYes
inlineImageIncludedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden. It usefully discloses that each file is processed independently and that a per-file failure does not abort the run. However, it leaves important side effects unstated, such as whether input files are modified, where output files are written, and how output filenames are derived.

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

Conciseness4/5

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

The description is compact: three sentences, with the core behavior and failure semantics front-loaded. The structure is efficient and readable, though the final sentence about output_name is misleading and therefore does not fully earn its place.

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

Completeness2/5

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

The output schema covers the return shape, so explaining return values is unnecessary. However, for a batch file-processing tool, output destination and naming are core operational unknowns, and the only naming hint references a nonexistent parameter. An agent cannot reliably predict whether images are overwritten or where new files will be placed.

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

Parameters2/5

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

Schema description coverage is 100%, so the baseline is 3 even with no extra parameter guidance. But the description's only additional parameter instruction—'Use a {name} placeholder in output_name'—references a parameter that does not exist in the input schema. This is actively misleading and lowers the score.

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 first sentence clearly names the verb ('Run'), the resource ('operation list'), and the batch scope ('every image in a directory, a glob, or an explicit list of paths'). It also distinguishes this tool from the single-image sibling tools by emphasizing many-image processing across directory/glob/path inputs.

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

Usage Guidelines4/5

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

The description gives clear context for when to use it: whenever the same pipeline must be applied to many images. The per-file failure isolation also tells agents that batch processing may continue despite individual errors. It does not explicitly name single-image alternatives or state when not to use this tool, so it stops short of full routing guidance.

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