Skip to main content
Glama

bash

Execute shell commands with persistent sessions. Sessions maintain working directory, environment variables, and state across calls. Use session_id for multiple independent sessions.

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: true or false. Default: false
Behavior3/5

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

With no annotations, description carries full burden. It mentions persistent sessions, environment, platform auto-detection, but lacks details on side effects, security, error handling, or return value format.

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?

Concise and front-loaded: first sentence states purpose, subsequent sentences add essential details without redundancy. Every sentence earns its place.

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?

Tool has 5 params, no output schema, no annotations. Description covers session behavior and platform, but omits timeout details (beyond default/max) and error handling. Could be more 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 coverage is 100%, so description adds limited parameter detail beyond schema. The description provides context for session_id and disconnect, but baseline 3 is appropriate.

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 executes shell commands with persistent session support. It specifies the core action and resource, and is distinct from siblings (no other shell execution tools).

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?

Provides explicit guidance on using session_id for multiple sessions and disconnect to close them. Does not explicitly list when not to use or alternatives, but context signals and sibling diversity make this sufficient.

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