Skip to main content
Glama

Set file permissions in a sandbox

set_file_permissions

Sets octal permission bits on a sandbox file path to control read, write, and execute access; ownership stays unchanged. Requires file.write.

Instructions

Set file permissions in a sandbox. Sets the permission bits. Files belong to the sandbox user; the owner and group do not change. Needs file.write.

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>",
      "path": "<path>",
      "mode": "<mode>"
    },
    "name": "set_file_permissions"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesOctal permission bits, for example "755".
pathYes
sandboxIdYesPublic Sandbox id returned by create/list/get sandbox calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A3.5/5.0
Behavior3/5

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

The description adds real value beyond the annotations by stating that ownership is fixed ("the owner and group do not change") and that a `file.write` scope is required, so an agent knows this is not a chown and that auth is needed. However, it omits key behavior: what happens when the path does not exist, whether directories are supported, and whether symlinks are followed. Note also that setting an absolute mode is inherently idempotent, which sits awkwardly against idempotentHint=false, though the description never claims idempotency explicitly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the action and immediately followed by the two facts that matter (ownership unchanged, required scope). Slight redundancy between the title line and "Sets the permission bits", but every sentence carries weight.

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 simple three-parameter mutating tool with annotations and no output schema, the definition covers the safety-relevant facts: it is not a chown, and it needs write scope. Gaps remain around failure modes and path semantics, but nothing critical to invoking it correctly is missing.

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 67%, with `mode` and `sandboxId` documented in the schema and `path` left bare. The description's "Sets the permission bits" reinforces that mode is an absolute set rather than a delta, but it adds nothing about `path` format (absolute vs relative, must-exist) beyond the schema. Baseline 3 fits given the schema does most of the work.

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?

States a specific verb and resource ("Set file permissions in a sandbox") and scopes it with "Sets the permission bits." An agent can distinguish it from write_file or move_file at a glance. No sibling tool is named as the near-alternative, but the operation 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 Guidelines3/5

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

Usage is only implied: the tool obviously applies to an existing file in a sandbox, and the definition adds a permission prerequisite ("Needs `file.write`"). There is no explicit when-to-use or when-not guidance, and no pointer to related tools such as get_file_info for inspecting current permissions.

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