Skip to main content
Glama

apply_chinese_style

Apply Chinese-optimized formatting to Excel files: use Chinese font for headers, auto-adjust column widths for Chinese text, freeze the header row, and add thin borders.

Instructions

套用中文场景样式:中文字体表头、自动列宽(中文按 2 字符宽)、冻结首行、细边框。

为什么需要它:通用规范常推荐 Arial/Times New Roman,但对中文表格并不适用。 本工具默认使用微软雅黑(屏幕阅读友好),并让中文列宽自适应(中文按 2 字符宽计算)。

参数:

  • header_row:表头行号(默认 1)

  • auto_width:是否自适应列宽(默认 True)

  • freeze_header:是否冻结表头(默认 True)

  • font_name:自定义字体,省略用微软雅黑

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sheetNo
file_pathYes
font_nameNo
auto_widthNo
header_rowNo
freeze_headerNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden and does a good job: it discloses the default font (Microsoft YaHei), the two-character-width calculation for Chinese, and the effect set (freeze, border, etc.). It does not explicitly say whether existing cell styles are overwritten or whether the file is saved in place, but the mutating formatting behavior is reasonably clear for a style 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?

The overview is front-loaded with the core effects, and the parameter list is compact. The rationale block is extra but supports correct usage; no sentence is wasted. It could be trimmed slightly by removing the repeated width explanation.

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?

The definition covers behavior and defaults well but lacks explicit guidance on the required file_path and sheet parameters and on what the tool returns or confirms. Given no output schema or annotations, these omissions leave an agent to infer part of the calling contract.

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 0%, so the description must add meaning. It usefully documents four parameters (header_row, auto_width, freeze_header, font_name) and their defaults, but it omits the required file_path and the optional sheet parameter, so an agent is not fully told how to target the file/worksheet. This is partial compensation, not complete.

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 action ('套用中文场景样式') and names the concrete effects: Chinese-font header, auto column width, frozen first row, and thin borders. This clearly distinguishes it from narrower siblings like set_number_format or add_conditional_format.

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 '为什么需要它' paragraph establishes the intended context: Chinese-table formatting where generic font guidance (Arial/Times New Roman) is unsuitable. It gives a clear when-to-use signal, though it does not explicitly name alternatives or state when not to use it.

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