Skip to content

Conversation

@dsuarezf
Copy link

Summary

This PR adds a new format_cells tool to the MCP server that enables comprehensive cell formatting in Google Sheets.

Features Added

  • Number Formatting: Support for currency, percent, date, time, and custom number formats
  • Background Colors: Apply RGB colors (0-1 range) to cell backgrounds
  • Text Formatting: Control bold, italic, font size, foreground color, and more
  • Alignment: Set horizontal alignment (left, center, right)

Changes

  • Added format_cells() function in src/mcp_google_sheets/server.py (121 lines)
  • Updated README.md with tool documentation and example prompts
  • Updated pyproject.toml version

Usage Examples

"Format cells A1:E1 in Sheet1 with orange background, bold black text."
"Apply currency formatting to cells E2:E10 in the 'Sales' sheet."
"Center align the text in cells B1:D1 and make them bold."

Test plan

  • Test number formatting with different format types (currency, percent, date)
  • Test background color application
  • Test text formatting (bold, italic, font size)
  • Test horizontal alignment options
  • Verify A1 notation parsing for single cells and ranges

Added a new MCP tool that enables formatting of spreadsheet cells including:
- Number formats (currency, percent, date, time, etc.)
- Background colors (RGB with 0-1 range)
- Text formatting (bold, italic, font size, foreground color)
- Horizontal alignment (left, center, right)

Updated documentation with:
- Tool description and parameters in Available Tools section
- New feature highlight in Key Features
- Example prompts demonstrating cell formatting usage
@slhck
Copy link

slhck commented Nov 21, 2025

This looks super useful, any change of this getting tested/merged?

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.

2 participants