Read a file from the editable source tree
read_source_fileReturn one file from the site's editable source tree (the stored pre-build code), so any chat can edit the site without the original local files. list_source_files shows the paths. Use read_source_file for source; use read_file instead for the files the site serves.
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": {
"path": "<path>"
},
"name": "read_source_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Site name as shown by list_sites, e.g. my-portfolio. Provide name or siteId. | |
| path | Yes | Path inside the source tree, e.g. 'src/App.tsx'. | |
| siteId | No | Site id from list_sites or get_site. Use instead of name. | |
| maxBytes | No | Per-file size cap in bytes. Default 1048576, max 5242880. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| path | Yes | ||
| size | Yes | ||
| siteId | Yes | ||
| content | Yes | ||
| encoding | Yes |