Skip to main content
Glama

set_cwd

Change the global working directory for bash commands by specifying an absolute path. Ensures subsequent shell commands execute from the desired folder.

Instructions

Set the global working directory for bash commands.

Args:
    path: The absolute path to use as the new working directory.

Returns:
    A confirmation message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
Behavior3/5

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

With no annotations, the description carries the full burden. It states that it sets the global working directory and returns a confirmation message, but it does not disclose potential errors, validation behavior, or whether the change is session-wide. This is minimal but adequate for such a simple state-changing tool.

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: a one-sentence purpose, a clear Args section, and a Returns section. Every line serves a purpose with no unnecessary fluff. The structure is front-loaded with the primary action.

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?

For a simple tool with one parameter and no output schema, the description covers the essential aspects: what it does, the parameter requirement (absolute path), and the return type. It is complete for the tool's complexity.

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 schema provides only the parameter name and type (string), with 0% coverage. The description compensates by explicitly stating 'path: The absolute path to use as the new working directory', adding the important constraint that the path must be absolute. This adds meaningful semantic value 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 states 'Set the global working directory for bash commands', which clearly identifies the verb (set), resource (global working directory), and scope (for bash commands). This effectively distinguishes it from the sibling tool execute_bash, which runs commands rather than changing the working directory.

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 that this tool should be used to change the working directory for subsequent bash commands, but it does not explicitly state when to use it versus execute_bash or any exclusions. The usage context is clear but not formally articulated.

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/patrickomatik/mcp-bash'

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