Request an invite
Docs menu

vm_read_file

Read a file in a virtual machine.

Reads a file in a running machine from offset, up to max_bytes, in whole characters. Text comes back as text; other bytes as base64. nextOffset is where the next read starts; vm_pull copies larger files and folders to the Mac.

Profiles
read-only, operator, full
Read-only
Yes
Destructive
No
Idempotent
Yes
Open world
No
Runs as a task
No

Parameters

max_bytesinteger

Default 32768; vm_pull copies more.

From 1 to 32768.

offsetinteger

Where to start, in bytes; default 0.

From 0 to 9007199254740991.

pathstringRequired

Absolute path in the guest, such as /etc/hosts or C:\Windows\win.ini.

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_read_file/output.json

completebooleanRequired
contentobjectRequired
content.bytesintegerRequired

At least 0.

content.encodingstring

One of base64.

content.guestDatastringRequired
content.shownintegerRequired

At least 0.

nextOffsetintegerRequired

At least 0.

offsetintegerRequired

At least 0.

pathstringRequired

Report a problem with this page