Skip to main content
Glama

设置列宽行高

set_dimensions

Fix Excel table layout by setting column widths and row heights. Specify dimensions in characters for columns and points for rows.

Instructions

设置工作表的列宽和/或行高,让表格排版合适。列宽单位是字符数(Excel 默认约 8.43),行高单位是磅(默认约 15)。columns 和 rows 至少传一个。csv 不支持。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNo
columnsNo
filePathYesExcel 文件的绝对路径,例如 `C:\Users\xx\报表.xlsx` 或 `/Users/xx/报表.xlsx`。支持 .xlsx / .xls / .csv
sheetNameYes
Behavior3/5

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

No annotations are provided, so the description carries the behavioral disclosure burden. It discloses default units (8.43 chars width, ~15 points height) which is useful context. However, it doesn't explain return values, whether this is a mutating operation requiring save, or what happens on partial failures. The defaults disclosure is helpful but the mutation consequences aren't fully spelled out.

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?

Three tightly-scoped sentences that front-load the purpose, then add unit semantics, then the constraint and exclusion. Zero filler words, every sentence earns its place. The critical usage constraints (at least one of columns/rows) and format exclusion are placed last but clearly.

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 a mutation tool with no annotations, no output schema, and low schema coverage, the description provides the essential operational details: units, defaults, the at-least-one constraint, and the CSV exclusion. It's missing explicit behavior notes on mutations (e.g., whether changes persist immediately) but for a dimension-setting utility this is reasonably 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?

Schema coverage is low (25%), so the description must compensate. The description adds real meaning beyond the schema by explaining the units (character count vs points) and defaults, which the schema only implicitly references via examples. The nested params (rows/columns arrays) are well-documented in the schema itself, and the description clarifies the semantic meaning of the numeric values.

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 the verb+resource (set column widths and/or row heights for a worksheet) with specific units given for both dimensions (characters for width, points for height). It distinguishes itself from siblings like format_cells by focusing specifically on dimension layout rather than cell formatting. The scope is precise and actionable.

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

Usage Guidelines5/5

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

The description explicitly states the 'at least one of columns or rows must be provided' requirement and includes the key exclusion 'csv 不支持' (CSV not supported), which prevents the agent from attempting this on unsupported file types. While it doesn't name alternative tools explicitly, the sibling context and clear scope make usage clear.

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/mutoukenji/mcp-excel'

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