Read a document
readDocumentRead a full document from the knowledge base by its storage key, when a search result is not enough. The key comes from searchDocuments or listDocuments.
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": {
"key": "<key>"
},
"name": "readDocument"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Document key (full R2 path including folder prefix) | |
| workspaceId | No | The workspace, as listWorkspaces gives it (its id or slug). Leave it out when this connection reaches one workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| text | Yes | The document as text, up to 12000 characters | |
| filename | Yes | The name the file was uploaded with, to cite | |
| truncated | Yes | The document is longer than `text` | |
| totalChars | Yes |