Pages: set table cells
pages_set_table_cellsWrite values, text, or formulas into cells of an existing table in a .pages document while leaving all other content unchanged. Preview changes with dry_run.
Instructions
Write cells of an existing table in a .pages document. table = its name or number (from pages_read_tables); cells = {"B2": 1200, "C3": "تم", "D9": "=SUM(D2:D8)"} — numbers stay numbers, "=…" makes a formula, null clears. Every other cell and the body text are verified unchanged. New tables can't be created (Pages 15 doesn't script it). Needs macOS + Pages, document closed. dry_run=true previews the change on a copy without touching the file. Use to write into an existing Pages table. New tables can't be created in Pages; for text outside tables use pages_replace_all.
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>",
"table": "<table>",
"cells": "<cells>"
},
"name": "pages_set_table_cells"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the .pages document (absolute, or starting with ~). | |
| cells | Yes | {"B2": 1200, "C3": "تم", "D9": "=SUM(D2:D8)"}: numbers stay numbers, "=…" is a formula, null clears. | |
| table | Yes | The table's name or number (from pages_read_tables). | |
| dry_run | No | true = make the change on a throwaway copy, run every check, and return what would change; the file itself is not touched. Use it before broad or risky edits and show the user. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||