Skip to main content
Glama

format_excel_cells

Apply formatting to Excel cell ranges: adjust font, colors, borders, alignment, and number format while preserving existing styling.

Instructions

Apply formatting to a cell range: font, colors, borders, alignment, number format.

Only the attributes you pass are changed; existing styling is preserved. Example — style a header row: cell_range="A1:D1", bold=true, font_color="FFFFFF", fill_color="4472C4", horizontal_align="center", border_style="thin".

@param file_path: Absolute path to the .xlsx/.xlsm file. @param cell_range: Range like "A1:C10" or a single cell like "B2". @param sheet_name: Target sheet. None = first sheet. @param font_name: Font family (e.g. "Calibri"). @param font_size: Font size in points. @param bold: Bold on/off. @param italic: Italic on/off. @param font_color: Text color, RRGGBB hex (e.g. "FFFFFF"). @param fill_color: Background color, RRGGBB hex (e.g. "4472C4"). @param border_style: thin, medium, thick, double, dashed, or dotted. @param border_edges: "all" = every cell; "outline" = outer edge of range only. @param horizontal_align: left, center, right, or justify. @param vertical_align: top, center, or bottom. @param wrap_text: Enable/disable text wrapping. @param number_format: Excel format code (e.g. "#,##0.00", "dd/mm/yyyy", "0%"). @return: Confirmation with the number of cells formatted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boldNo
italicNo
file_pathYes
font_nameNo
font_sizeNo
wrap_textNo
cell_rangeYes
fill_colorNo
font_colorNo
sheet_nameNo
border_edgesNoall
border_styleNo
number_formatNo
vertical_alignNo
horizontal_alignNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description effectively covers behavioral traits: it specifies that formatting is selective (only changed attributes), and mentions the return value is a confirmation with cell count. It does not contradict any annotations.

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 well-structured with a brief introductory sentence, a usage example, and a clear @param listing for all 15 parameters. While slightly long, it earns its length given the tool's complexity, with no wasted sentences.

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?

Given the 15 parameters and no existing annotations or output schema shown, the description covers all essential aspects: file path, cell range, formatting options, and return value (confirmation with cell count). It is complete for effective tool usage.

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?

Although schema description coverage is 0%, the description compensates by documenting each parameter with type, example values, and allowed options (e.g., 'thin, medium, thick, double, dashed, or dotted' for border_style). This adds significant meaning beyond the 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 clearly states 'Apply formatting to a cell range' and lists specific formatting options (font, colors, borders, alignment, number format), making the purpose unambiguous. It distinguishes itself from sibling tools like update_excel_cells (which updates values) and set_excel_column_widths.

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 explains that only passed attributes are changed and existing styling is preserved, providing clear usage context. It includes an example of styling a header row. While it doesn't explicitly state when not to use, the sibling list implies alternatives for other operations.

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/VOYAGER-Inc/excel-vision-mcp'

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