Skip to main content
Glama

style_doc_table_cells

Destructive

Style Google Doc table cells by applying borders, padding, and background colors, with per-edge overrides and row/column spans for formatted tables and signature lines.

Instructions

Apply border, padding, and background styles to table cells in a Google Doc.

Args: doc_id: The Google Doc file ID. table_start_index: The startIndex of the table (from get_doc_structure or insert_doc_table). cells: List of cell style dicts. Each dict must include row_index and column_index, plus any combination of:

    background_color (dict): {"red": 0-1, "green": 0-1, "blue": 0-1}
    padding_top, padding_right, padding_bottom, padding_left (float): points
    border_color (dict): {"red": 0-1, "green": 0-1, "blue": 0-1}
        Applies the same color to all four borders (any edge not given its
        own border_top/right/bottom/left below).
    border_width (float): border line width in points
    border_dash_style (str): "SOLID", "DOT", "DASH", "DASH_DOT",
        "LONG_DASH", "LONG_DASH_DOT" (default SOLID)
    border_top, border_right, border_bottom, border_left (dict): optional
        per-edge override, each {"color": {...}, "width": float,
        "dash_style": str}. Any field omitted from a per-edge dict falls
        back to the uniform border_color/border_width/border_dash_style
        above, if given (the Docs API rejects a border with non-zero width
        and no color as "transparent", so a width-only override needs a
        color from somewhere). An edge with no border_<side> key falls back
        entirely to the uniform border_color/border_width/border_dash_style,
        if given; with neither, that edge's border is left untouched.
    row_span (int): default 1
    column_span (int): default 1

Returns: Confirmation with docId and count of batchUpdate requests sent.

Example — standard data-room table style (grey header, thin border, 3.6pt padding): table_start_index: cells: [ {"row_index": 0, "column_index": 0, "column_span": <num_cols>, "background_color": {"red": 0.953, "green": 0.953, "blue": 0.953}, "padding_top": 3.6, "padding_right": 3.6, "padding_bottom": 3.6, "padding_left": 3.6, "border_color": {"red": 0, "green": 0, "blue": 0}, "border_width": 0.5, "border_dash_style": "SOLID"} ]

Example — signature line (bottom border only): cells: [ {"row_index": 0, "column_index": 0, "border_bottom": {"color": {"red": 0, "green": 0, "blue": 0}, "width": 1.0}} ]

For form-style column alignment (labels/values lined up without a visible table, since tabStops is read-only — #404), zero padding on every cell is the confirmed part of the recipe; whether border_width: 0 also suppresses a table's default visible border is not yet confirmed live. See docs/design/borderless-table-columns.md.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "doc_id": "<doc_id>",
      "table_start_index": "<table_start_index>",
      "cells": "<cells>"
    },
    "name": "style_doc_table_cells"
  }
}

Input Schema

NameRequiredDescriptionDefault
cellsYes
doc_idYes
table_start_indexYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, it discloses that the Docs API rejects a non-zero-width border with no color as 'transparent', explains the exact fallback chain from per-edge overrides to uniform border fields to leaving an edge untouched, and states the return value (docId plus batchUpdate request count). It even flags which behavior is unconfirmed, which is unusually honest.

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

Conciseness3/5

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

Purpose is front-loaded and the per-field Args block is efficient, but the definition runs long with two full examples, and the closing paragraph about tabStops being read-only and an unconfirmed border_width:0 test cites internal issues (#404) and a repo path the agent cannot follow. That speculation belongs elsewhere.

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?

For a tool whose real complexity lives in a free-form array of style dicts, the definition covers every field, default, and conflict-resolution rule, plus worked examples and the return shape. An agent has everything needed to construct a valid call without probing the API.

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?

Schema coverage is 0%, so the description must carry the entire burden and it does: it documents all three top-level params plus every nested cell field with types, defaults (row_span/column_span = 1, SOLID dash style), coordinate ranges, and the enumerated dash-style values. The fallback rules for per-edge border dicts add meaning no schema could convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb and resource: applying border, padding, and background styles to table cells in a Google Doc. It is clear about what is being styled, but it never distinguishes itself from close siblings such as format_cells, update_cells, or batch_update_cells, so an agent must infer the boundary.

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

Usage Guidelines4/5

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

It states where table_start_index comes from (get_doc_structure or insert_doc_table) and supplies three concrete usage scenarios: a data-room table, a signature line, and form-style column alignment. It stops short of explicit when-not guidance or naming an alternative tool for plain cell value updates.

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

Deploy Server

Other Tools