Skip to main content
Glama
lubo3395
by lubo3395

列出 Excel Sheet

xlsx_list_sheets
Read-onlyIdempotent

List all sheets in an xlsx file with their names, row counts, and column counts.

Instructions

列出 xlsx 文件中所有 sheet 的名称、行数和列数。

参数:

  • file_path (string, 必填): xlsx 文件路径

返回:

  • file_path: 文件路径

  • sheets: Sheet 信息数组

    • name: Sheet 名称

    • rows: 行数

    • cols: 列数

示例:

  • "读取 test.xlsx 有哪些 sheet" -> { file_path: "test.xlsx" }

错误处理:

  • 文件不存在: "文件不存在: <路径>"

  • 不是 xlsx 文件: "不支持的文件格式: <路径>"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesxlsx 文件路径
Behavior4/5

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

注释已声明 readOnlyHint=true、destructiveHint=false、idempotentHint=true,描述在此基础上补充了返回结构(sheets 数组含 name、rows、cols)和错误处理(文件不存在、格式不支持),增强了行为透明性,与注释不矛盾。

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?

描述采用分节结构(功能、参数、返回、示例、错误处理),信息组织清晰且前部加载目的。虽然略冗长,但整体紧凑有效,无冗余句子。

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

对于简单工具,描述完整覆盖了功能、参数、返回值结构、错误情况和示例,结合注释已充分提供上下文。无输出 schema,但描述已明确返回格式,无需额外信息。

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?

输入模式中 file_path 描述已明确,schema 描述覆盖率为 100%,描述仅重复了 file_path 的说明,未增加额外语义,符合基线 3。

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?

描述明确说明了工具的动词(列出)和资源(xlsx 文件中的 sheet),并进一步说明返回名称、行数和列数。与兄弟工具(添加、创建、读取、更新单元格)有清晰区分,提供了具体操作范围。

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

Usage Guidelines2/5

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

描述未说明何时使用此工具而非兄弟工具,也未提供不使用场景或前置条件。虽然错误处理部分提示了文件存在性和格式要求,但缺乏明确的'何时用/何时不用'指导。

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/lubo3395/mcp-xlsx-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server