Skip to main content
Glama

Edit sheet (structured)

edit_sheet

Apply structured operations to a sheet: write cells, insert or delete rows and columns, style ranges, freeze panes, and manage tabs while tela keeps formulas and references correct.

Instructions

Make a STRUCTURED edit to a sheet (a sheet=true page), editor+. Prefer this over update_page for sheets: you pass a typed operation and tela rewrites the Defter markdown correctly — inserting a row shifts every formula below it, deleting a column re-references the rest, so you never corrupt the grid by hand-editing text. Pass one op (or a batch via ops, applied atomically). Each op is {kind, ...} where kind is one of: setCells {cells:[{ref:"B2",text:"=A2*1.2"}]} — write literals/formulas by A1 ref; insertRows/deleteRows {at:<1-based row>, count?}; insertCols/deleteCols {at:<col letter or 1-based index>, count?}; setStyle {target:"A1:C1"|"B"|"2", attrs:{...}} — bold/align/fill/number-format a range/col/row; setFreeze {rows?, cols?} — freeze N header rows / M leading cols (0 clears); addSheet {name, after?}; renameSheet {sheet, name}; deleteSheet {sheet}. Ops that target a specific tab take an optional sheet (name or 0-based index; defaults to the first). A bad ref/range/sheet is rejected with a fixable error. Call sheet_authoring_guide for the full op reference, cell/style syntax, and formula functions. Returns the updated sheet with formulas computed.

Input Schema

NameRequiredDescriptionDefault
opNoa single SheetOp object with a 'kind' field. Provide this OR ops.
opsNoan ordered batch of SheetOps applied atomically (all-or-nothing; the sheet is only rewritten if every op succeeds). Provide this OR op.
page_idYesthe sheet page id to edit (a page with sheet=true)

Output Schema

NameRequiredDescriptionDefault
pageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.11.0
    • addedOutput schema / properties / page / properties / epistemic / properties / summary_stale
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / page / properties / sections / items / properties / in_quote
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / page / properties / status
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / page / properties / version
      Added value: +{
      +  "type": "integer"
      +}
    • changedOutput schema / properties / page / required
      Previous value: -[
      -  "id",
      -  "space_id",
      -  "parent_id",
      -  "title",
      -  "body",
      -  "position",
      -  "created_at",
      -  "updated_at",
      -  "url"
      -]New value: +[
      +  "id",
      +  "space_id",
      +  "parent_id",
      +  "title",
      +  "body",
      +  "position",
      +  "created_at",
      +  "updated_at",
      +  "version",
      +  "status",
      +  "url"
      +]
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Adds substantial context beyond annotations: editor+ auth requirement, atomic all-or-nothing batch semantics, that bad refs/ranges/sheets are rejected with a fixable error, and the return shape ('updated sheet with formulas computed'). Annotations only cover the read/write safety profile, so the description carries the informative load but doesn't cover rate limits or partial-failure edge cases explicitly.

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 core distinction and the 'prefer over update_page' rationale before the op catalog. It is dense and longer than typical, but nearly every clause carries unique operational value; a slightly tighter op enumeration would be ideal.

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?

For a complex nested-op mutation tool this is complete: it covers when to use it, the op vocabulary, atomicity, error behavior, default targeting, and points to sheet_authoring_guide for the full reference. With an output schema present, it correctly leaves return details to structured data while still noting formulas are computed.

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

Parameters4/5

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

Schema coverage is 100% (baseline 3), and the description meaningfully exceeds it by enumerating every op kind with payload shapes (setCells, insert/delete rows/cols, setStyle, setFreeze, addSheet, renameSheet, deleteSheet), the 1-based/col-letter conventions, and the default-sheet behavior. It defers full syntax to sheet_authoring_guide, so it stops short of being exhaustive.

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 ('Make a STRUCTURED edit to a sheet'), scopes it to sheet=true pages, and explicitly differentiates from update_page. An agent can distinguish it from patch_page/update_page without opening any 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?

Explicit routing: 'Prefer this over update_page for sheets' and it explains why (typed ops prevent corrupting formulas/grid by hand-editing text). It also names sheet_authoring_guide as the reference for advanced syntax, and states the 'op OR ops' selection rule.

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