Skip to main content
Glama

Convert PDF to text representation

convert_pdf
Read-onlyIdempotent

Convert PDFs to structured text for LLM ingestion: markdown, token chunks, or heading-aware semantic chunks for retrieval.

Instructions

Convert a whole PDF into a text representation for downstream LLM use.

Returns JSON: {content, format} for 'markdown', or {chunks, format} for 'chunks'/'rag' (each chunk carries its index and page_numbers; rag chunks add token_estimate and heading_context). Read-only.

Use this when you need structure or chunking. If you just want the raw reading text use extract_text; for per-run coordinates use extract_entities.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the PDF file, relative to the configured workspace.
formatYesOutput representation: 'markdown' = one structured Markdown document; 'chunks' = fixed-size token windows; 'rag' = heading-aware semantic chunks for retrieval pipelines.
passwordNoUser password to unlock an encrypted PDF before conversion.
max_tokensNoTarget maximum tokens per chunk. Applies to format='chunks' and 'rag' only; ignored for 'markdown'.
overlapNoToken overlap carried between consecutive chunks. Applies to format='chunks' only; ignored for 'markdown' and 'rag'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true. The description adds the return JSON structure details and explicitly states 'Read-only.' No contradictions. It provides useful behavioral context beyond annotations.

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?

Two short paragraphs, front-loaded with purpose and output details, then usage guidance. Every sentence earns its place with no redundancy.

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 the tool has 5 parameters, 100% schema coverage, and an output schema exists, the description adequately covers purpose, output types, usage guidance, and behavioral notes. It is complete without needing to describe return values in detail.

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?

Schema description coverage is 100%, so baseline is 3. The description does not add additional meaning to parameters beyond what is in the schema; it focuses on output formats. Schema already has good parameter descriptions.

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 it converts a PDF to text representation and specifies the output formats (markdown, chunks, rag). It distinguishes from sibling tools like extract_text and extract_entities by noting when each should be used.

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?

Explicitly provides when-to-use and when-not-to-use guidance: 'Use this when you need structure or chunking. If you just want the raw reading text use extract_text; for per-run coordinates use extract_entities.'

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/bzsanti/oxidize-python'

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