Skip to main content
Glama

Extract text from a PDF (page-by-page)

obsidian_read_pdf
Read-onlyIdempotent

Extracts plain text from PDF files, returning per-page content, full text, and document metadata. Supports optional page ranges and detects image-only PDFs for OCR recommendation.

Instructions

Extracts plain text from one PDF, returning per-page text + a full_text join + doc-level metadata (title/author/subject/etc). Image-only / scanned PDFs surface has_text: false so agents can detect-and-recommend OCR via obsidian_ocr_pdf (v2.10.0). Optional pages slice (1-indexed inclusive range) for partial reads of long documents. Read-only. Same path-safety + privacy filter as obsidian_read_note. Powered by Mozilla's PDF.js (Apache-2.0).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesVault-relative path of the .pdf file (with or without .pdf)
pagesNoOptional 1-indexed inclusive page range, e.g. [2, 5] reads pages 2..5
include_metadataNoInclude doc-level metadata in result (default true)
Behavior5/5

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

Beyond annotations (readOnlyHint, idempotentHint), description adds that it's read-only, has same path-safety and privacy filter as obsidian_read_note, and is powered by Mozilla's PDF.js. No contradiction.

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?

Three concise sentences, front-loaded with main action, then edge case, then implementation details. No redundant words.

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?

Despite no output schema, description adequately describes return structure (per-page, full_text, metadata, has_text flag). All 3 parameters are clarified. Tool context is complete.

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 meaning: pages parameter explained as 1-indexed inclusive range for partial reads; path parameter implied to follow safety filter. Adds value beyond schema.

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 explicitly states it extracts plain text from one PDF, returning per-page text, full_text, and doc-level metadata. It distinguishes from sibling obsidian_ocr_pdf for scanned PDFs.

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?

Describes when to use obsidian_ocr_pdf for scanned PDFs (has_text: false). Mentions optional pages for partial reads. Does not explicitly state when not to use, but provides clear alternative context.

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/oomkapwn/enquire-mcp'

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