Skip to main content
Glama

合并单元格

merge_cells

Merge a rectangular cell range into a single cell, preserving the top-left value. Ideal for creating title rows in Excel files.

Instructions

把一个矩形区域合并成一个单元格,内容保留左上角的值。常用于标题行。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangeYes矩形区域,如 `A1:D20`
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 disclosure burden. It does disclose the key behavioral trait (content retained from top-left, other cells' content lost or discarded). However, it doesn't disclose whether the merge is destructive to other cells' values, whether there are limitations (e.g., cannot merge across sheets), or whether it can be undone. The top-left value behavior is the most critical disclosure and is present.

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?

Single efficient sentence that conveys purpose, behavior, and a common use case in compact form. No wasted words. Could arguably add a bit more behavioral detail, but it's appropriately sized for the tool.

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?

Moderate complexity tool with no annotations and no output schema. The description covers the core operation and behavior but lacks important context: what happens to values in non-top-left cells (destroyed vs preserved silently), whether merge is reversible, and file format caveats given .csv support (csv may not support merged cells). For a tool that modifies a workbook, more edge-case context would improve completeness.

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 coverage is 67% (range and filePath have descriptions, sheetName does not). The description adds the 'top-left value retained' semantics that matter for understanding the range parameter, but doesn't add information about filePath or sheetName beyond the schema. It partially compensates for the sheetName gap but doesn't fully cover it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb+resource: merges a rectangular range into one cell, with explicit behavior (keeps top-left value). The mention of '常用于标题行' adds typical use context. It doesn't explicitly distinguish from sibling tools like format_cells or sort_range, but the operation is distinct enough that the purpose is unambiguous.

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

Usage Guidelines3/5

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

Implies usage for creating header/title rows ('常用于标题行'), which gives some context. However, it doesn't provide exclusions or when-not-to-use guidance—e.g., no mention that merging may affect other operations, or when to prefer format_cells for styling instead. Guidance is adequate but minimal.

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