Skip to main content
Glama

batch

Apply resize, convert, compress, strip metadata, rotate/flip, or crop to many image files at once, preview changes with a dry run, and get per-file results.

Instructions

Apply one operation to many files and get a per-file result table.

operation: resize | convert | compress | strip_metadata | rotate_flip | crop. pattern: a file, or a glob such as 'D:/photos/.jpg' or 'D:/photos/**/.png'. params: that operation's own options, e.g. {'width': 1600}, {'format': 'webp'}, {'target_size': '300KB'}. dry_run defaults to TRUE: it lists what would be written (and what would fail, e.g. existing outputs) without touching anything; call again with dry_run=false to apply. Outputs land next to each input as name.resized.jpg, or in output_dir keeping the file names. Files that look like earlier outputs of the same operation are skipped. One bad file does not stop the run: failures are listed in the table (the call only errors if every file failed). Never overwrites unless overwrite=true.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "operation": "<operation>",
      "pattern": "<pattern>"
    },
    "name": "batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsNo
dry_runNo
patternYes
max_filesNo
operationYes
overwriteNo
output_dirNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations supplied the description carries the full load and does so well: non-destructive default, skip logic for files that look like earlier outputs of the same operation, partial-failure semantics ('one bad file does not stop the run'; the call only errors if every file failed), and the never-overwrite rule unless overwrite=true. These are exactly the traits an agent cannot get from the schema.

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?

Front-loaded purpose sentence followed by per-parameter lines, all of which earn their place. It is dense but scannable; the trailing 'Never overwrites unless overwrite=true' is the one line that reads slightly tacked on.

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?

For a 7-parameter, no-output-schema tool this covers the return shape (a per-file result table), output naming (name.resized.jpg, or output_dir keeping file names), and failure reporting. Only max_files is unaddressed, so the definition is nearly but not fully complete.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate, and it explains operation (with its six allowed values), pattern (with glob examples), params (with concrete examples per operation), dry_run, output_dir, and overwrite. The one real gap is max_files, which has a default of 500 and is never mentioned, leaving a silent truncation risk.

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?

Opens with a specific verb and resource: 'Apply one operation to many files and get a per-file result table.' The 'many files' framing plus the enumerated operations (resize | convert | compress | strip_metadata | rotate_flip | crop) distinguishes it from the single-file siblings like resize and convert.

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?

Implied routing is clear (bulk work belongs here rather than in the per-file siblings), and it spells out the two-phase workflow: dry_run defaults to TRUE and lists what would be written, then call again with dry_run=false to apply. It does not explicitly name a sibling alternative or state when not to use it, so it falls short of a 5.

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