Skip to main content
Glama
CodeSandbox MCP Server

CodeSandbox MCP Server

by techlibs

rename

Move or relocate a file or directory within a CodeSandbox sandbox filesystem to a new path by specifying source and target paths.

Instructions

Rename (move) a file or directory within the sandbox filesystem. Stateless: connects per call using sandboxId+sessionId.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sandboxId": "<sandboxId>",
      "sessionId": "<sessionId>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "rename"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesTarget path to rename/move to.
envNoOptional environment variables if the session is created.
fromYesExisting path to rename/move from.
overwriteNoWhether to overwrite if the target exists. Defaults to true.
sandboxIdYesTarget sandbox ID to operate on.
sessionIdYesSession identifier to connect with. If missing in the sandbox, it will be created.
permissionNoOptional permission if session needs to be created. Must allow writes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=false and destructiveHint=false, so safety is partly covered. The description adds genuinely useful behavioral detail by disclosing that it is stateless and opens a connection per call using sandboxId+sessionId. It stops short of warning that overwrite defaults to true and that an existing target can be silently replaced, which is the most consequential behavior here — and that gap is notable against a destructiveHint=false claim.

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?

Two sentences, no filler, with the core action stated first and the operational caveat second. Nothing is repeated from the title or the parameter list.

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?

For a 7-parameter mutation tool with a nested env object, the fully documented schema carries most of the burden and the description covers purpose and connection lifecycle. The remaining omissions — return value and the overwrite-by-default hazard — are small but real, especially with no output schema to answer the first.

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 from/to, overwrite, env, and permission are all documented in the schema itself. The description adds only the framing that sandboxId and sessionId are connection-scoped rather than just addresses. That is marginal value beyond the schema, which is the expected baseline here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Rename (move) a file or directory within the sandbox filesystem" gives a specific verb, an explicit synonym for the semantic (move), and the resource scope. The parenthetical resolves the ambiguity between renaming and moving, which many agents would otherwise question. It does not name a sibling or contrast with writeFile, but the action is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to prefer this over siblings such as writeFile plus a delete, nor any prerequisites or restrictions. The only hint is the stateless connection note, which explains mechanics rather than selection. An agent must infer the use case entirely.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.