Skip to main content
Glama
dudegladiator

Google Sheets MCP Server

format_cells

Apply formatting to a range of cells in Google Sheets, including bold, italic, font size, text color, background color, and alignment.

Instructions

Apply formatting to a range of cells.

Examples: - Format header row bold with blue background: format_cells("abc", 0, 0, 1, 0, 5, bold=True, background_color="#4285F4") - Center align cells A1:C10: format_cells("abc", 0, 0, 10, 0, 3, alignment="CENTER")

Note: Indices are 0-based. Row 1 in sheets = index 0. Column A = index 0. end_row and end_col are EXCLUSIVE (like Python ranges).

Args: spreadsheet_id: The ID from the spreadsheet URL. sheet_id: Numeric sheet ID (get from list_sheets or get_spreadsheet_info). start_row: Starting row index (0-based, so row 1 = 0). end_row: Ending row index (exclusive, so rows 1-5 = start=0, end=5). start_col: Starting column index (0-based, A=0, B=1, C=2...). end_col: Ending column index (exclusive). bold: Make text bold (True/False). italic: Make text italic (True/False). font_size: Font size in points (0 to skip, typical: 10-14). font_color: Hex color for text (e.g., "#FF0000"=red, "#FFFFFF"=white). background_color: Hex color for cell background (e.g., "#4285F4"=blue). alignment: "LEFT", "CENTER", or "RIGHT".

Returns: Success message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boldNo
italicNo
end_colYes
end_rowYes
sheet_idYes
alignmentNo
font_sizeNo
start_colYes
start_rowYes
font_colorNo
spreadsheet_idYes
background_colorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the transparency burden. It does disclose crucial behavioral details: 0-based indexing, exclusive end row/column, and the return of a success message. However, it does not mention whether formatting is additive or overwrites existing formatting, or any permission requirements. It covers key behaviors but not all potential edge cases.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: a concise purpose sentence, illustrative examples, critical indexing notes, and an Args list. Each part serves a purpose—no filler content. The most important information (0-based indexing, exclusive bounds) is highlighted separately, and the length is justified by 12 parameters needing explanation.

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?

Given the tool's complexity (12 params, no schema descriptions, no annotations), the description is complete. It covers all parameters, provides usage examples, explains indexing conventions, and states the return value. It also references how to obtain sheet_id, covering prerequisites. This is sufficient for an agent to invoke the tool correctly.

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

Parameters5/5

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

The schema has zero description coverage (0%), so the description must explain every parameter. It does this thoroughly with an Args section that defines each parameter, including examples and valid values (e.g., alignment 'LEFT'/'CENTER'/'RIGHT', color hex format). This fully compensates for the schema's lack of descriptions.

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?

The description starts with a clear verb+resource statement: 'Apply formatting to a range of cells.' It includes concrete examples that show the various formatting options (bold, background, alignment), making the purpose unmistakable and distinct from sibling tools like write_cells or clear_cells.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by showcasing formatting scenarios, but it does not explicitly state when to prefer this tool over alternatives (e.g., 'Use this for styling, not for writing data'). Given the presence of many sibling tools, explicit exclusions or alternative references would strengthen guidance. The examples provide context, so it is not entirely missing.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dudegladiator/spreadsheet-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server