Skip to main content
Glama

set_format

Destructive

Apply bold, italic, font color, size, wrap, alignment, and number formats to one or more contiguous Excel ranges, with font changes verified by reading cells back.

Instructions

Format one or more contiguous ranges: bold, italic, fontColor (#RRGGBB), fontSize, wrapText, horizontalAlignment (General/Left/Center/Right/Justify), numberFormat (e.g. "yyyy-mm-dd", "0.00", "@" for text). Font changes are read back and verified. Fill colors: use set_fill.

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": {
      "file": "<file>",
      "sheet": "<sheet>",
      "ranges": "<ranges>"
    },
    "name": "set_format"
  }
}

Input Schema

NameRequiredDescriptionDefault
boldNo
fileYesWorkbook: SharePoint URL, an alias from ~/.graph-excel/workbooks.json, or "driveId:itemId"
sendNofalse (default) = dry run: shows what would change. true = write — only after the user approved (or a standing rule allows it)
sheetYesWorksheet name exactly as listed by resolve
italicNo
rangesYes
fontSizeNo
wrapTextNo
fontColorNo
numberFormatNo
horizontalAlignmentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so the safety profile is largely supplied. The description adds one genuinely useful behavior beyond that: 'Font changes are read back and verified', which tells the agent the tool self-confirms writes. It does not say that formatting overwrites existing cell formats, or how unspecified properties are treated, which matters for a destructive mutation.

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?

A single compact paragraph, front-loaded with the core action and the property list, with the sibling redirect as the closing sentence. Slight redundancy in restating the horizontalAlignment enum and numberFormat examples that the schema already carries, but nothing is padded.

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 an 11-parameter destructive mutation with no output schema, the description covers the formatting surface well but leaves gaps: the range string format is unstated, overwrite semantics on already-formatted cells are unstated, and it does not tie the verification behavior to what the agent should expect on failure. Adequate but not complete.

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

Parameters4/5

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

With only 27% schema description coverage, the description must carry the load, and it does for most optional params: fontColor format (#RRGGBB), numberFormat examples ('yyyy-mm-dd', '0.00', '@' for text), and horizontalAlignment values. The required 'ranges' parameter remains underspecified in both places — 'contiguous ranges' hints at the constraint but no range notation example (e.g. A1:C5) is given.

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 and resource ('Format one or more contiguous ranges') and enumerates exactly which formatting properties it applies (bold, italic, fontColor, fontSize, wrapText, alignment, numberFormat). It explicitly contrasts itself with set_fill, so an agent can distinguish it from that sibling without reading either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives one explicit routing rule: 'Fill colors: use set_fill', which is exactly the kind of alternative-naming that helps selection. It gives no guidance on when to prefer this over write_values (which could also rewrite cell content) and doesn't mention the dry-run-first approval flow, though the send parameter's schema description partially covers that.

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