Skip to main content
Glama

자료 파일 읽기

read_document
Read-only

Reads PDFs, HWP/HWPX, Office files, images, and text from the materials folder, lists available files when no path is given, and extracts selected PDF pages or page images.

Instructions

Read files the user put in the materials folder: PDF, Korean HWP/HWPX, docx, pptx, xlsx, txt/md/csv, png/jpg. No path: list files and the folder location. PDF: pages ("1-3,7"); mode="images" returns page images (scans, formula-heavy pages). Long text: part=2, 3, … Example: {"path": "physics/ch3.pdf", "pages": "1-5"} On failure: outside the folder or unsupported → ask the user to put the file there or save it as PDF.

Input Schema

NameRequiredDescriptionDefault
modeNotext
partNo
pathNoFile in the materials folder; empty = list files
pagesNoPDF pages, e.g. "1-3,7"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description adds the meaningful constraint that access is sandboxed to the materials folder plus the exact failure behavior for out-of-folder or unsupported files. It does not state whether listing includes file sizes or how part boundaries are computed, so it stops short of full behavioral disclosure.

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?

Terse, front-loaded lines: purpose first, then the no-path case, then PDF paging, image mode, long-text paging, a concrete example, and failure handling. Every line carries information, though the telegraphic fragments ("No path: list files") are slightly terse for a first-time reader.

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 no output schema, the description does the work of indicating what comes back (a file listing, page images, paginated text), which covers the main return shapes for a four-parameter read tool. Remaining gaps are minor: whether image mode returns paths or inline images, and how large a part is.

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 only 50% (path and pages are documented, mode and part are not), but the description compensates by explaining that mode="images" returns page images and that part=2, 3… pages through long text. It adds real meaning beyond the schema, though the enum semantics of mode="text" and how part interacts with pages are left implicit.

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 opens with a specific verb+resource ("Read files the user put in the materials folder") and enumerates the exact supported formats (PDF, HWP/HWPX, docx, pptx, xlsx, txt/md/csv, png/jpg). None of the siblings (render_tikz, plot_data, export_document, etc.) do file reading, so the boundary is unambiguous.

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?

It gives explicit branch conditions: empty path lists files instead of reading, pages syntax for PDFs, mode="images" for scans and formula-heavy pages, part=N for long text. It also supplies a when-not path ("outside the folder or unsupported → ask the user to put the file there or save it as PDF"), which is unusually complete routing guidance.

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