Skip to main content
Glama
utmstack

UTMStack MCP Server

by utmstack

run_agent_command

Execute shell commands on remote endpoints via UTMStack interactive console. Returns command output directly from the agent.

Instructions

Run a shell command on an agent via the interactive console and return its output.

DANGER: this executes the command for real on the live endpoint identified by hostname (same capability as the UTMStack web "interactive console"). Treat it like a remote shell — only run commands you are authorized to run there.

Mechanism: opens a STOMP-over-SockJS session at /ws (xhr-polling transport), SUBSCRIBEs to /user/topic/{hostname}, SENDs the command to /app/command/{hostname}, and returns the MESSAGE output. Requires a JWT (the target server's user+pass or static jwt) — the Utm-Api-Key alone is rejected by the console endpoint.

Args: hostname: target agent hostname (must support remote commands). command: the shell command line to execute. shell: "cmd" (Windows) or "bash" (Linux). Auto-detected from the agent OS when left blank. timeout_seconds: max time to wait for command output. server: which configured server to target (default active/default).

Returns a JSON blob with the command output (or an error/diagnostic).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shellNo
serverNo
commandYes
hostnameYes
timeout_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Without annotations, the description fully discloses behavior: it executes commands on a live endpoint, requires JWT (not just API key), uses STOMP/WebSocket mechanism, and returns JSON output. The danger warning and mechanism details provide high transparency beyond simple execution.

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 well-structured: purpose, danger, mechanism, args, return. The mechanism paragraph is somewhat technical (STOMP, SockJS) but useful for an agent. Could be slightly more concise, but the structure aids comprehension.

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?

Given the tool's complexity and danger, the description covers purpose, authorization requirements, execution mechanism, parameter details, and return format. The presence of an output schema (mentioned) reduces need to detail return value structure. Includes error/diagnostic mention. Very complete for a high-risk tool.

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 0%, so description must add meaning. It explains each parameter: hostname (target agent), command (shell line), shell (auto-detected when blank), timeout_seconds (max wait), server (which configured server). This clarifies defaults and behavior beyond the schema's bare 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 it runs a shell command on an agent via the interactive console and returns output, distinguishing it from siblings like `can_run_command` (capability check) and `list_agent_commands` (listing history). The verb 'Run' and resource 'shell command on an agent' are specific.

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?

The description provides strong context: 'DANGER: this executes the command for real' and 'Treat it like a remote shell — only run commands you are authorized to run there.' However, it does not explicitly mention alternatives or when not to use it, e.g., using `can_run_command` first. Nonetheless, the warning and authorization guidance are clear.

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/utmstack/MCP'

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