Skip to main content
Glama

execute_command

Execute commands in PowerShell, CMD, or Git Bash on Windows with configurable working directory, environment variables, and timeout.

Instructions

[Command Execution] Execute a command in the specified shell (powershell, cmd, or gitbash)

Example usage (PowerShell):

{
  "shell": "powershell",
  "command": "Get-Process | Select-Object -First 5",
  "workingDir": "C:\\Users\\username"
}

Example usage with custom environment variables:

{
  "shell": "powershell",
  "command": "python -c \"print('Hello δΈ–η•Œ')\"",
  "env": {
    "PYTHONIOENCODING": "utf-8",
    "PYTHONUTF8": "1"
  }
}

Example usage (CMD):

{
  "shell": "cmd",
  "command": "dir /b",
  "workingDir": "C:\\Projects"
}

Example usage (Git Bash):

{
  "shell": "gitbash",
  "command": "ls -la",
  "workingDir": "/c/Users/username"
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNoCustom environment variables for command execution (optional). Example: {"PYTHONIOENCODING": "utf-8"}
shellYesShell to use for command execution
commandYesCommand to execute
timeoutNoCommand timeout in seconds (overrides config default)
workingDirNoWorking directory for command execution (optional)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It does not mention side effects (e.g., file writes, process spawning), error handling, blocking vs. async execution, or permission requirements. The focus is on examples, not behavior.

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 front-loaded with a clear purpose statement, followed by three well-structured examples. While somewhat lengthy, the examples are functional and demonstrate key usage scenarios. Could be slightly more concise by reducing example duplication.

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?

Given the lack of annotations and output schema, the description adequately covers how to use the tool but misses behavioral details (return format, error handling, async behavior). It is sufficient for basic usage but not fully complete for complex decision-making.

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 100%, so the baseline is 3. The description adds value beyond the schema by providing concrete examples showing real usage patterns, including environment variable encoding and working directory paths. This helps the agent understand parameter usage beyond the basic 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 starts with a clear statement: 'Execute a command in the specified shell (powershell, cmd, or gitbash)'. This specific verb+resource combination distinguishes it from sibling tools like ssh_execute (remote) and validate_command (dry-run).

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 examples implicitly show usage for local command execution across different shells, but no explicit when-to-use or when-not-to-use guidance is provided. Sibling names like ssh_execute and execute_batch hint at alternatives, but the description does not explicitly differentiate.

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/quanticsoul4772/mcp-server-win-cli'

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