Skip to main content
Glama

Execute

execute

Run bash commands with timeouts and optional background mode; receive stdout, stderr, and exit code for file operations, builds, and system checks.

Instructions

Run a command in bash.

Returns stdout, stderr, and exit code. Default timeout is 5 seconds.

For long-running commands, set 'background: true' to run in background and get a job ID. Then use get_status to check on it.

Tips:

  • Use background mode for commands that take more than a few seconds

  • For file searches, use 'find' or 'grep'

  • For file operations, use 'mv', 'rm', 'mkdir -p', 'stat' etc.

Input Schema

NameRequiredDescriptionDefault
commandYesThe bash command to run
backgroundNoRun in background and return job ID
timeout_msNoTimeout in milliseconds (default: 5000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose real behavior: it returns stdout, stderr, and exit code, defaults to a 5-second timeout, and background mode yields a job ID. It omits safety-relevant context such as sandboxing, working directory, and side effects, which matters for arbitrary command 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 core purpose and return contract are front-loaded in the first two lines, with secondary detail in a bulleted tips block. It is reasonably tight, though the shell-usage tips verge on filler for an agent that already knows bash.

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?

There is no output schema and no annotations, so the description must cover returns — and it does, naming stdout, stderr, and exit code, plus the background job-ID pattern. It is nearly complete for this tool, with only timeout-failure behavior and environment/permission scope left unspecified.

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 command, background, and timeout_ms. The description restates the default timeout and background job-ID behavior without adding syntax or format detail, matching the baseline of 3 when the schema does the heavy lifting.

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?

The opening line 'Run a command in bash' is a specific verb+resource and is unambiguous, and the description correctly identifies the companion tool for background jobs. It falls just short of 5 because it names that sibling as 'get_status' while the actual sibling is 'get_job_status', slightly blurring the routing.

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?

It gives clear conditional guidance: use background mode when a command takes more than a few seconds, and use get_status to poll a backgrounded job. It stops short of explicit when-not-to-use guidance, and the find/grep and mv/rm/mkdir tips are shell advice rather than tool-selection guidance.

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

Deploy Server

Other Tools