vm_write_file
Write a file in a virtual machine.
Creates or replaces a file in a running machine with content, at most 1 MiB, and verifies it by its SHA-256. In Linux and macOS the file belongs to root unless owner names another account. vm_push copies larger files and folders from the Mac.
- Profiles
- operator, full
- Read-only
- No
- Destructive
- Yes
- Idempotent
- No
- Open world
- No
- Runs as a task
- No
Parameters
contentstringRequiredThe file's content.
encodingstringHow content is written; default utf-8.
One of
utf-8,base64.modestringOctal permissions such as 0644 (the default).
ownerstringThe guest account that owns the file.
pathstringRequiredAbsolute path in the guest.
vmstringRequiredThe machine's name or identifier, as vm_list shows it.
Output
The result's structured content is an object with these fields.
JSON Schema: /schemas/0/mcp/tools/vm_write_file/output.json
bytesintegerRequiredAt least 0.
pathstringRequiredverificationobjectRequiredverification.evidencestringRequiredverification.statusstringRequiredOne of
verified,unverified,failed.