Skip to main content
Glama
smk-h

embedded-mcp-toolkit

by smk-h

ssh_shell_exec

Execute a command on a remote SSH shell session and wait for its output, combining write, delay, and read into one call. Use it for sequential commands on embedded devices with timeouts.

Instructions

Send a command to an SSH shell session and wait for the output. Combines write + delay + read in one call. IMPORTANT: Do NOT issue concurrent commands to the same session_id — the SSH shell is a single channel; concurrent calls will interleave output and corrupt results. Always wait for the previous command to finish before sending the next one. If you need parallel execution, open multiple sessions via ssh_shell_open.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clearNoBuffer clear flag: 1 (default) = clear buffer before collecting, 0 = append to buffer
delayNoMinimum polling duration in milliseconds (default: 1000), kept for backward compat
commandYesThe command to send to the shell
session_idYesThe session ID returned by ssh_shell_open
maxDurationNoExecution cap in ms — ALWAYS estimate and pass a timeout matching the command's expected runtime; do not omit it. Suggested ranges: instant info commands (ls/ip addr/cat/echo) 3000-5000; medium tasks (apt install, dd, service restart) 30000-120000; long builds/flashes (make, flash_image) up to 600000; streaming/resident commands (ping/logcat/top, or sampling a fixed window of live output) 10000 (Ctrl+C auto-sent to stop). If omitted, safety-valve defaults apply: resident commands 10000ms (sampling, Ctrl+C sent on timeout), other commands 300000ms (5min fallback, NO interrupt sent — the command may still be running, terminate via send_ctrl if needed). Timeout type is annotated in the returned output.
Install Server

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations provided, the description carries the behavioral burden. It discloses the synchronous wait-for-output behavior and the single-channel concurrency hazard, which is valuable. However, it does not mention potential side effects of executing arbitrary commands, permission requirements, or what happens when a command times out or continues running in the background.

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?

The description is three sentences, front-loaded with the core action, and every sentence earns its place. The concurrency warning is essential and the alternative for parallel execution is compactly stated without 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 command-execution tool with 5 parameters and no output schema, the description covers the essential operational behavior, concurrency constraints, and a clear parallel alternative. The main gap is the lack of explicit return-value semantics, but the detailed parameter schema compensates for most technical details.

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 baseline is 3. The phrase 'Combines write + delay + read' adds slight framing for the delay/read components, but the description does not add per-parameter meaning beyond what the input schema already documents.

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?

The description uses a specific verb+resource construction ('Send a command to an SSH shell session and wait for the output') and explicitly frames the tool as combining write + delay + read. This clearly distinguishes it from lower-level siblings like ssh_shell_write and ssh_shell_read.

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?

It provides explicit when/how guidance: do not issue concurrent commands to the same session_id, always wait for previous command completion, and open multiple sessions via ssh_shell_open for parallel execution. This gives the agent actionable alternatives and timing constraints.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/smk-h/embedded-mcp-toolkit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server