Skip to main content
Glama
okra-project

okraPDF PDF MCP server

Official
by okra-project

Upload Document

upload_document

Upload a PDF via URL or base64 bytes to create a document_id for subsequent parsing, extraction, Q&A, and viewing.

Instructions

Upload a PDF from a lawfully-reachable URL or base64 PDF bytes for Gemini Flash VLM extraction when later okraPDF tool calls need a document_id for SQL/search/docs.read, render_ui, view_document/review_extraction, parsed-node verification, or workflow runs. URL ingest is corpus-gated (see internal/content-rights-policy.md): open/public-record sources or docs the user has rights to — not paywalled/license-gated. For such URLs, prefer resolve_pdf_url so the D1 URL registry can reuse prior ingests. If you only need to read or understand PDF content for reasoning, use normal web_fetch/browser reading first; for arXiv papers, prefer arxiv.org/html/... when available. Do not use this for "verify", "cite", "prove", "source", or "where in the PDF" requests; call verify_source directly with pdf_url + page/pages instead. Opens a live document viewer immediately; the app polls status, page images, and extracted blocks as they arrive. Set wait=true only for legacy blocking status behavior.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoLawfully-reachable URL of the PDF (open/public-record source or a doc you have the rights to; not behind a paywall/login). License-gated sources are refused.
dataNoBase64-encoded PDF bytes. MCP-only fallback when no public URL or normal multipart upload handoff exists.
waitNoLegacy blocking mode. Defaults to false so the MCP App opens immediately and polls live document state.
file_nameNoFilename for base64 uploads. Defaults to document.pdf
processorNoOCR processor/vendor id. Defaults to "gemini-vision", the shared Gemini Flash VLM parser used by /v1/parse. Advanced legacy values include "textlayer", "unstructured", "azure-di", and "parse-proxy".
document_idNoCustom document ID (auto-generated if omitted)
page_imagesNoPage image rendering strategy. 'none' = no rendering; 'cover' = page 1 only; 'eager' = ALL pages rendered at upload via the PdfRasterizer Container (default). 'lazy' is a deprecated alias for 'eager'.eager
vendor_optionsNoVendor-specific options passed through to the selected parsing vendor (AI SDK providerOptions pattern).
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses that this opens a live document viewer, polls status/page images, and that wait=true is a legacy blocking mode. It also reveals content-rights constraints (corpus-gated, no paywalled/license-gated sources) and notes that URL ingest is gated by an internal policy.

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?

The description is dense but front-loaded with the core purpose and usage guardrails. While longer than most, every sentence contributes useful guidance (alternatives, legal constraints, live-viewer behavior), so it earns its length without being bloated.

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's complexity (8 params, no output schema, many siblings), the description is remarkably complete. It covers what the tool does, when to use alternatives, legal/access constraints, live behavior, and parameter defaults, leaving little ambiguity for an agent.

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 adds minimal extra meaning beyond the schema—e.g., explaining that data is an MCP-only fallback and clarifying page_images 'eager' default, but these are largely redundant with the schema's own 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 uses a specific verb ('Upload') and resource ('PDF') with a clear purpose: preparing documents for Gemini Flash VLM extraction and providing document_id for downstream okraPDF tools. It distinguishes itself from alternatives like verify_source and resolve_pdf_url, and even states when not to use it.

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?

Provides explicit when-to-use (when document_id is needed for downstream tools) and when-not-to-use (for verify/cite/source requests, prefer verify_source; for simple reading, use web_fetch; for arXiv, use arxiv.org/html). It also names resolve_pdf_url as a preferred alternative for URL ingest and mentions corpus-gating for legal access.

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/okra-project/pdf-mcp'

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