expect
Automate serial device login and multi-step command sequences by sending inputs and waiting for expected prompts in a single scripted call.
Instructions
Run a scripted sequence of send-and-wait steps in one call, like expect.
Use it for login flows and multi-step commands instead of one tool call per
line: [{send: "", expect: "login: "}, {send: "admin", expect: "Password:"},
{send: "", expect: "> "}, {send: "show version", expect: "> "}]. Each
step's output is returned. A step with no send just waits; one with no
expect just sends.
Args:
steps: The steps, in order.
auto_reply: Triggers answered automatically while waiting, e.g.
{"--More--": " "}.
stop_on_timeout: Stop at the first step whose expect isn't seen.
connection: Which open connection (name). Default: the current one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | Yes | ||
| auto_reply | No | ||
| connection | No | ||
| stop_on_timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |