Skip to main content
Glama
eduardoddddddd

DesktopCommanderPy

execute_command

Execute shell commands securely with output capture, working directory, and timeout control.

Instructions

Execute a shell command and return its combined stdout+stderr output.

Uses PowerShell on Windows, bash/zsh on Linux/macOS. The command is checked against the security blacklist before execution. Output is captured and returned as a string (truncated if too large).

Returns the combined output. On non-zero exit code, output includes the exit code so the caller can detect failures.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesShell command to execute. Use PowerShell syntax on Windows.
working_directoryNoWorking directory for the command. Defaults to user home.
timeout_secondsNoTimeout in seconds. 0 = use configured default.
environmentNoAdditional environment variables as a dict.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses shell detection, blacklist check, output truncation, combined stderr, and exit code reporting. With no annotations, this covers key behaviors. Lacks details on blacklist rejection behavior (e.g., error vs silent) and timeout handling beyond parameter.

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?

Extremely concise: 7 sentences, each adding unique value. Front-loaded with core purpose, then platform details, security, output handling, and error detection. No fluff.

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?

Given an output schema exists, the description adequately covers input, execution, and output. Could mention synchronous nature and blacklist error handling, but overall sufficient for a moderately complex tool.

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 coverage is 100%, so description adds marginal value over schema. Briefly mentions shell detection relevant to 'command' parameter, but no additional parameter meaning beyond schema descriptions.

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 executes a shell command and returns combined stdout+stderr output. It distinguishes from sibling 'execute_command_streaming' by implying batch output, and from 'start_process' by focusing on output capture. The verb 'execute' and resource 'command' are precise.

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?

Provides basic context like shell detection and security blacklist, but does not explicitly guide when to use this vs streaming or process management siblings. No 'when not to use' or alternatives listed.

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/eduardoddddddd/DesktopCommanderPy'

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