Change a copy of a Word, PowerPoint or Excel file
tarkle_edit_office_fileSaves changes to a COPY of the file. The kind of file decides the fields: .docx: edits ([{find, replace}], exact text, up to 50), inserts (paragraphs, a table, or a picture by fileId of a PNG, JPG or GIF, placed after some text or at the end), trackChanges (the changes become tracked changes by Tarkle that the person accepts or rejects in Word); .pptx: edits ([{find, replace}] on every slide where the text appears); .xlsx: cells ([{sheet, cell, value}], up to 100; an empty value clears the cell) and appendRows ([{sheet, rows}], up to 200 rows). Read the file first and copy the text to find exactly; every text, anchor or sheet named must exist or the call is refused and says which. A cell with a formula, a merged cell, or a workbook with charts, pictures, pivot tables or macros is refused. name sets the new file's name (default " (edited)."). A NEW file is saved (the source or template is never changed) and its fileId is returned; a taken name is refused (NAME_TAKEN). The same generators and limits as the Tarkle chat and the API.
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": {
"workspaceId": "<workspaceId>",
"fileId": "<fileId>"
},
"name": "tarkle_edit_office_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name for the new file. When omitted, "<name> (edited).<ext>". | |
| cells | No | For .xlsx: cells to change. | |
| edits | No | For .docx and .pptx: text replacements. Each finds exact text and replaces it. | |
| fileId | Yes | A fileId from tarkle_list_files or tarkle_list_bin. | |
| inserts | No | For .docx: content to add after some text, or at the end of the document. | |
| folderId | No | The folder for the new file; null for the library root; omit to keep the source's folder. | |
| llm_model | No | The model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics. | |
| appendRows | No | For .xlsx: rows to add at the end of a sheet. | |
| workspaceId | Yes | The workspace's id from tarkle_list_workspaces. | |
| trackChanges | No | For .docx: true saves the changes as tracked changes that the person can accept or reject in Word. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| notes | No |