Skip to main content
Glama

Run Pipeline

run_pipeline
Destructive

Execute a validated, no-shell pipeline of security tools, piping each step’s stdout into the next step’s stdin for safe command composition.

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.

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": {
      "steps": "<steps>"
    },
    "name": "run_pipeline"
  }
}

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.4/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing per-step validation (allowlist, argument sanitization, policy checks) before any process starts. Critically, it warns that stdin-derived targets are not scope-checked, so pipelines can reach external targets that run_tool would reject. It also documents the 200KB per-step stdout/stderr cap and the resulting truncation flag and marker, which matter for interpreting results.

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 action and then structured into distinct paragraphs for purpose, security caveat, and truncation behavior. It is somewhat long, but the security-scope paragraph is high-value and earns its space. No filler sentences.

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 composition tool with destructive and open-world annotations, the description covers validation, the security boundary caveat, output sizing, truncation, and result flags. An output schema exists, so return-shape details are not required. Nothing an agent needs in order to invoke this safely appears to be 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 description coverage is 100%, so the schema already documents steps, host, and timeout. The description does not add syntax, format, or constraint details beyond the schema — it only implies the step chaining semantics. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Execute a pipeline of tools') and immediately defines the semantics ('piping stdout from each step into stdin of the next'). It also differentiates itself from the sibling run_tool by explaining pipelines vs. single calls under policy scope.

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?

Explains the intended use case clearly: replacing shell piping like `strings binary | grep flag` with a no-shell alternative. It also provides a concrete condition where this tool behaves differently from run_tool under CYBERSEC_MCP_ALLOW_EXTERNAL=0. It stops short of stating explicit exclusions (e.g., 'for a single command use run_tool'), so it is not a full when/when-not guide.

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