Skip to main content
Glama

Run pipeline

run_pipeline
Read-onlyIdempotent

Chain multiple string or data transformations in one call, feeding each step’s output into the next; supports branches, macros, and per-item mapping, and returns outputs, errors, and timings.

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

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

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.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds substantive behavior beyond them: sanitization drops malformed steps, refusal conditions (over 100 steps, unknown utility ids, custom_js), the 1,000,000-byte input cap, 20s timeout, and output truncation with `truncated`/`fullLength` flags. It stops short of describing merge or branch semantics in detail, but the added context is well above the annotation bar.

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-loads the core behavior and follows with alternatives, return shape, and limits in a logical order; every sentence carries information. The middle parenthetical about branch/macro/each is densely packed and overlaps the `steps` schema description, slightly reducing efficiency.

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 orchestration tool it covers invocation rules, step-schema vocabulary, return-value structure (errors/timings/skipped/halted), limits, and refusal conditions. Even though an output schema exists, the explicit return-field description is a helpful supplement rather than redundant.

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 baseline is 3, but the description adds a constraint the schema cannot express: 'Provide exactly one of `steps` or `share`' (surface is not modeled as oneOf in the schema). It also clarifies identity-pipeline usage via `[]` and gives a high-level vocabulary for branch/macro/each types that complements the schema's nested description.

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+resource+scope: 'Run several transformations on `input` in one call' and immediately characterizes the ordered step chaining. It explicitly names run_utility as the sibling for single transformations, so an agent can discriminate without reading schemas.

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?

Gives explicit routing rules: 'Prefer this to chaining run_utility calls; for a single transformation, run_utility is simpler.' It also states the mutually exclusive choice between `steps` and `share` and notes when to omit steps, leaving little to inference.

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