Skip to main content
Glama

Run a batch

pdf_run_batch
Idempotent

Apply the same 1-10 PDF steps to 1-50 files at once, save each output to a target folder, and report any skipped failures.

Instructions

Apply the same 1–10 pipeline steps to each of 1–50 PDFs, one file at a time. Each result is written to output_folder as -.pdf. A file that fails is skipped and listed in failed with the reason; the rest continue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepsYesSteps run in order, such as [{"action":"rotate","options":{"pages":"1","angle":90}}].
inputsYesPDF paths to process.
suffixNoAdded to each output file name.processed
output_folderYesFolder for the new files, inside an allowed folder; created if missing.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
failedYes
outputsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false. The description adds genuine value beyond them: sequential one-at-a-time processing, per-file failure isolation ('skipped and listed in failed... the rest continue'), and output naming convention. It doesn't cover permissions or output containment details, but the failure semantics are the important disclosure.

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?

Three tight sentences, front-loaded with the core operation and bounds, followed by output location and failure behavior. Every sentence earns its place with no redundancy.

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

Completeness5/5

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

An output schema exists, so return details need not be explained, yet the description still highlights the failure/continuation semantics an agent needs. For a batch tool with fully covered parameters and annotations, nothing essential is missing.

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%, so all four parameters (inputs, steps, suffix, output_folder) are documented in the schema and nested step options are well described. The description adds only marginal meaning (that steps apply uniformly to every input, and output naming), which matches the baseline 3 when the schema carries the load.

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?

States a specific verb+resource ('Apply the same 1–10 pipeline steps to each of 1–50 PDFs') with explicit cardinality bounds. The batch scope implicitly but clearly distinguishes it from the sibling pdf_run_pipeline, which handles a single file.

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 1–50 file bound and 'one file at a time' framing make the intended use case clear: multiple files sharing one pipeline. It doesn't explicitly name pdf_run_pipeline as the single-file alternative or state exclusions, so guidance is contextual rather than spelled out.

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