Skip to content

feat: add readCellFormat, copyFormatting, and batchWrite tools#70

Merged
a-bonus merged 1 commit intoa-bonus:mainfrom
a-pedraza:feat/sheet-read-format
Feb 23, 2026
Merged

feat: add readCellFormat, copyFormatting, and batchWrite tools#70
a-bonus merged 1 commit intoa-bonus:mainfrom
a-pedraza:feat/sheet-read-format

Conversation

@a-pedraza
Copy link
Copy Markdown

Summary

Three new tools for advanced spreadsheet operations:

  • readCellFormat — Reads cell formatting from a range using spreadsheets.get with includeGridData
  • copyFormatting — Copies formatting between ranges using CopyPasteRequest with PASTE_FORMAT
  • batchWrite — Writes multiple ranges in a single call via values.batchUpdate

Closes #69

Changes

  • New: src/tools/sheets/readCellFormat.ts
  • New: src/tools/sheets/copyFormatting.ts
  • New: src/tools/sheets/batchWrite.ts
  • Modified: src/tools/sheets/index.ts — Added imports and registrations
  • Modified: src/googleSheetsApiHelpers.ts — Exported 4 previously private helpers (parseRange, resolveSheetId, colLettersToIndex, parseA1ToGridRange) with no signature changes

Testing

All three tools tested against a live Google Sheets spreadsheet:

  • readCellFormat: correctly returns bold, colors, font info for formatted cells
  • copyFormatting: copies header styles across sheets
  • batchWrite: writes multiple ranges in one call, verified with readback
  • Build passes (tsc with zero errors)

Three new tools for advanced spreadsheet operations:

- readCellFormat: reads cell formatting (bold, colors, fonts, alignment)
  from a range using spreadsheets.get with includeGridData
- copyFormatting: copies formatting (not values) between ranges using
  CopyPasteRequest with PASTE_FORMAT
- batchWrite: writes data to multiple ranges in a single API call
  via values.batchUpdate

Also exports four previously private helper functions from
googleSheetsApiHelpers.ts (parseRange, resolveSheetId,
colLettersToIndex, parseA1ToGridRange) needed by copyFormatting
and readCellFormat.
@a-bonus a-bonus merged commit 1284e83 into a-bonus:main Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add readCellFormat, copyFormatting, and batchWrite tools

2 participants