duduExcel
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DUDU_EXCEL_ROOT | No | Sandbox root directory. Supports multiple directories separated by ';' on Windows or ':' on other platforms. Restricts file access and prevents absolute paths or '..' traversal. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| workbook_infoA | 查看 Excel 工作簿结构:工作表清单、每张表的行列数、合并单元格数、隐藏行列数、内嵌图片数与文件大小。 用途:开始处理任何 Excel 文件前先调用这个,用一次调用摸清结构, 避免为了知道有哪些表就把整张表读进上下文。 返回:文件路径、大小、活动表名、每个工作表的 name/rows/columns/merged_cells/hidden_rows/hidden_columns。 |
| write_cellsA | 批量写入多个单元格 —— 一次调用完成,不要用单格写入循环调用。 这是批量接口:请在一次调用里传入所有要写的单元格, 服务只做一次文件读写周期。逐格循环调用会慢很多且反复触发备份。 参数:
安全:写入前自动生成 .bak 备份 + 原子保存,可用 revert_last_write 回滚。 限制:单次最多 10 万个单元格。 |
| read_rangeA | 读取工作表数据,支持分页、截断、格式语义与隐藏内容处理。 重要:不要试图一次读完大表。默认 limit=200 行, 超出的部分通过增大 offset 分批获取(truncated 会告诉你是否还有剩余)。 参数:
格式语义标记(汲取自 excel-vision-mcp —— 作者留下的格式是有含义的):
隐藏内容:默认跳过(作者隐藏通常表示不属于审阅内容), 但被可见公式引用的隐藏单元格仍保留并标记 [HIDDEN-REF], 且始终报告跳过了多少,绝不静默丢弃。 返回:grid(二维值)、cells(坐标→值)、formulas、format_markers。 |
| list_imagesA | 列出工作簿内的嵌图片(零依赖,直接扫描 xl/media/)。 为什么需要它:多数 Excel MCP 会静默丢弃所有内嵌图片, 于是贴在单元格里的流程图/截图永远到不了模型眼前。 返回:图片数量、文件名、大小、尺寸(PNG/JPEG/GIF/BMP 可从文件头解析)。 注意:只返回清单而非图片本体,避免 base64 撑爆上下文; 若需模型"看到"图片内容,请解压后交给多模态模型读取。 |
| sheet_profileA | 查看工作表的列级画像:类型、空值率、唯一数、Top 值、数值统计。 这是开始分析任何表格前最该先调用的工具 —— 一次调用即可摸清全表 (列类型、哪些列有空值、数值范围、类别分布), 省掉反复试探的十几次调用,且不会把任何数据行塞进上下文。 参数:
返回:每列的 profile(dtype/null_pct/unique/top_values/stats), 以及 _meta.tokens_saved(本次相比"读全表"节省了多少 token)。 |
| filter_countA | 按条件统计行数 —— 只返回计数,不返回数据行。 用途:回答"有多少条满足 X"这类问题。计数在服务端完成, 绝不会把成千上万行搬进上下文。 参数:
返回:matched_rows、matched_pct、少量样例,以及等价的 Excel COUNTIFS 公式 (可粘回表格动态更新)。 |
| aggregateA | 服务端聚合:sum / mean / median / min / max / count / std / var / nunique。 关键:聚合在服务端算好,只回传"每组一个数字"。 不要让模型自己遍历数据求和 —— 大数相加模型极易算错。 参数:
返回:聚合值或分组表,附 tsv(可直接粘回 Excel)与等价 Excel 公式。 |
| top_nA | 取排序后的前 N 行(默认降序),只回传这 N 行。 用途:排行榜类问题("销售额前 10 的产品")。 排序在服务端完成,只把 TopN 行回传,而不是把全表交给模型排序。 参数:
返回:带 rank 的行列表、tsv、以及等价的 Excel RANK 公式。 |
| recalculateA | 重算公式并扫描错误 —— 交付前必做的验证步骤(差异化能力,多数同类项目不支持)。 为什么需要它:openpyxl 写入的公式不带计算结果, 直接用 read_range 读会返回 None。重算能填上缓存值并暴露公式错误。 安全护栏(汲取官方 xlsx skill 的 recalc 思想):
参数:
返回:total_errors、errors_by_type(含位置)、以及"重算通过≠结果正确"的提醒。 环境未装 LibreOffice 时会明确告知,不会静默假装成功。 |
| scan_formula_errorsA | 只扫描公式错误(#VALUE! / #DIV/0! / #REF! / #NAME? / #NULL! / #NUM! / #N/A),不重算。 用途:快速体检现有文件是否有坏公式。 返回 total_errors 与按类型分组的位置明细;位置列表超过 100 条时会 明确说明被截断数量(请以 total_errors 为准,不要以列表长度判断严重程度)。 |
| apply_chinese_styleA | 套用中文场景样式:中文字体表头、自动列宽(中文按 2 字符宽)、冻结首行、细边框。 为什么需要它:通用规范常推荐 Arial/Times New Roman,但对中文表格并不适用。 本工具默认使用微软雅黑(屏幕阅读友好),并让中文列宽自适应(中文按 2 字符宽计算)。 参数:
|
| set_number_formatB | 设置数字格式。 number_format 可传内置名或自定义格式码:
|
| add_chartA | 插入图表(差异化能力:官方 xlsx skill 无图表指导,竞品 knorq 明确不支持图表)。 参数:
|
| create_pivotA | 生成透视汇总表(写入新工作表)。 ⚠️ 诚实说明:openpyxl 无法创建真正可交互的 PivotTable 对象, 本工具生成的是静态汇总表(分组聚合后写回),数值等价但不可交互。 需要可交互透视表时,请在 Excel 中基于结果表插入。 参数:
|
| add_conditional_formatA | 添加条件格式(openpyxl 原生规则,真实生效)。 cond_type 可选:
参数:
|
| create_interactive_pivotA | Create an INTERACTIVE PivotTable (a real Excel PivotTable object). Difference from
Args:
LIMITATIONS:
|
| list_conditional_formatsA | 读取工作表中已有的条件格式规则(写入 + 读取闭环)。 用途:接手一张别人的表时,先看清它埋了哪些自动规则(哪些格子会变色/变红), 避免修改时破坏既有规则。 返回:规则条数与明细(作用区域 / 类型 / 运算符 / 阈值公式 / 填充色 / 优先级), 按优先级排序。 |
| compare_sheetsA | 按关键列比对两个工作表的差异 —— 只回传差异摘要,不回传整表。 用途:版本对比、变更检测、对账。 返回:仅在表1 / 仅在表2 / 值有差异 三类统计, 以及最多 max_diff 条差异明细(超出会明确说明截断数量,以统计值为准)。 |
| join_sheetsA | 关联两个工作表(类似 SQL JOIN),只回传前 limit 行结果。 参数:
|
| revert_last_writeA | 回滚最近一次由本服务执行的写入(用 .bak 恢复)。 当 write_cells 的结果不符合预期时调用它撤销。 只保留最近一次备份,连续写入时回滚的是最后一次。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 20 tools
Each tool targets a distinct operation: reading, writing, formatting, analysis, or structure inspection. Even similar tools like recalculate vs. scan_formula_errors and create_pivot vs. create_interactive_pivot are explicitly contrasted in their descriptions, making misselection unlikely.
The majority follow a clear verb_noun pattern (write_cells, add_chart, compare_sheets, revert_last_write). Minor deviations like workbook_info, sheet_profile, aggregate, and top_n break the pattern slightly, but they are still readable and predictable.
With 20 tools, the server covers a broad Excel domain including writing, reading, formatting, formula handling, charting, pivots, and data analysis. While slightly heavier than the typical 3-15 range, each tool serves a distinct purpose and the count feels justified for a comprehensive Excel MCP.
The tool surface is strong for reading, writing, analysis, and formatting. Minor structural gaps exist—there is no direct way to delete/insert rows or columns or merge cells—but these can be worked around with write_cells and are not core to the server's apparent emphasis on data analysis and formatting.