Skip to main content
Glama

stagenth · Excel 数据可视化

excel_query

查询 / 过滤 / 分组聚合 Excel,返回**实际数据行(JSON)**供 AI 直接分析(1 credit/次)。

    取数工具,区别于 excel_to_chart(出图)和 excel_inspect(只看结构)。典型用法:
      · 各地区销售额合计:group_by=["地区"], measures=["销售额"], agg="sum"
      · 销量 Top5 商品:group_by=["商品"], measures=["销量"], agg="sum", sort_by="销量", descending=true, limit=5
      · 每类别多少行:group_by=["类别"], agg="count"
      · 筛失败订单明细:filters=[{"column":"状态","op":"eq","value":"失败"}]
    返回 {ok, sheet, mode, columns, total_rows, matched_rows, returned_rows, truncated, rows[]}。
    失败自动退款。
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aggNo聚合方式 sum/avg/count/min/max/median(默认 sum;count=数每组行数、无需 measures)
limitNo最多返回多少行(取前 N / Top-N);硬上限 1000
sheetNo目标工作表名;缺省第一个 sheet。先用 excel_inspect 看列名
columnsNo明细模式:只返回这些列;缺省返回全部列
file_idNo已上传的 Excel 文件 ID(与 data_base64 二选一)
filtersNo行过滤条件(AND 组合),每项 {column, op, value}。op 可选:eq/ne/gt/ge/lt/le/contains/in/notnull/isnull。例:[{"column":"地区","op":"eq","value":"华东"},{"column":"金额","op":"ge","value":1000}]
sort_byNo按哪一列排序(可为分组后的 measure 或 count 列)
group_byNo分组维度列。给了就进聚合模式:按这些列分组,对 measures 求 agg
measuresNo聚合模式:要统计的数值列;缺省=所有数值列
descendingNo降序排序(取 Top-N 常用 true)
data_base64NoExcel(.xlsx) 内容 base64(与 file_id 二选一)

TDQS

A4.5/5.0
Behavior4/5

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

No annotations provided, but description discloses behavioral traits: returns JSON rows, uses 1 credit per call, auto refund on failure, hard limit of 1000 rows. Does not mention if read-only, but implied by name and examples. Adding a note about data safety would be helpful.

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?

Description is well-structured with bullet points and examples. Slightly verbose but every sentence adds value. Could trim redundant phrases but overall appropriate for complexity.

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?

With 11 parameters and no output schema, description covers return format ({ok, sheet, mode, columns, ...}) and explains key param behavior (group_by activates aggregation). Provides enough context for most use cases.

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 baseline is 3. Description adds value with concrete examples (e.g., filter syntax, group_by with measures) and explains the 'agg' default and 'count' usage. Examples illustrate parameter interaction, which is beyond 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?

Description clearly states it queries/filters/groups Excel and returns JSON rows. Distinguishes from siblings 'excel_to_chart' (charting) and 'excel_inspect' (structure only) by saying '取数工具' (data extraction tool) and explaining typical usage.

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?

Provides explicit usage guidelines with multiple examples (e.g., group_by, filters) and states when to use this tool vs alternatives. Mentions '失败自动退款' (auto refund on failure) as a usage note.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.4/5.0
Disambiguation5/5

每个工具都有清晰且独特的用途:inspect查看结构,query查询数据,to_chart生成图表,write写入Excel。描述中明确区分了它们,没有重叠或混淆的可能。

Naming Consistency4/5

命名统一使用'excel_'前缀,后接动词形式(inspect, query, write),但to_chart使用了介词结构,略微打破一致模式。整体仍可预测且清晰。

Tool Count4/5

4个工具覆盖了Excel可视化的核心流程:结构查看、数据查询、图表生成、结果写入。数量适中,没有冗余,但可能缺少合并或格式调整等辅助功能。

Completeness5/5

工具集提供了从探索到输出完整闭环:先inspect了解结构,再用query获取数据,然后用to_chart生成图表,最后用write保存结果。没有明显遗漏,完全满足可视化目标。

Resources