Read Files
read_filesRead up to 20 files in ONE call, much cheaper than repeated read_file: prefer it whenever you need several files together (an endpoint, its .schema.ts and the hook that calls it). Same paths and options as read_file (diagnostics, include_references; /_cdn/ images come back as images), each file cat -n style under a header. Output is capped: whole files at the end are left out and listed by name. With older_than (up to 5 paths) the files are walked back through history TOGETHER on one timeline — the way to keep a component and its stylesheet consistent.
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": {
"projectId": "<projectId>",
"paths": "<paths>"
},
"name": "read_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| paths | Yes | ||
| projectId | Yes | ||
| older_than | No | Omit (or leave empty) to read the current file. Set it only to read the file as it was BEFORE an earlier change. Pass "current" for the version just before the latest change to it, then the cursor each result gives you to step one change further back — until you find a good version, then write it back with write_file (or merge by hand). Not a version number: each step is one recorded change to the file. Type errors and references are skipped for past versions. | |
| diagnostics | No | ||
| include_references | No |