Skip to main content
Glama

execute_command_async

Run SSH commands asynchronously, returning a command ID for status checks, output retrieval, or interruption. Handles long-running tasks without blocking.

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

Args: host: Hostname, IP address, or SSH config alias command: Command to execute username: SSH username (optional) password: SSH password (optional) key_filename: Path to SSH key file (optional) port: SSH port (optional) timeout: Maximum execution time in seconds (default: 300)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
portNo
commandYes
timeoutNo
passwordNo
usernameNo
key_filenameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It discloses the non-blocking behavior, return of a command ID, and the timeout parameter. However, it does not mention potential side effects, session requirements, or failure modes. Still, for an async execution tool, the core behaviors are well covered; the only minor gap is a lack of detail on output retrieval specifics.

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 well-structured with a clear opening statement, a short list of companion tools, and an Args section. It is front-loaded with the most important information (async behavior and command ID). Every sentence contributes value, and the length is appropriate for the complexity of the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 7 parameters, no annotations, and an output schema (which handles return value structure), the description is exceptionally complete. It covers the async nature, the command ID as the return mechanism, and all parameters. The companion tool references also round out the operational context, making the tool fully understandable.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. The description includes an explicit Args section that describes every parameter (host, command, username, password, key_filename, port, timeout) in plain language. This fully bridges the gap left by the schema, providing meaning beyond the raw property names.

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 the tool's function: 'Execute a command asynchronously without blocking the server.' It specifies the key output (a command ID) and differentiates itself from synchronous execution by highlighting the async behavior. This distinguishes it from the sibling 'execute_command' tool.

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?

The description provides explicit usage context: 'Useful for long-running commands like sleep 60, monitoring tasks, or large operations.' It also lists companion tools (get_command_status, interrupt_command_by_id, send_input) with their purposes, giving clear guidance on when to use this tool versus alternatives.

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

Install Server

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/DBeidachazi/mcp-ssh'

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