Skip to main content
Glama

remote_exec

Runs shell commands on a remote server through an existing SSH connection, letting you chain multiple commands in one call to avoid new session overhead.

Instructions

在远端服务器执行命令。默认工作目录是 SSH_REMOTE_BASE 指定的目录。把多条命令用 && 串成一次调用更省时间——成本在调用次数,不在命令条数。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo工作目录,默认 SSH_REMOTE_BASE 指定的目录;可用绝对路径或相对路径
commandYes要执行的 shell 命令
timeoutNo超时毫秒数,默认 120000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden for an arbitrary shell execution tool. It discloses the default working directory and the cost model, but says nothing about safety/destructive potential, permission requirements, error behavior, or what happens on timeout — significant gaps for a tool that runs arbitrary commands.

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?

Three short sentences, front-loaded with the purpose, and the batching hint earns its place as non-obvious cost guidance. No filler.

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

Completeness3/5

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

For a high-risk arbitrary-command tool with no annotations and no output schema, the description leaves key operational details unstated: return format, how failures/timeouts are surfaced, and how it relates to remote_exec_bg. Adequate but with clear gaps.

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 the schema already documents the default cwd, timeout value, and command argument. The description only restates the default cwd, adding no format, syntax, or interaction detail beyond the schema, so the baseline 3 applies.

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: executing commands on a remote server. The scope is clear, but it never distinguishes itself from the obvious sibling remote_exec_bg beyond the implicit assumption that this one is synchronous.

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

Usage Guidelines3/5

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

Offers a cost heuristic (batch commands with && because cost is per call, not per command), which is genuinely useful invocation guidance. However it never states when to prefer remote_exec_bg for long-running or detached work, nor any when-not conditions.

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