Skip to main content
Glama

PDF to HTML

PDFtoHTML
Read-only

PDF to HTML: PDF to HTML converts the pages of a PDF, uploaded or fetched from a URL, into one self-contained HTML file that looks like the original: same layout, embedded fonts and images, and real selectable text. Choose a page range, unlock password-protected PDFs, or ask for text only; long documents are converted in batches, with nextPage pointing to the next one. (Cost: 20 credits) REST: POST https://api.apiverve.com/v1/pdftohtml, multipart/form-data with the file in "pdf" and other params as form fields, key in the x-api-key header. Docs: https://apiverve.com/md/marketplace/pdftohtml.md

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "PDFtoHTML"
  }
}

Input Schema

NameRequiredDescriptionDefault
pdfNoThe PDF file to convert (up to 10 MB), or a public PDF URL
pagesNoOne page or range: 3, 2-7, or 5- for page 5 onwards. Each call converts up to 10 pages (2 on the Free plan) from the start of the range; nextPage says where to continue1-
passwordNoUser or owner password of an encrypted PDF
textOnlyNoLeave out images and vector graphics and keep only the positioned text in its fonts

Output Schema

NameRequiredDescriptionDefault
dataNo
errorNoError message, null on success
statusNo"ok" on success

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the 20-credit cost, the 10 MB input cap, per-call page limits (10, or 2 on Free), and the nextPage continuation mechanism for long documents. It also gives the REST endpoint, multipart form field name, and API-key header, which are operationally important. It stops short of describing error or failure behavior for encrypted or malformed PDFs.

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?

Front-loads the core transformation and output shape, then layers options, batching, cost, and endpoint details. Dense but each clause carries information; the API/docs tail is practical rather than filler, though the single long sentence-plus-parenthetical structure could be broken up for scanability.

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?

For a four-parameter conversion tool with annotations and an output schema, the definition covers cost, size limits, batching continuation, encryption handling, and invocation mechanics. Nothing an agent needs in order to call it correctly and interpret the result is missing.

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 already 100%, so the baseline is 3, but the description adds real meaning by tying 'pages' to the batch model: each call converts up to 10 pages from the start of the range and nextPage says where to resume. It also clarifies that the input can be an uploaded file or a fetched public URL, and that textOnly drops images and vector graphics.

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?

Names a specific verb and resource (converts PDF pages) and pins down the output precisely: one self-contained HTML file with original layout, embedded fonts/images, and selectable text. That output-format detail is what distinguishes it from siblings like PDFtoText or PDFtoImage without needing to name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description lists capabilities (page range, password unlock, text-only) and notes batching for long documents, which implies usage but never states when to pick this over PDFtoText or PDFtoImage. No explicit when-not or alternative-routing guidance is given.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.