Skip to main content
Glama

execute_isolated_script

Run shell commands inside Docker containers with built-in dangerous-pattern validation and a configurable timeout to prevent runaway scripts.

Instructions

Run a shell command string inside a container via docker exec.

Validates container_id and blocks known-dangerous command patterns
before running anything. Enforces a hard timeout via asyncio so a
runaway command can never hang the server.

Args:
    container_id: Container ID or name.
    command: Shell command string to run (executed via `sh -c`).
    timeout_seconds: Max seconds to wait before killing the command.

Returns:
    dict with stdout, stderr, exit_code, timed_out.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
container_idYes
commandYes
timeout_secondsNo
Behavior5/5

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

With no annotations, the description fully discloses behaviors: validates container_id, blocks dangerous patterns, enforces a hard timeout via asyncio, and returns a dict with stdout, stderr, exit_code, timed_out. This informs the agent of safety and timeout guarantees.

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 and well-structured, starting with a clear purpose sentence followed by a bulleted Args and Returns list. Every sentence is informative and no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool complexity (3 parameters, no output schema, no annotations), the description is thorough: covers purpose, safety, timeout behavior, and return format. The agent has enough information to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description provides clear explanations for all three parameters: container_id is ID or name, command is executed via sh -c, timeout_seconds is max seconds before killing. This adds critical meaning beyond the schema.

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 action ('Run a shell command string') and the resource ('inside a container via docker exec'). It is distinct from sibling tools (inspect_memory_dump and stream_container_logs) which have different purposes.

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 implies usage for running shell commands but does not explicitly specify when to use this tool versus alternatives, nor does it mention when not to use it. No comparison to siblings.

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/Vivekpatil200320/cyberrescue'

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