Skip to main content
Glama

format_range

Apply fonts, colors, alignment, borders, number formats, widths, freeze panes, merges, filters and validation to Excel/CSV ranges in one call to make sheets readable and consistent.

Instructions

Make sheets look good: fonts, fills, number formats, alignment, borders, widths, freeze panes, merge, filters, conditional formatting and dropdown validation. Combine several options in one call.

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": {
      "path": "<path>"
    },
    "name": "format_range"
  }
}

Input Schema

NameRequiredDescriptionDefault
boldNo
pathYesFile path, relative to the root folder (or absolute inside it).
mergeNotrue = merge range, false = unmerge.
rangeNoCells to format, e.g. 'A1:F1' or 'C:C'.
sheetNoSheet name (or 0-based index). Default: first sheet.
borderNoBorder on every cell.
italicNo
autofitNoAuto-size columns in range to their content.
dry_runNoPreview the change without saving.
h_alignNoHorizontal alignment.
v_alignNoVertical alignment.
font_nameNo
font_sizeNo
underlineNo
wrap_textNo
fill_colorNoBackground: hex or name (lightyellow, lightgreen, ...); 'none' clears.
font_colorNoHex '#RRGGBB' or name (red, darkblue, ...).
row_heightNo
validationNoData validation: {'type':'list','values':['Yes','No']} (dropdown) or {'type':'whole','min':0,'max':100}.
auto_filterNoAdd (true) or remove (false) filter dropdowns on the range.
conditionalNoConditional formatting: {'type':'color_scale'} | {'type':'data_bar','color':'#638EC6'} | {'type':'icon_set'} | {'type':'cell_is','operator':'>','values':[100],'fill_color':'lightgreen'} | {'type':'formula','formula':'$D2<0','fill_color':'lightred'} | {'type':'duplicates'}
border_colorNo
column_widthNoWidth for columns in range, or {'A': 30, 'B': 12}.
freeze_panesNoFreeze above/left of this cell, e.g. 'A2' (header row) or 'B2'; 'none' unfreezes.
number_formatNoPreset (currency, usd, eur, bdt, percent, integer, decimal, date, datetime, text) or Excel code like '#,##0.0'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already indicate that this is a mutating, non-idempotent, non-destructive operation. The description adds that formatting options can be combined in a single call, which is useful behavioral context, but it does not mention the dry_run preview capability, save behavior, or other operational details.

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 description is front-loaded with the tool's purpose and uses only two sentences. The list of formatting categories is long but earns its place by conveying the tool's breadth, though the phrase 'Make sheets look good' is informal.

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

Completeness3/5

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

For a 25-parameter formatting tool with 68% schema description coverage and no output schema, the description gives an adequate overview of capabilities and batching. It still leaves notable gaps around when to choose this tool over data-writing or transformation siblings, and around the dry_run preview behavior.

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

Parameters3/5

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

Schema description coverage is 68%, so the schema already documents many parameters. The description adds conceptual coverage by grouping capabilities such as fonts, fills, alignment, borders, widths, freeze panes, merge, filters, conditional formatting, and validation, but it does not add syntax or usage detail beyond what the schema provides.

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 description clearly states that this tool applies visual formatting to sheets, and it enumerates concrete formatting capabilities such as fonts, fills, borders, freeze panes, merge, filters, conditional formatting, and dropdown validation. It does not explicitly distinguish itself from siblings like write_range or transform, so it falls short of a 5.

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 saying it is for making sheets look good and notes that several formatting options can be combined in one call. However, it provides no explicit when-to-use versus when-not-to-use guidance and names no alternatives such as write_range or transform.

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