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}.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
project_name | Annotated[str, Field(description='Name of the Bridge Town project.')] | Yes | — | |
preset | `Annotated[str | None, Field(description=“Named formatting preset to apply (e.g. ‘finance_table’, ‘summary’).”)]` | No | None |
tab_name | Annotated[str, Field(description='Name of the sheet tab to format.')] | No | 'Sheet1' | |
spreadsheet_id | `Annotated[str | None, Field(description=‘Google Spreadsheet ID to format.’)]` | No | None |
source_name | `Annotated[str | None, Field(description=‘Name of the data source or model output to format.’)]` | No | None |
preset_params | `Annotated[dict[str, Any] | None, Field(description=‘Optional JSON object with parameters to pass to the preset.’)]` | No | None |
spec | `Annotated[FormatSpec | None, Field(description=‘Specification object describing the formatting/write/structure operation. See tool description for the schema.’)]` | No | None |
Returns
Section titled “Returns”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.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "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 } }}Response
Section titled “Response”{ "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.