Read a file under the app's userData dir
read_user_data_fileRead a file from Electron's userData directory safely, with path-traversal protection. Returns text content and resolved absolute path.
Instructions
Safely read a file relative to the session's app.getPath('userData') (e.g. config.json, api-logs/api.log). Path-traversal protected: paths are resolved against userData and rejected if they escape it. Returns the text content (up to the size cap) along with the resolved absolute path.
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": {
"id": "<id>",
"relPath": "<relPath>"
},
"name": "read_user_data_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Session id. | |
| relPath | Yes | Path relative to `userData`, e.g. `config.json` or `api-logs/2026-05-08.log`. | |
| maxBytes | No | Read cap in bytes (default 1 MB). |