Skip to main content
Glama

format_scan

【本服务独有】扫描工作表的格式语义,支持按语义筛选与统计。

Instructions

【本服务独有】扫描工作表的格式语义,支持按语义筛选与统计。

为什么需要它:主流 Excel MCP 把「删除线 / 高亮 / 字体色」当作样式, 读出来是一模一样的字符串 —— 它们看不出作者标了"这一行作废了"。 duduExcel 把格式当作语义,本工具进一步让它可统计、可查询。

典型用途:

  • 「这张表有多少行被标记作废了?」→ semantic="S"

  • 「哪些格子是重点高亮的?」→ semantic="HL"

  • 「先看看这张表用了哪些语义标记」→ 不传 semantic,只看统计

参数:

  • file_path:工作簿路径

  • sheet:表名(省略则用活动表)

  • semantic:按语义筛选,可选 S(删除线/作废) / B(粗体) / I(斜体) / HL(底色高亮) / C(字体色) / M(合并单元格)

  • max_cells:最多返回多少个命中单元格(超出会说明截断数量,以统计值为准)

返回:semantic_counts(各类语义的数量)、hits(命中明细,含坐标与值)、 以及每种语义的业务含义提示(hint)。

Input Schema

NameRequiredDescriptionDefault
sheetNo
semanticNo
file_pathYes
max_cellsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does so reasonably: it discloses the return shape (semantic_counts, hits, per-semantic hints) and the truncation behavior of max_cells ('超出会说明截断数量,以统计值为准'). It does not state whether the operation is read-only in explicit safety terms, but the read-only nature is strongly implied and no behavior is contradicted.

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?

Front-loads the purpose, then usage, params, and returns in a scannable structure. The '为什么需要它' section has a mild marketing tone and is slightly longer than strictly necessary, but it does earn its place by explaining the semantic-vs-style distinction.

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?

For a 4-parameter tool with no output schema and no annotations, the description covers parameters, filtering, return contents, and truncation behavior, which is a lot of the required context. It stops short of stating read-only safety or performance limits beyond max_cells, leaving a small gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet the description fully compensates by documenting all four parameters, including the complete enum of semantic values (S/B/I/HL/C/M) with their meanings ('S(删除线/作废)', 'HL(底色高亮)'), which the schema does not express at all. This is exactly the value a description should add over a bare schema.

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?

Specific verb+resource ('扫描工作表的格式语义') with clear scope: filter by semantic and produce statistics. It explicitly positions itself against sibling/competitor tools by explaining that it treats formatting as semantic rather than opaque style strings, so an agent can tell it apart from scan_formula_errors or list_conditional_formats without opening a schema.

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?

Provides three concrete '典型用途' scenarios, including the important when-not case of omitting semantic to get an overview ('先看看这张表用了哪些语义标记'). It does not, however, name a sibling tool as the alternative when the agent wants formula errors or conditional formats, so an explicit alternative comparison is missing.

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