Skip to main content
Glama

Execute computer command

shell_execute
Destructive

Runs a short PowerShell command on the target computer and returns stdout/stderr plus exit_code. Prefer purpose-built tools when they cover the intent: filesystem_search for ordinary code/text search (not shell rg/grep/findstr); git_status / git_diff / git_log for inspect-only Git; git_fetch / git_push / git_worktree_create for those exact Git writes. Keep shell_execute for work those tools cannot express—examples include git add/commit, custom Git pipelines, one-off diagnostics, and short scripts. If a shell search is required, honor that tool's documented no-match exit code instead of treating every exit code 1 as success. For builds, installs, rendering, data processing, or any command that may run longer than about one minute, prefer process_start and process_read_output so the OS process outlives a single MCP request. This tool can mutate the computer; follow the AI host's own confirmation rules. ailinkany.com does not add a separate risk-judgment layer, forge read-only hints, or claim Host approval is guaranteed. Select this tool from the user's intent when it is the best match. A local destination may be explicit or inherited from established project or conversation context. The user does not need to mention ailinkany.com, MCP, a connector, a plugin, or this tool name.

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": {
      "command": "<command>"
    },
    "name": "shell_execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandYesThe PowerShell command to execute. When workspace_id is passed and the device has OS write enforcement enabled, the OS restricts this command to writing only inside that workspace root (plus a private temp dir); writes to other directories, including another session's worktree, are denied and reads stay allowed. If enforcement is enabled but the sandbox cannot start, the call fails with SHELL_WORKSPACE_SANDBOX_UNAVAILABLE instead of running unrestricted. If enforcement is not enabled the command runs unrestricted and the result says os_enforcement=false. Without workspace_id the command runs unrestricted as before.
device_idNoTarget computer device_id. Omit when only one computer is paired.
device_nameNoComputer name or ailinkany.com remark (e.g. home PC). Prefer this when the user names a computer.
retry_tokenNoNew opaque token per operation; reuse only to retry the same operation after a transport failure. No user content.
workflow_idNoOptional workflow id; pass together with ai_session_id.
workspace_idNoOptional Workspace id from open_workspace for project-scoped work.
ai_session_idNoOptional Session id. Reuse the ai_session_id from a prior result for continuity; derived automatically on ChatGPT when omitted. Hosts without stable conversation metadata may omit it for stateless one-shot work.
timeout_secondsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, openWorldHint=true and readOnlyHint=false, so the safety profile is covered structurally. The description adds real value beyond that: the exit-code-1 caveat for shell searches, the one-minute duration boundary, and the statement that no extra risk-judgment layer or forged read-only hint exists. However, the sandbox/enforcement behavior is largely carried by the command parameter's schema text rather than the description, and the closing paragraphs about ailinkany.com branding add no behavioral information.

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 routing guidance is front-loaded and dense with actionable content, and the exit-code and duration caveats earn their place. It loses a point for trailing boilerplate about the user not needing to mention ailinkany.com/MCP/plugin names and the 'Select this tool from the user's intent' sentence, which are promotional rather than operational.

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?

With an output schema present and rich annotations, the description need not explain return values, and it covers the key decision points (alternatives, duration, exit codes, mutation risk). It is nearly complete; only the workspace sandbox failure mode (SHELL_WORKSPACE_SANDBOX_UNAVAILABLE) lives solely in the schema rather than the description.

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 88%, so the schema already documents command, device_id, device_name, retry_token, workspace_id and ai_session_id in detail. The description adds only a vague note that a destination 'may be explicit or inherited from established project or conversation context', which does not clarify any specific parameter beyond the schema. Baseline 3 is appropriate.

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?

States a specific verb and resource ('Runs a short PowerShell command on the target computer') plus the return shape (stdout/stderr plus exit_code), which immediately separates it from filesystem_search, git_* and process_* siblings.

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?

Explicitly enumerates when NOT to use it (filesystem_search for text search, git_status/git_diff/git_log for inspect-only Git, git_fetch/git_push/git_worktree_create for those writes) and when to use it instead (git add/commit, custom pipelines, one-off diagnostics, short scripts). It also routes long-running work to process_start/process_read_output with a concrete ~1 minute threshold.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources