Skip to main content
Glama

bash

Execute shell commands with persistent session support, maintaining working directory, environment variables, and shell state across multiple calls for consistent command execution.

Instructions

Execute shell commands with persistent session support. Sessions maintain working directory, environment variables, and shell state across calls. Use session_id to manage multiple independent shell sessions. Use disconnect=true to close a session. Platform: bash/sh on Unix, PowerShell/git-bash/cmd on Windows (auto-detected, best available).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesShell command to execute
cwdNoInitial working directory (only used when creating a new session)
session_idNoSession identifier for persistent shell. Default: default
timeout_secNoCommand timeout in seconds (default 120, max 600)
disconnectNoClose the shell session
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While it adequately explains session persistence and platform auto-detection, it critically fails to disclose safety characteristics: it omits that this executes arbitrary code on the host system, can modify/destroy files, or has significant security implications. For a shell execution tool, this omission is a major gap.

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 front-loaded with the core purpose in the first sentence, followed by session mechanics, usage instructions, and platform details. Every sentence earns its place; there is no redundant or filler text despite covering multiple concepts (sessions, platforms, session management).

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 high complexity of shell execution and lack of annotations, the description adequately covers the functional contract (sessions, platforms, parameters) but falls short on completeness due to missing safety/security context. With no output schema, the description appropriately focuses on input behavior, but the absence of destructive behavior warnings keeps this from being fully complete.

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?

Although the schema has 100% description coverage, the description adds valuable workflow context explaining how 'session_id' and 'disconnect' work together to manage session lifecycles ('Use session_id to manage...', 'Use disconnect=true to close'). This semantic relationship between parameters is not explicit in the schema alone.

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 opens with a specific verb ('Execute') and resource ('shell commands'), immediately clarifying its function. The addition of 'persistent session support' effectively distinguishes it from one-off execution siblings like 'procexec' or 'ssh' by emphasizing stateful interaction.

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 HOW to use sessions ('Use session_id to manage multiple independent shell sessions', 'Use disconnect=true to close'), providing implied workflow guidance. However, it lacks explicit comparison to sibling alternatives or guidance on when NOT to use this versus 'procexec' or 'ssh'.

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/knewstimek/agent-tool'

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