Skip to main content
Glama

python_to_txt

Scans all Python files in the current directory, extracts their code, and merges into a single text file with clear separators for code review, AI context input, or archiving.

Instructions

扫描当前目录下所有 .py 文件(递归),提取每个文件的代码内容,合并输出到一个文本文件中。格式:每个文件以【相对路径】和【代码】标记分隔。适用于:代码审查、准备 AI 上下文输入、代码汇总存档。无参数,默认扫描当前目录,输出到 output_py_files.txt。自动跳过 .venv、pycache、.git 目录及 .gitignore 中忽略的内容。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo
Behavior4/5

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

Discloses key behaviors: recursive scanning, skipping .venv/__pycache__/.git, respecting .gitignore, output file name, and format markers. However, it claims 'no parameters' while the schema includes an optional 'args' parameter, a slight inconsistency that reduces transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Compact and well-structured: the description front-loads the core action, then format, use cases, and exclusions. Every sentence adds value, with no redundancy or filler.

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?

For a simple tool with one optional parameter and no output schema, the description is comprehensive. It covers input scope, processing behavior, output format, excluded directories, and applicable use cases, making it sufficient for an agent to understand and invoke the tool.

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?

The description says no parameters are needed and defaults to the current directory, which clarifies usage, but it doesn't explain the existing 'args' field. With 0% schema coverage, the description could better compensate by addressing what the parameter might do or why it exists.

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's function: scanning .py files recursively, extracting code, and merging into a text file. It distinguishes from sibling tools like xlsx_to_txt by explicitly targeting Python files and providing output format details.

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?

Lists specific use cases (code review, AI context input, archive) but doesn't explicitly exclude alternatives or mention when not to use this tool. It provides clear context for when to use it, though it lacks a comparison to sibling tools.

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