Skip to main content
Glama

Pages: set table cells

pages_set_table_cells
Destructive

Write 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the .pages document (absolute, or starting with ~).
cellsYes{"B2": 1200, "C3": "تم", "D9": "=SUM(D2:D8)"}: numbers stay numbers, "=…" is a formula, null clears.
tableYesThe table's name or number (from pages_read_tables).
dry_runNotrue = 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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.4.1
    • addedInput schema / properties / cells / description
      Added value: +"{\"B2\": 1200, \"C3\": \"تم\", \"D9\": \"=SUM(D2:D8)\"}: numbers stay numbers, \"=…\" is a formula, null clears."
    • addedInput schema / properties / dry_run / description
      Added value: +"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."
    • addedInput schema / properties / path / description
      Added value: +"Path to the .pages document (absolute, or starting with ~)."
    • addedInput schema / properties / table / description
      Added value: +"The table's name or number (from pages_read_tables)."
  2. First observedv2.4.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare a destructive, non-idempotent write, and the description adds real context beyond them: every other cell and the body text are verified unchanged, macOS + Pages are required, the document must be closed, and dry_run previews on a copy without touching the file. These are exactly the side-effect and precondition details an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and the cells payload, but the 'new tables can't be created' constraint appears twice and 'Use to write into an existing Pages table' restates the opening sentence. Mostly efficient with minor redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, annotations covering safety, and 100% schema coverage, the description still supplies the environment prerequisites, the non-target verification guarantee, and the dry_run workflow. Nothing needed to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description's cell semantics (numbers stay numbers, '=…' is a formula, null clears) duplicate what the schema's cells description already says, as does the table provenance note. It adds the concrete example mapping but no syntax or format detail beyond the structured fields, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Write cells of an existing table in a .pages document') and immediately bounds the scope to existing tables, distinguishing it from table-creation and text-editing tools. An agent can tell what it does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent: 'Use to write into an existing Pages table' and 'for text outside tables use pages_replace_all', plus the negative case that new tables can't be created. It also tells the agent when to reach for dry_run (before broad or risky edits).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.