Read Excel, Word or PDF file
office_readUse this when the user wants the contents of an Excel workbook (.xlsx, .xlsm) , a Word document (.docx, .docm) or a PDF in an approved project, without Office or another program. A workbook gives the cell values of one sheet as rows (dates as ISO text, formulas listed beside their values) and its sheet names. A document gives its paragraphs (style, heading level, list level) and table rows as numbered blocks, with header and footer texts. A PDF gives the text of each page (a scanned page has none; undecodedEncodings names Chinese, Japanese or Korean font encodings whose text cannot be read) with its page count, title and author. Long content comes in pages: pass nextOffset as offset. Read-only. Needs the sessionId from execution_session_open and a new operationId; each call is metered as one execution. A short result is returned inline within about two seconds; otherwise keep the returned IDs for operation_status and operation_output and do not resend the call.
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": {
"sessionId": "<sessionId>",
"operationId": "<operationId>",
"path": "<path>"
},
"name": "office_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Workbook (.xlsx, .xlsm), document (.docx, .docm) or PDF (.pdf) path relative to the selected project root (or the workspace root) | |
| range | No | Workbooks only: cells to read, for example A1:D100 or Sheet1!A1:D100 (default: the sheet's used cells) | |
| sheet | No | Workbooks only: sheet name or 0-based index (default: the first sheet) | |
| length | No | Maximum rows, blocks or PDF pages returned, 1-10000 (default 1000) | |
| offset | No | Rows (workbook), blocks (document) or PDF pages to skip, for the next page (default 0) | |
| sessionId | Yes | executionSessionId returned by execution_session_open | |
| deadlineAt | No | Optional UTC admission deadline at most 60 seconds ahead (queue start timeout, NOT process execution lifetime) | |
| operationId | Yes | A new random UUID v4 for this call; reuse it only to retry this same call | |
| idempotencyKey | No | Optional retry key, 8-128 chars of [A-Za-z0-9._:-]; defaults to operationId | |
| efficiencyProfile | No | Optional, unverified label of the client's model, recorded as display metadata in the device owner's local activity statistics. Omit when unknown. Never send credentials or conversation content. |