Skip to main content
Glama

format_cells

Apply formatting to Excel cells, including font styles, colors, alignment, borders, and number formats, for both live workbooks and .xlsx files without Excel.

Instructions

Apply formatting to cells. Use "workbook" for live Excel, or "path" for a .xlsx file on disk (no Excel needed, preserves images/charts). Options: bold, italic, underline, fontSize, fontName, fontColor, backgroundColor, textAlign (left/center/right), verticalAlign (top/middle/bottom), numberFormat, wrapText, borders ({top/bottom/left/right/inside/outside: {style, color}}).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workbookNoOpen workbook name (live Excel)
pathNoFile path to .xlsx (no Excel needed)
rangeYesCell range (e.g. "A1:C3")
formatYesFormatting options
sheetNoSheet name (default: active sheet)
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does reveal important behavioral traits: the distinction between live Excel and file-based operations, and that file-based operations preserve images/charts. However, it doesn't disclose whether this is a destructive operation (likely yes, since it applies formatting), what permissions might be needed, error conditions, or performance characteristics.

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

Conciseness5/5

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

The description is efficiently structured with zero wasted words. The first sentence states the core purpose, the second provides crucial usage guidance, and the third comprehensively lists all formatting options with helpful examples. Every sentence earns its place by adding distinct, valuable information.

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 formatting tool with 5 parameters (including complex nested objects), no annotations, and no output schema, the description does reasonably well by explaining the workbook/path distinction and listing formatting options. However, it doesn't cover important contextual aspects like what happens if formatting conflicts exist, whether changes are reversible, what the tool returns, or error handling for invalid ranges/formats.

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 parameters thoroughly. The description adds value by clarifying the practical distinction between 'workbook' and 'path' parameters and listing all formatting options with examples (like hex colors and border structure), but doesn't provide significant semantic information beyond what's already in the well-documented schema.

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?

The description starts with a clear, specific verb ('Apply formatting') and resource ('to cells'), immediately distinguishing this from sibling tools like read_cells or write_cells. It explicitly states the formatting action rather than just restating the tool name, making the purpose immediately understandable.

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?

The description provides clear context about when to use different input modes ('workbook' for live Excel vs 'path' for .xlsx files), including the practical implication that 'path' doesn't require Excel and preserves images/charts. However, it doesn't explicitly state when to choose this tool over alternatives like write_cells or how it relates to execute_vba for more complex formatting.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kousunh/Excel-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server