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_bytesintegerDefault 32768; vm_pull copies more.
From 1 to 32768.
offsetintegerWhere to start, in bytes; default 0.
From 0 to 9007199254740991.
pathstringRequiredAbsolute path in the guest, such as /etc/hosts or C:\Windows\win.ini.
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_read_file/output.json
completebooleanRequiredcontentobjectRequiredcontent.bytesintegerRequiredAt least 0.
content.encodingstringOne of
base64.content.guestDatastringRequiredcontent.shownintegerRequiredAt least 0.
nextOffsetintegerRequiredAt least 0.
offsetintegerRequiredAt least 0.
pathstringRequired