Skip to main content
Glama

r7_sheet_format

Format XLSX cells/ranges: fonts, fills, borders, alignment, number formats, merges, column width, row height, preserving values/formulas. Set print layout in same call.

Instructions

Apply formatting to a cell or range in an XLSX worksheet: font, fill, borders, alignment, number format, merge, column width and row height. Values, formulas and unrelated styles are preserved. A sheet's print layout (fit-to-width so a table does not spill onto another page, orientation, paper, margins, centring) can be written in the same call with pageSetup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fillNoCell background.
fontNoFont settings.
mergeNoMerge the range (or unmerge when set with unmerge: true).
rangeNoCell or range to format, e.g. "B2" or "A1:D10". Optional when pageSetup is given.
borderNoBorders. Each edge accepts a style name or { style, color }. Use "all" to set every edge at once. Styles: thin, medium, thick, dashed, dotted, double, hair, mediumDashed, dashDot, mediumDashDot, dashDotDot, mediumDashDotDot, slantDashDot.
unmergeNoRemove the merge covering this range.
filePathYesPath to XLSX file.
alignmentNoText alignment.
pageSetupNoPrint layout for this sheet, written in the same save as the formatting. Use { fitToWidth: 1, fitToHeight: 0 } to keep a table one page wide with as many pages tall as it needs; fitToPage="1" is written automatically, without which fitToWidth is ignored by every renderer.
rowHeightNoHeight in points for every row in the range.
sheetNameNoSheet name (takes precedence over sheetIndex).
outputPathNoOptional target path.
sheetIndexNo0-based sheet index.
columnWidthNoSet the width of the columns spanned by the range.
numberFormatNoExcel number format. Values are stored as numbers, never as preformatted text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose a key non-obvious trait: values, formulas and unrelated styles are preserved, and pageSetup can be applied in the same save. It omits whether filePath must already exist and how outputPath vs filePath overwrite semantics work, which are relevant for a mutation tool.

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?

Three sentences, front-loaded with the core action, then preservation guarantees, then the pageSetup extension. Dense but efficient; the enumerated facet list is long though it directly maps to the tool's scope and earns its place.

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 15-parameter mutation tool with nested objects, no annotations and no output schema, the description covers the operation's scope and its non-destructive behavior. Return-value explanation is unnecessary since no output schema exists; remaining gaps are minor preconditions (file existence, overwrite 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 100%, so the schema already documents all 15 parameters in detail (including edge styles, paper sizes, fitToWidth/fitToHeight pairing). The description restates categories rather than adding format/syntax detail beyond the schema, so the baseline 3 is appropriate.

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 precise verb and resource (apply formatting to a cell or range in an XLSX worksheet) and enumerates the exact facets it covers: font, fill, borders, alignment, number format, merge, column width, row height. This makes it cleanly distinguishable from siblings like r7_sheet_write or r7_sheet_formula 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 implied through the enumerated facets and the note that print layout 'can be written in the same call with pageSetup', but there is no explicit when-to-use routing against alternatives (e.g. use r7_sheet_write for values). The agent must infer the boundary with sibling tools.

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