Write a file on a Mac
write_mac_fileWrites a file of up to 3 MiB on the Mac: content as text, or content_base64. Relative paths are in the workspace; ~ is home. Creates missing folders and replaces a file in one step; executable marks a script. Safe to repeat.
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": {
"path": "<path>"
},
"name": "write_mac_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File to write. Relative paths are in the session workspace; ~ is the home folder. | |
| content | No | The file's text (UTF-8). Use content_base64 instead for binary files. | |
| executable | No | Make the file executable (for scripts). | |
| session_id | No | Mac session ID (ses_…). Optional: without it, the account's running Mac. | |
| content_base64 | No | The file's bytes as base64, for binary files. |