Skip to main content
Glama

pipe

Stream data from a remote command or local file directly into another remote command's stdin without writing to disk, returning exit codes, transferred bytes, and SHA-256 hashes.

Instructions

把来源的数据直接接到主机上命令的标准输入,效果同 ssh A '<cmd>' | ssh B '<cmd>',数据只经过本机内存、不落盘。如 from {"host":"a","cmd":"tar -C /etc -cf - nginx"}、to {"host":"b","cmd":"tar -C /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

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose key behavior: data stays in local memory and never touches disk, each side can carry its own sudo/pswd/conn credentials, and the call returns exit codes, byte count, and sha256. It does not say what happens if one side fails mid-stream, whether the `to` command can be destructive, or how `redact` and `timeout` affect behavior.

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?

The description is front-loaded with the core behavior and the shell equivalence, then moves to a compact concrete example, then to return values. Density is high and there is little waste, though the example is somewhat verbose relative to the rest.

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 tool with nested objects and no output schema, the description adequately covers purpose, credential handling, and return values. Gaps remain around the `{file}` source variant, `redact`, and failure/partial-stream semantics, which matter for a streaming relay.

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 80% and `timeout`/`max_chars` already have descriptions, so the schema does most of the work. The description adds meaning through the tar example clarifying how `cmd` is used on each end and by stating the sudo/pswd/conn parity with `exec`, but it leaves `redact` (undocumented anywhere) and the `{file}` source unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a concrete verb and resource, and the shell equivalence `ssh A '<cmd>' | ssh B '<cmd>' makes the tool's action unmistakable. It implicitly relates to the sibling `exec` ("用法同 exec"), but it never explicitly explains why an agent would use pipe instead of `exec`.

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

Usage Guidelines3/5

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

The streaming tar example shows a canonical usage scenario and explains the shape of `from` and `to`, so usage is implied rather than stated. It gives no explicit when-to-use or when-not-to-use criteria against `exec` or `file_write`, and it does not mention the `{file}` source alternative.

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