Skip to main content
Glama
ymylive
by ymylive

read_doc

Read-onlyIdempotent

Read local files or HTTP(S) documents (PDF, DOCX, text) into Markdown. Uses character offset pagination for long content. Avoid raw HTML; use fetch for web pages.

Instructions

Read a local file or http(s) document into Markdown.

Best for:
- Local or remote PDFs and DOCX (parsed locally, no remote API).
- Local text/HTML/Markdown files the user pointed at.
- Paginating through a long document via `start` / `length`.

Not recommended for:
- Arbitrary HTML web pages -> `fetch` does reader-mode cleanup that this
  tool does not.
- Pages discovered through search -> `fetch` or `research`.

Returns:
- markdown (default): rendered document text with a small header.
- json: {content, title, format, total_chars, start, returned_chars,
  truncated}. Use `total_chars` and `returned_chars` to drive pagination.

Common mistakes:
- Calling this on a normal article URL — you'll get raw HTML noise; use
  `fetch` instead.
- Forgetting to advance `start` when paginating: next call should pass
  `start = previous_start + returned_chars`.

Args:
    source: Local path (e.g. "~/papers/x.pdf") or http(s) URL.
    start: Character offset to begin reading from. Default 0.
    length: Max characters to return; None = read to end (still capped
        by per-call max content size).
    format: "markdown" or "json".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
startNo
lengthNo
formatNomarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

ReadOnlyHint and idempotentHint are already set in annotations, so description focuses on other behaviors. It clarifies that parsing is local (no remote API), documents format and return fields, and pagination behavior (use total_chars and returned_chars). Only minor gap: no mention of max content size cap for length parameter, but overall strong.

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?

Well-structured with sections (Best for, Not recommended, Returns, Common mistakes, Args). Each sentence is informative with no fluff. Front-loaded with core action and concise use cases.

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?

Given output schema exists (return fields described), annotations provide readOnly/idempotent, and the description covers usage, parameters, and common pitfalls, it is complete for the tool's complexity. No gaps identified.

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 0%, so description compensates well: explains each parameter (source, start, length, format) with context like default values and how to paginate. Only minor: could mention that source supports specific protocols, but it says 'Local path or http(s) URL' which is sufficient.

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 it reads local files or http(s) documents into Markdown. Identifies specific file types and distinguishes from siblings by explicitly saying it's for PDFs/DOCX/HTML local files, while not for arbitrary web pages (which fetch handles).

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?

Excellent usage guidelines: best for local/remote PDFs/DOCX, not for arbitrary HTML pages (use fetch) or pages from search. Explicitly mentions common mistakes like calling on normal articles or forgetting to advance start. Clear when-not-to-use and alternatives.

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/ymylive/free-search-mcp'

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