Skip to main content
Glama
atengk
by atengk

ssh_session_send

Write commands or control signals to a persistent PTY terminal session and collect the incremental screen output.

Instructions

向指定的持久 PTY 终端写入指令或控制信号(如 '\x03' 发送 Ctrl+C),并收集增量屏幕回显

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes待发送的数据内容或控制字符(如 '\x03' 发送 Ctrl+C)
sessionIdYes目标持久 PTY 终端会话 ID
waitForMsNo等待收集终端响应输出的时间(毫秒),默认 1000ms

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.5

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does add real behavioral value by disclosing that the call collects incremental screen echo and by showing that raw control bytes are accepted, but it is silent on error handling, whether a trailing newline is needed, what happens to a closed/expired session, and other side effects of writing to a live PTY.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the action first and the control-signal example parenthetically attached. No padding or redundancy.

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 three-parameter interactive I/O tool with no output schema, the description adequately covers what is written and that incremental screen output is returned, and the schema fills in the rest. Only the absence of session-lifecycle/error expectations keeps it from being fully complete.

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%, covering input, sessionId, and waitForMs, so the schema already documents all three parameters. The description only restates the control-character example already present in the input schema, adding no new semantics such as expected byte encoding or how waitForMs truncates output.

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?

States a specific verb (写入/write input or control signals) against a specific resource (指定的持久 PTY 终端/persistent PTY session), and the Ctrl+C example makes the intent concrete. It implicitly separates itself from one-shot ssh_exec by insisting on a persistent PTY, but never names a sibling explicitly.

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 mention of a 'persistent PTY session' implies this is for interactive sessions started via ssh_session_start, but the description never states when to choose this over ssh_exec or how it relates to ssh_session_close. Usage is inferable rather than stated.

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