read_file
Read a file (up to 1 MiB). Text comes back as text; other bytes as base64 with encoding='base64'.
Works on your workspaces and any public one. For larger files use get_file_link. Since 2026-11-21 hashn keeps
a file as it is now, not every save: receipt reads only the current save (an older one: 410 history_ended).
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": {
"workspace_id": "<workspace_id>",
"path": "<path>"
},
"name": "read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The file to read, like 'drafts/report.md'. | |
| receipt | No | Optional: a save's number (file_history's receipts; the files listing gives the latest) to read exactly the bytes of that save instead of the current ones. | |
| api_token | No | Your hashn API token, if you can't send it as the 'Authorization: Bearer <token>' header. Omit it when the header is set. | |
| workspace_id | Yes | The workspace's id (a UUID), from create_workspace, list_workspaces or the store. |