Change permissions
set_permissionsSets POSIX mode bits such as 755 or 600 on one file or folder to make a script executable or a file private. Non-recursive; refuses setuid, setgid, sticky, and group/world write bits.
Instructions
Set the POSIX permission bits of a file or folder. Use when: making a script executable or a file private ('755', '600'); get_path_info shows the mode. Instead: none for owner or group; run_backend_command (chmod) on a remote host for bits this tool refuses. Behavior: destructive - replaces the mode of path only, not recursive (a tree: one call per entry). Follows a symlink. Files with several hard links are refused. Backends without POSIX modes fail ('... does not support Unix permissions'). Time limit: 30 s. Returns: {ok: true}.
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": {
"mode": "<mode>"
},
"name": "set_permissions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | The new mode in octal: a string such as '644', '0644' or '0o755', or the integer value (420 = 0o644). Refused, with the reason: any bit outside 0755 - setuid, setgid, sticky, group or world write (e.g. '777', '4755', '664'). | |
| path | No | The file or folder (absolute, or relative to the MCP root). Required unless path_b64 is given. | |
| backend | No | Backend id from list_backends; omit for the default. | |
| path_b64 | No | path as base64 of its raw bytes, for non-UTF-8 names; replaces path. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes |