Skip to main content
Glama

import_xlsx

Import an Excel workbook into a normalized workspace: merge multi-row headers, detect numeric patterns, and generate JSON tables. Use check mode to validate spreadsheet structure before import.

Instructions

从本地 xlsx 文件(绝对路径)导入并创建工作区:读取工作簿全部 sheet(或 sheets 参数指定子集),双行表头自动合并为「父.子」复合列名,数值列自动识别等差/等比/常数模式,装配为规范化 tables/*.json + workspace.json 并设为当前工作区。headerRows 缺省由启发式探测(结果随摘要回显,探测失误可显式指定 1/2 重试);同名工作区整体覆盖重建。mode=check 只做九规则格式检查(表头结构/类型合法性/外部工作簿引用/公式结构一致性——含公式矩阵 cell.f),不建工作区,返回 findings 清单。导入后即可用 list_tables / read_table / audit_column / export_table 等工具审计导出。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoimport(缺省)= 建工作区;check = 只跑九规则格式检查不建工作区(导表前体检)
sheetsNo导入 sheet 子集与覆盖(可选;缺省导入全部 sheet,module=import,headerRows 自动探测)
xlsxPathYes本地 xlsx 文件绝对路径(Windows 正反斜杠均可,内部归一)
workspaceNameNo工作区名(可选;缺省取文件名去扩展名。仅允许字母/数字与 -._,首字符须为字母/数字)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations present, the description carries full weight for behavioral disclosure. It explicitly discloses the destructive behavior ('同名工作区整体覆盖重建'), the non-destructive check mode, the heuristic headerRows detection plus retry fallback, the auto-merging of two-row headers, and the side-effect of setting the current workspace. This is unusually transparent for a tool with no 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 dense but well-organized, front-loading the primary purpose (import and create workspace) before detailing modes, parameter behavior, and post-import usage. Every clause carries useful information, though the long first sentence with many subordinate clauses makes it slightly harder to parse quickly than a bulleted structure would be.

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 tool's complexity (two modes, heuristic behavior, destructive overwrite, normalized output artifacts), the description covers most of what an agent needs: input path, sheet selection, header handling, check-mode behavior, and follow-up tool suggestions. There is no output schema, and the description does not fully specify the return shape for the import mode beyond mentioning echo and findings; slightly more detail about the success response would make it 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 100%, so the baseline is 3. The description adds meaningful semantic context beyond the schema: it explains why headerRows matters (double-row headers become 'parent.child' composite names), what mode=check actually validates, and that same-name workspaces are overwritten. It doesn't add much about workspaceName or sheets beyond what the schema already states, but the added behavioral context raises it above baseline.

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 states a specific verb ('import'), a concrete resource ('local xlsx file absolute path'), and the resulting artifact ('normalized tables/*.json + workspace.json'). It clearly distinguishes itself from the post-import sibling tools by noting those are usable after import, and it enumerates its two modes (import vs check) so an agent knows exactly what the tool does.

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 gives clear context for when to use the tool: to build a workspace from an xlsx file, and mode=check as a pre-import validation step. It also names downstream tools (list_tables, read_table, audit_column, export_table) that should be used after import. It does not explicitly explain when not to use this tool or name direct alternatives, but the mode distinction provides solid practical guidance.

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