Skip to main content
Glama
acartine
by acartine

shell_exec

Execute allow-listed commands in a sandboxed git repository with pagination, configurable timeout, and automated spill for large outputs.

Instructions

Execute an allow-listed command within the sandbox (git project root). Optional cwd must be a relative path from the sandbox root, or an absolute path within the sandbox or a valid git worktree. Supports pagination via limit_bytes and next_cursor (page and cursor are required for pagination). Automatically spills large outputs to file with spill_uri.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cmdYesThe command to execute (e.g., 'git', 'npm', 'python')
argsNoCommand arguments as an array of strings (e.g., ['status', '--short'])
cwdNoRelative path from sandbox root, or absolute path within the sandbox or a valid git worktree
timeout_msNoCommand timeout in milliseconds (deprecated, use timeout_seconds instead)
timeout_secondsNoCommand timeout in seconds (1-600, will be clamped to policy limits)
max_output_bytesNoMaximum output size in bytes (1000-10M, will be clamped to policy limits)
pageYesPagination configuration. Pagination is always on and hence a required attribute.
on_large_outputNoHow to handle large outputsspill
Behavior4/5

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

With no annotations, the description fully discloses key behaviors: allow-listing, sandbox scope, cwd constraints, pagination requirements, and automatic spilling of large outputs. It does not cover error handling or security details, but sufficiently reveals operational characteristics.

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?

The description is concise (3-4 sentences) and front-loaded, with each sentence serving a distinct purpose: stating intent, cwd rules, pagination, and output handling. No unnecessary words.

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 tool's complexity (8 params, nested objects, no output schema), the description covers main behaviors but lacks details on return format, error scenarios, and how pagination fits into the response. It is adequate but not fully complete.

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 baseline is 3. The description adds context (allow-listed, sandbox, cwd constraints) but does not significantly enhance individual parameter meanings beyond the schema's detailed 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 the tool's purpose: executing an allow-listed command within a sandbox. It specifies the resource (command) and scope (git project root), distinguishing it from siblings like read_file_chunk and shell_info.

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?

The description provides context on cwd constraints and pagination, but does not explicitly state when to use this tool versus alternatives like read_file_chunk or shell_info. No when-not or alternative guidance is given.

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/acartine/shemcp'

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