Skip to main content
Glama

ssh_run_interactive

Run commands on a remote host that require interactive prompt responses, such as sudo passwords, by supplying expect/answer pairs and a required timeout.

Instructions

Run a command on a remote host that needs to consume expect/answer prompts (e.g. sudo). Each entry in 'expects' is an object with 'expect' (the prompt text to wait for) and 'answer' (the response to send back). Call host_list first — it returns the uid of every host, and that value is what host_id expects. The model must use host_id only; credentials are resolved server-side. The model MUST supply timeout_seconds (1-600) appropriate for the command.

Input Schema

NameRequiredDescriptionDefault
commandYesCommand to execute on the remote host.
expectsNoList of {expect, answer} pairs in order.
host_idYesIdentifier of an existing host: the exact `uid` value returned by `host_list`. Call `host_list` first and pass that value unchanged.
timeout_secondsYesHard timeout in seconds. REQUIRED. The model must estimate an appropriate timeout based on the command's complexity (1-600 seconds). The command is terminated when the timeout expires.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 full behavioral burden. It usefully discloses that credentials are resolved server-side and that timeout_seconds causes command termination, but it does not describe failure behavior, output format, side effects, or the destructive potential of running arbitrary remote commands.

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 front-loaded with purpose and then covers the expects mechanism, required host lookup, credential handling, and timeout requirement in four compact sentences. There is little wasted text for a tool with this many calling constraints.

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 no output schema and no annotations, the description gives enough information to call it correctly: host_id provenance, expect/answer structure, credential handling, and timeout. It could still say more about return values or error behavior, but the essential invocation context is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaningful context: host_id must be the exact uid returned by host_list, expects entries are ordered expect/answer pairs, and timeout_seconds should be estimated for the command. These additions go beyond restating the schema.

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 states a specific verb and resource: running a command on a remote host, scoped to interactive commands that consume expect/answer prompts. The phrase 'needs to consume expect/answer prompts (e.g. sudo)' makes the tool's niche clear enough to distinguish it from a plain non-interactive command runner such as ssh_run_command.

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

Usage Guidelines4/5

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

It gives clear operational guidance: call host_list first, use host_id only, and always supply timeout_seconds within 1-600. It does not explicitly say when to prefer this over ssh_run_command or ssh_run_playbook, but the interactive-prompt condition strongly implies the selection boundary.

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