Skip to main content
Glama

change_directory

Changes the current working directory to a specified path, verifying the directory exists and remains within the sandbox.

Instructions

Change the current working directory. Similar to 'cd' command. The new directory must exist and be within the sandbox. / 切换当前工作目录。类似 'cd' 命令。新目录必须存在且在沙箱范围内。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe target directory path. Can be absolute or relative to the current working directory. Use '..' to go to parent directory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes
successYes
Behavior3/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. It reveals important constraints: the new directory must exist and be within the sandbox. However, it does not mention what happens on failure (e.g., does it raise an error? leave cwd unchanged?) or that the change is stateful and affects subsequent command executions. This leaves some ambiguity for a state-changing operation.

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 front-loaded with the core purpose. It consists of two short sentences (plus a bilingual translation) and every clause adds value: the action, the analogy, and the constraint. No wasted words.

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?

The tool is simple with one parameter and an output schema, so the description covers the essential domain constraints. It could be slightly more complete by noting that it changes the session state for subsequent tool calls, but given the simplicity and schema richness, it is sufficiently 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?

The input schema already provides detailed parameter semantics, including absolute/relative paths, examples, and '..' usage, with 100% coverage. The description only repeats the constraint that the directory must exist and be within the sandbox, which is already in the schema description. Thus the description adds no significant value beyond the schema, so baseline 3 applies.

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 verb and resource: 'Change the current working directory.' It also uses the 'cd' analogy for immediate recognition. This distinguishes it from all sibling tools, none of which modify 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 usage through the 'cd' analogy, which suggests using this tool when you need to change the current working directory for subsequent operations. However, it does not explicitly state when to use it over alternatives (e.g., get_working_directory for checking) or provide exclusion criteria, so guidance is only implied.

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/shibingli/mcp-toolkit'

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