Skip to main content
Glama

Execute Command Async

execute_command_async

Runs SSH commands asynchronously and returns a command ID, so long-running tasks do not block the server; use companion tools to check status, retrieve output, or interrupt.

Instructions

Execute a command asynchronously without blocking the server.

Returns a command ID that can be used to check status, retrieve output, or interrupt. Useful for long-running commands like 'sleep 60', monitoring tasks, or large operations.

Use with companion tools:

  • get_command_status(command_id) to check progress and retrieve output

  • interrupt_command_by_id(command_id) to send Ctrl+C and stop execution

  • send_input(command_id, text) to provide input to interactive commands

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "host": "<host>",
      "command": "<command>"
    },
    "name": "execute_command_async"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYesHostname, IP address, or SSH config alias
portNoSSH port (optional)
commandYesCommand to execute
timeoutNoMaximum execution time in seconds (default: 300)
passwordNoSSH password (optional)
usernameNoSSH username (optional)
key_filenameNoPath to SSH key file (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2+p1

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden and does well on lifecycle: non-blocking execution, a returned command ID, and a full companion loop for status, output retrieval, interruption, and interactive input. It omits other decisive behaviors: what happens when the 300s timeout fires, whether output is retained after completion, and what SSH authentication is expected given password/key_filename parameters.

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?

Front-loads the core behavior in the first sentence, then the return value, then a scannable companion-tool list. The 'sleep 60' example earns its place as a concrete long-running case; wording is otherwise tight with little filler.

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 seven-parameter remote-execution tool with no output schema and no annotations, the definition covers purpose, return handle, and the full follow-up tool chain. The remaining gap is operational edge cases (timeout expiry, output retention, auth failure modes) that an agent would want before issuing remote commands.

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 all seven parameters including host, port, command, timeout, and the three auth options are already documented in structured form; the baseline of 3 applies. The description adds no parameter-level meaning beyond the schema, not even clarifying how timeout interacts with the async model.

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 and resource plus a distinguishing behavioral trait: 'Execute a command asynchronously without blocking the server.' An agent can tell it apart from a synchronous executor by the async framing, though it never names the sync sibling execute_command explicitly.

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?

Gives concrete use conditions ('long-running commands like sleep 60, monitoring tasks, or large operations') and names three companion tools with the exact follow-up purpose for each. It stops short of stating the inverse rule (when to prefer a blocking execute_command instead), so it is clear context without full exclusion guidance.

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