Skip to main content
Glama
smk-h

embedded-mcp-toolkit

by smk-h

serial_exec

Send a command to a serial shell session and retrieve the output in a single call, combining write, delay, and read operations for reliable interaction.

Instructions

Send a command to a serial 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 serial console 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 serial_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 serial_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.3/5.0
Behavior4/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 discloses concurrency hazards, buffer clearing via the 'clear' flag, timeout defaults, and that timeout type is annotated in output. However, it does not describe failure modes or output structure, which is a minor gap.

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 purpose, then adds a critical warning and a suggested alternative. It is somewhat lengthy but every sentence provides necessary operational detail, so it earns its place.

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?

Given the tool's complexity (5 parameters, concurrency concerns, timeout behavior) and the lack of an output schema, the description covers essential usage, warnings, and alternatives. It stops short of specifying return data structure, but overall it is sufficiently complete for an agent to use effectively.

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?

The schema covers 100% of parameters with detailed descriptions, including maxDuration defaults and guidance, clear flag semantics, and delay purpose. The description adds the 'combines write+delay+read' context but does not materially extend parameter understanding beyond what the schema already provides, so the baseline of 3 applies.

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 clearly states it sends a command to a serial shell session and waits for output, combining write, delay, and read. It explicitly differentiates itself from sibling tools like serial_write, serial_read, and serial_send_ctrl by describing its composite nature.

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?

Provides explicit usage guidance: warns against concurrent calls on the same session, instructs to wait for previous commands, and recommends opening multiple sessions via serial_open for parallel execution. This gives clear when-to-use and when-not-to-use context.

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