Request an invite
Docs menu

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

contentstringRequired

The file's content.

encodingstring

How content is written; default utf-8.

One of utf-8, base64.

modestring

Octal permissions such as 0644 (the default).

ownerstring

The guest account that owns the file.

pathstringRequired

Absolute path in the guest.

vmstringRequired

The 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

bytesintegerRequired

At least 0.

pathstringRequired
verificationobjectRequired
verification.evidencestringRequired
verification.statusstringRequired

One of verified, unverified, failed.

Report a problem with this page