Skip to main content
Glama

pipe

Streams output from a remote command or a local file directly into another host command's standard input over SSH, keeping data in memory without writing to disk.

Instructions

把来源的数据直接接到主机上命令的标准输入,效果同 ssh A '<cmd>' | ssh B '<cmd>',数据只经过本机内存、不落盘。如 from {"host":"a","cmd":"tar -C /etc -cf - nginx"}、to {"host":"b","cmd":"mkdir -p /backup/etc && tar -C /backup/etc -xf -"}。两端各自可带 sudo、pswd、conn,用法同 exec。返回两端的退出码、传输的字节数和 sha256。

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": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "pipe"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes去处:{host, cmd},数据作为这条命令的标准输入
fromYes来源:{host, cmd} 取这条命令的标准输出;或 {file} 读本机文件
redactNo
timeoutNo秒,默认 60,最多 3600
max_charsNo每路输出的字符上限,默认 4000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that data passes only through local RAM and never lands on disk, and that the result includes both exit codes, byte count, and sha256. It does not cover failure/partial-transfer behavior or auth preconditions beyond the 'same as exec' pointer.

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 effect and equivalence before the example, with no filler sentences. The single dense paragraph could be split for readability, but every sentence contributes concrete information.

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?

For a 5-parameter, nested-object streaming tool with no output schema, the description supplies purpose, a worked example, parameter inheritance from exec, and return values. Missing only edge-case behavior and explicit timeout/limits, which the schema partially covers.

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 80%, so the schema already documents most parameters including the from/to shapes and timeout/max_chars. The description adds the {file} vs {host,cmd} distinction for `from` and reiterates that sudo/pswd/conn work like exec, but adds little beyond what the schema already conveys.

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 action (piping source data into a host command's stdin) and anchors it with a concrete equivalence: `ssh A '<cmd>' | ssh B '<cmd>'`. The example with `from`/`to` objects makes it immediately distinguishable from exec and file_write.

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 streaming use case (source output straight into destination stdin, never touching disk) and defers parameter behavior to exec ("usage same as exec"), which gives a real context for when this tool applies. It does not explicitly state when to prefer exec or file_write instead, so an exclusion is missing.

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

Deploy Server

Other Tools