Skip to main content
Glama

Run pipeline

run_pipeline
Read-only

Run multiple string transformations in a single call, where each step's output feeds the next. Supports branches, macros, and per-item processing.

Instructions

Run several transformations on input in one call: an ordered list of steps (string-utility-belt v3 schema), each step's output feeding the next. Besides utility steps, a pipeline can hold branches (parallel forks merged back together), macros (named sub-pipelines) and "run on each" steps (a sub-pipeline run on every line, delimited piece, JSON array element or JSON object value). Prefer this to chaining run_utility calls; for a single transformation, run_utility is simpler. Returns {output, outputEncoding?, errors, timings, skipped, halted}: errors maps step id to its error message, timings maps step id to milliseconds. Provide exactly one of steps or share (a #/p/<payload> share link, a full URL containing one, or the bare payload). Untrusted step data is sanitized first, so malformed entries are dropped rather than rejected. Refused outright: pipelines with more than 100 steps (nested steps counted), unknown utility ids, enabled steps with invalid params, and any step that would run arbitrary user JavaScript (e.g. "custom_js") — LLM-driven code execution is out of scope. Input is capped at 1,000,000 bytes, output text past 1,000,000 characters is cut off (flagged truncated, with fullLength), and the call is stopped after 20s.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesThe pipeline's source input.
shareNoA share link (or its bare payload) for a previously built pipeline; used instead of `steps`.
stepsNoPipeline steps (v3 schema). Each entry is either a utility step {id, utilityId, params?, enabled?, condition?, onError?}, a fork {type:"branch", id, branches:[[...steps], [...steps]], merge:{mode:"concat"|"zip"|"json"|"pick", ...}}, a sub-pipeline {type:"macro", id, name, steps:[...steps]}, or a map {type:"each", id, split:{mode:"lines"|"json-array"|"json-values"} or {mode:"delimiter", separator}, steps:[...steps], skipEmpty?} that runs `steps` on every item and puts the results back in place (on an each step, `onError` also decides what a failed item becomes). `condition` gates a step on its input ({kind:"always"|"nonEmpty"|"regex"|"type", ...}); `onError` is "passthrough" (default: record the error, pass the input on), "stop" or "empty". Use [] for the identity pipeline; omit when using `share`.
inputEncodingNoHow to decode `input`. Default "text".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorsYesStep id -> error message, for steps that failed.
haltedYesTrue when a step with onError "stop" failed and ended the pipeline.
outputYesThe result: text as-is, JSON pretty-printed, bytes as base64.
skippedYesStep id -> why it did not run (disabled, condition, halted, aborted).
timingsYesStep id -> milliseconds it took.
truncatedNoTrue when `output` was cut off at the output limit.
fullLengthNoLength `output` would have had untruncated, when `truncated`.
outputEncodingNoPresent when `output` is base64-encoded bytes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover readOnlyHint=true and openWorldHint=false; the description goes far beyond by disclosing sanitization of untrusted step data, outright refusal conditions (100-step cap, unknown utility ids, invalid params, JS execution), an explicit 1,000,000-byte input cap, 1,000,000-char output truncation with `truncated`/`fullLength`, and a 20s timeout. This is unusually complete behavioral disclosure for a computation tool.

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?

Long but information-dense and front-loaded: composition model first, then routing, then constraints. Nearly every sentence carries distinct constraints or semantics, though the single-paragraph density slightly strains readability.

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?

For a complex multi-step computation tool with a rich nested-step schema, the description covers composition forms, refusal conditions, limits, and return shape. With an output schema present, it need not explain returns further, and nothing needed to call it correctly is missing.

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 100%, so the baseline is 3, but the description adds real meaning: the exactly-one-of constraint between `steps` and `share`, that `share` may be a link, a URL containing one, or the bare payload, and the error/timing map semantics of `errors` and `timings`.

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 and resource (run several transformations on `input` in one call), explains the ordered-step composition model, and explicitly distinguishes itself from the run_utility sibling. An agent can tell it apart from list_utilities/describe_utility/run_utility without opening any schema.

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

Usage Guidelines5/5

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

Explicitly states the selection rule: prefer this to chaining run_utility calls, but for a single transformation run_utility is simpler. It also states when to use `share` vs `steps`, giving both the positive and negative routing conditions.

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