format_cells
Applies cell formatting to a range: background_color, text color/bold/italic/strikethrough/underline/font_size/font_family, horizontal/vertical alignment, wrap_strategy, and number format (number_format_type NUMBER/PERCENT/CURRENCY/DATE/TIME/DATE_TIME/SCIENTIFIC/TEXT with an optional number_forma...
This record as markdown: /tools/a1-x-tech-mcp-google-sheets/format-cells.md
What format_cells does on Mcp Google Sheets
AI agents use format_cells to create or update resources in Mcp Google Sheets, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Mcp Google Sheets environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
bold | boolean | — | Bold text. |
range | object | Yes | Cell rectangle in grid coordinates: rows 1-10 × columns A-B = {start_row_index:0, end_row_index:10, start_column_index:0, end_column_index:2}. |
italic | boolean | — | Italic text. |
font_size | integer | — | Font size in points. |
underline | boolean | — | Underlined text. |
text_color | string | — | Text color "#RRGGBB". |
font_family | string | — | Font family, e.g. "Roboto". |
strikethrough | boolean | — | Strikethrough text. |
wrap_strategy | string | — | How long text behaves: overflow into empty neighbors, clip at the edge, or wrap. |
spreadsheet_id | string | Yes | The spreadsheet id — the long id from the URL (docs.google.com/spreadsheets/d/<spreadsheetId>/edit) or from create_spreadsheet / search_spreadsheets output. |
background_color | string | — | Hex color "#RRGGBB", e.g. "#FF0000". |
number_format_type | string | — | Number format category. |
Parameters from the server's own tool schema.
Why format_cells is rated Medium
Modifies spreadsheet cell formatting reversibly without deleting data or executing arbitrary code.
From the tool's definition Applies cell formatting to a range; modifies existing formatting properties reversibly
Risk signalsHigh parameter count (20 properties)
Attacks that exploit this kind of access
The rule that runs format_cells safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Mcp Google Sheets, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For format_cells, this is the rule to start with:
format_cells stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Mcp Google Sheets, apply this rule, and every format_cells call is checked against it from then on.
Questions about format_cells
Applies cell formatting to a range: background_color, text color/bold/italic/strikethrough/underline/font_size/font_family, horizontal/vertical alignment, wrap_strategy, and number format (number_format_type NUMBER/PERCENT/CURRENCY/DATE/TIME/DATE_TIME/SCIENTIFIC/TEXT with an optional number_format_pattern like "#,##0.00" or "dd.mm.yyyy"). Only the provided properties are touched — the update mask is computed automatically, so existing formatting outside it survives; at least one formatting field is required. The range is a grid rectangle addressed by sheet_id + 0-based indexes (get sheet_id from get_spreadsheet). Colors are "#RRGGBB" hex strings. It is categorised as a Write tool in the Mcp Google Sheets MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
format_cells accepts 12 parameters: bold, range, italic, font_size, underline, text_color, font_family, strikethrough, wrap_strategy, spreadsheet_id, background_color, number_format_type. Required: range, spreadsheet_id. The full parameter table on this page comes from the server's own tool schema.
Register the Mcp Google Sheets MCP server in PolicyLayer and add a rule for format_cells: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp Google Sheets. Nothing to install.
format_cells is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the format_cells rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for format_cells. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
format_cells is provided by the Mcp Google Sheets MCP server (@a1-x-tech/mcp-google-sheets). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Mcp Google Sheets, and thousands of servers like it.
This server
Across the catalogue