read
Read a file's content and size. Errors if the file does not exist or path is a directory.
Instructions
Read the contents of a file. Returns the file content and size in bytes. Errors: ENOENT if the file does not exist, EISDIR if the path is a directory.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the file (e.g. /src/index.ts) | |
| store | No | Named persistent store for cross-session access. Sessions are ephemeral (one per MCP connection); named stores persist indefinitely. Omit to use the session's own namespace. |