Skip to main content
Glama

read_file_by_markdown

Reads local files or course resources and converts them to Markdown for easy processing and integration.

Instructions

用 markitdown 把文件内容读成 Markdown。

两种模式(传 file_path 优先):
  - file_path:读本地文件。
  - paper_id + filename:读小雅课程资源(同时必填)。
支持 docx/pptx/xlsx/pdf/html/图片 OCR 等常见格式。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paper_idNo资源文件的 paper_id(通过 query_course_resources 获取)
filenameNo资源文件名(通过 query_course_resources 获取)
file_pathNo本地磁盘文件路径
Behavior4/5

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

No annotations provided, but description implies read-only behavior and discloses supported formats. Could be improved by stating behavior on unsupported files or return format, but adequate for a non-destructive tool.

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?

Extremely concise with two short paragraphs and bullet points. Every sentence adds unique information, no redundancy, front-loaded with key action.

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 no output schema or annotations, the description covers inputs, modes, and supported formats well. Lacks description of return value (Markdown string) but is otherwise complete for a read tool.

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%, but description adds value by grouping parameters into modes, clarifying priority (file_path over paper_id+filename), and indicating requiredness. This exceeds the baseline of 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?

Description clearly states the tool reads file content into Markdown using markitdown, specifies two modes (local file or course resource), and lists supported formats. This is a specific verb+resource and distinguishes from sibling tools like download_file.

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 clear guidance on when to use each mode, noting file_path is preferred and paper_id+filename are both required for course resources. Does not explicitly state when not to use, but the context is sufficient for agent decision.

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/Sav1ouR520/xiaoya-teacher-mcp-server'

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