Skip to content

format_gsheet

Unified Google Sheets formatting tool using discriminated spec.kind. Supported kinds: range_format, borders, freeze_panes, protect_range, validation, conditional_format, preset, list_presets. Examples: 1) Apply direct range styling: {“kind”:“range_format”,“sheet_id”:0,“start_row”:0,“end_row”:1,“start_col”:0,“end_col”:5,“bold”:true}.

NameTypeRequiredDefaultDescription
project_nameAnnotated[str, Field(description='Name of the Bridge Town project.')]Yes
preset`Annotated[strNone, Field(description=“Named formatting preset to apply (e.g. ‘finance_table’, ‘summary’).”)]`NoNone
tab_nameAnnotated[str, Field(description='Name of the sheet tab to format.')]No'Sheet1'
spreadsheet_id`Annotated[strNone, Field(description=‘Google Spreadsheet ID to format.’)]`NoNone
source_name`Annotated[strNone, Field(description=‘Name of the data source or model output to format.’)]`NoNone
preset_params`Annotated[dict[str, Any]None, Field(description=‘Optional JSON object with parameters to pass to the preset.’)]`NoNone
spec`Annotated[FormatSpecNone, Field(description=‘Specification object describing the formatting/write/structure operation. See tool description for the schema.’)]`NoNone

Returns a structured object. Top-level fields:

  • spreadsheet_id (string)
  • operation (string)
  • preset (string)
  • detail (string)
  • sheet_url (string)

See the response example below for the full payload shape.

{
"name": "format_gsheet",
"arguments": {
"project_name": "forecasts",
"preset": "currency_usd",
"tab_name": "Forecast",
"spreadsheet_id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789ABCDEFG",
"preset_params": {
"start_row": 2,
"end_row": 1000,
"start_col": 2,
"end_col": 3
}
}
}
{
"spreadsheet_id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789ABCDEFG",
"operation": "preset_format",
"preset": "currency_usd",
"detail": "Applied currency_usd formatting to Forecast.",
"sheet_url": "https://docs.google.com/spreadsheets/d/1aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789ABCDEFG/edit"
}
  • Module: Export to Sheets
  • Requires authentication via API token or Auth0 JWT.