Skip to main content
Glama
kagan-sh

Kagan - AI Orchestration Layer

bash_exec

Execute shell commands with configurable timeout and working directory, returning combined output and exit code.

Instructions

Execute a shell command and return its combined output.

Streams each stdout/stderr line as a tool_execution_update event on the per-task event stream when a task context is available (i.e. the server was started with a bound session_id linked to a task).

Parameters

command: Shell command string (passed to /bin/sh -c or cmd.exe /c). cwd: Working directory. Defaults to the server process cwd. timeout: Wall-clock timeout in seconds (default 300). Pass null for no limit (use with care on long-running commands).

Returns

{"output": str, "exit_code": int, "timed_out": bool}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
cwdNo
timeoutNo
Behavior3/5

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

The description mentions streaming of output as tool_execution_update events and the return format, but lacks safety warnings about arbitrary command execution and potential destructive effects. With no annotations, more transparency on risks would be beneficial.

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 well-structured with sections for parameters and returns, and is concise without extraneous information. It could be slightly more terse, but overall efficient.

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 the simple nature of the tool (3 params, no output schema), the description covers parameters, return format, and the streaming behavior adequately. Lacks error handling details, but is sufficient for basic usage.

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?

The description adds meaning to all three parameters beyond the schema: command string, cwd default, and timeout with null as unlimited. Since schema description coverage is 0%, the description fully compensates.

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 output, specifying the shell used (/bin/sh -c or cmd.exe /c). This distinguishes it from sibling tools like terminal_run.

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 explains what the tool does but provides no explicit guidance on when to use it versus alternatives, such as terminal_run. Usage is implied but not clarified.

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/kagan-sh/kagan'

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