Skip to main content
Glama

update_borders

Destructive

Apply or clear outer and inner borders on a Google Sheets cell range by specifying style and color for each edge.

Instructions

Apply or clear borders on the edges of a cell range.

Args: spreadsheet_id: The ID of the spreadsheet sheet: The name of the sheet range: A1 notation range to border (e.g. "A1:D5") top: Border spec for the top edge of the range, e.g. {"style": "SOLID", "color": {"red": 0.0, "green": 0.0, "blue": 0.0}}. "style" is required and must be one of "DOTTED", "DASHED", "SOLID", "SOLID_MEDIUM", "SOLID_THICK", "DOUBLE", or "NONE" (clears the border). "color" is an optional RGB dict. "width" is optional and deprecated by the Sheets API in favor of "style", but still accepted. bottom: Border spec for the bottom edge, same shape as top. left: Border spec for the left edge, same shape as top. right: Border spec for the right edge, same shape as top. inner_horizontal: Border spec for the horizontal lines between rows inside the range, same shape as top. inner_vertical: Border spec for the vertical lines between columns inside the range, same shape as top.

Returns: Result of the batchUpdate operation

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": {
      "spreadsheet_id": "<spreadsheet_id>",
      "sheet": "<sheet>",
      "range": "<range>"
    },
    "name": "update_borders"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNo
leftNo
rangeYes
rightNo
sheetYes
bottomNo
inner_verticalNo
spreadsheet_idYes
inner_horizontalNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A4/5.0
Behavior3/5

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

Annotations supply only destructiveHint=true, so the description must carry the rest. It usefully discloses that 'NONE' removes borders and that 'width' is deprecated by the Sheets API but still accepted, yet it never says that unspecified edges are left untouched or that existing border formatting on the range is replaced, and the return value is dismissed as 'Result of the batchUpdate operation.'

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

Conciseness4/5

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

The docstring is front-loaded with a one-line purpose followed by a well-structured Args block where repeated references to 'same shape as top' avoid redundancy. It is longer than average but nearly every line conveys parameter detail absent from the schema; only the trailing Returns line is wasted since an output schema exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter mutation tool with zero schema description coverage, the definition covers all six spec parameters, the required three, and the clear-border path. What is missing is mutation semantics: whether omitted edges are preserved and whether prior borders are replaced, which matters given destructiveHint=true.

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 description coverage is 0%, so the description has to document everything and does: all six edge specs are defined with example shape, the required 'style' field is enumerated with all seven valid values, 'color' is described as an optional RGB dict, and 'range' is explained as A1 notation with an example. This adds substantial meaning the schema does not provide.

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?

States a specific verb pair and resource: 'Apply or clear borders on the edges of a cell range.' This is clearly distinguishable from value-editing siblings like update_cells or batch_update_cells without opening any schema.

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?

Usage is only implied by the tool's purpose. The description does explain that a style of 'NONE' clears a border, which is a useful in-tool convention, but it offers no guidance on when to pick this over update_cells, batch_update, or apply_theme, and no prerequisites or exclusions are stated.

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