Skip to main content
Glama

xlsx_to_txt

Scans directories for .xlsx files, extracting every sheet's content into a formatted text file and filtering empty rows/columns. Converts Excel data to AI-readable plain text for batch extraction.

Instructions

扫描指定目录下所有 .xlsx Excel 文件,生成文件树并提取每个文件的所有 Sheet 内容,以表格格式输出到文本文件。自动过滤全空行/列。适用于:将 Excel 数据转换为 AI 可读的纯文本格式、批量提取表格数据。参数: -d <目录路径> 指定扫描目录(默认当前目录);-o <文件名> 指定输出文件(默认 xlsx_contents.txt);--raw-formulas 提取公式原文(默认提取计算后的值);--max-rows <行数> 限制每个 Sheet 最大读取行数。自动跳过 .venv 目录及 .gitignore 中忽略的内容。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo
Behavior4/5

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

With no annotations, the description discloses key behaviors: automatically filters empty rows/columns, skips .venv and .gitignore, supports raw formula extraction, and has a max rows limit. It does not explicitly state whether it overwrites an existing output file or that source files remain unmodified, but the non-destructive nature is implied by the extraction-to-text purpose.

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 front-loaded with the main purpose and then provides features, use cases, and parameters in a logical order. While slightly verbose (e.g., the '适用于' section somewhat repeats the purpose), every sentence adds valuable information, and the structure is easy to follow.

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 generic schema and no annotations or output schema, the description provides thorough coverage of functionality, parameters, defaults, and filtering behavior. It lacks explicit details about recursion into subdirectories (only says 'all .xlsx in the directory') and whether the output file is overwritten, but these are minor gaps for a conversion tool.

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?

The input schema is a single generic 'args' string with no parameter descriptions, so the description carries the full burden. It explains each CLI flag (-d, -o, --raw-formulas, --max-rows) with defaults and meanings, fully compensating for the schema's lack of detail.

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 clearly states the tool scans all .xlsx files in a directory, extracts all Sheet contents, and outputs them to a text file in table format. It also mentions generating a file tree and filtering empty rows/columns, making it distinct from siblings like tree_to_txt or text_to_txt.

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 explicitly states it is suitable for converting Excel data to AI-readable plain text and batch extracting table data. It does not explicitly name alternatives or exclusions, but the specific file type (.xlsx) and output format make the intended use case clear.

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/Liangbiaoyong/Python_Scripts_MCP'

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