Skip to main content
Glama

run_pipeline

Destructive

Executes a validated pipeline of security tools, piping each step's stdout into the next step's stdin to replace shell piping with a safe, no-shell alternative.

Instructions

Execute a pipeline of tools, piping stdout from each step into stdin of the next.

Replaces shell piping (e.g. strings binary | grep flag) with a safe, no-shell alternative. Each step is validated individually (allowlist, argument sanitization, policy checks) before any process starts.

Policy checks inspect each step's arguments only. A step that takes its target from stdin (what the previous step printed) is not scope-checked on that piped data, so a pipeline can reach an external target that a single run_tool call would reject under CYBERSEC_MCP_ALLOW_EXTERNAL=0. Treat pipelines as command composition, not as a network-scope boundary.

Each step's stdout and stderr are bounded to 200KB as they are read, and an intermediate step's bounded stdout is what gets piped into the next step. If any step hits that cap, the returned truncated flag is set and the final stdout carries a truncation marker.

Input Schema

NameRequiredDescriptionDefault
hostNoReserved for future use. Currently only local execution is supported.
stepsYesList of dicts, each with 'tool' (required) and 'args' (optional) keys. Max 10 steps per pipeline.
timeoutNoGlobal timeout for entire pipeline in seconds (default 120, max 300).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructive/openWorld/non-idempotent, but the description adds substantial non-obvious behavior: per-step allowlist and argument sanitization before any process starts, the stdin scope-check blind spot under CYBERSEC_MCP_ALLOW_EXTERNAL=0, and 200KB per-step stdout/stderr bounding with a truncated flag and marker. The scope-bypass disclosure is exactly the kind of safety-critical trait annotations cannot express.

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 with the core verb and the piped-stdout mechanic, then layered warnings. The security-boundary paragraph is long but earns its place given the destructive annotation; a slightly tighter phrasing would reach 5.

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?

Return values are covered by the output schema, and limits (10 steps, 120s/300s timeout), truncation, and validation are all present. The notable gap is failure semantics: whether a mid-pipeline step error aborts the run or is passed through is not stated.

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; the description adds real meaning by explaining that 'steps' composes tool stdout into the next step's stdin and that bounded intermediate output is what gets piped. It does not elaborate on 'host' or failure/timeout interaction across steps, so it stays just above baseline.

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: 'Execute a pipeline of tools, piping stdout from each step into stdin of the next.' This clearly distinguishes it from run_tool (single invocation) and run_script (script execution), so an agent can route correctly without opening the 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 names the alternative it replaces ('shell piping e.g. strings binary | grep flag') and contrasts with 'a single run_tool call.' It also gives a clear when-not/caveat: pipelines are command composition, not a network-scope boundary, so scope checks do not apply to piped data.

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