-
Notifications
You must be signed in to change notification settings - Fork 139
feat: add readCellFormat, copyFormatting, and batchWrite tools #69
Copy link
Copy link
Closed
Description
Description
Three new tools for advanced spreadsheet operations:
- readCellFormat — Reads cell formatting (bold, italic, font size, colors, alignment, borders) from a given range. Returns only cells with explicit formatting applied.
- copyFormatting — Copies formatting (not values) from a source range to a destination range within the same spreadsheet. Useful for replicating header styles, conditional formatting patterns, etc.
- batchWrite — Writes data to multiple non-contiguous ranges in a single API call, reducing round-trips when updating several parts of a spreadsheet at once.
Motivation
readCellFormatfills a gap: there's currently no way to inspect cell formatting programmatically through the MCP toolscopyFormattingenables format replication without manually reading and applying stylesbatchWriteimproves efficiency when updating multiple ranges (common in dashboards and report generation)
Implementation Details
readCellFormatusesspreadsheets.get()withincludeGridData: truecopyFormattingusesspreadsheets.batchUpdatewithCopyPasteRequestandpasteType: PASTE_FORMATbatchWriteusesspreadsheets.values.batchUpdate()- Exports 4 previously private helper functions from
googleSheetsApiHelpers.ts:parseRange,resolveSheetId,colLettersToIndex,parseA1ToGridRange(no signature changes — existing internal callers unaffected)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels