Skip to main content
Glama

pdf_to_json

Converts PDF documents into structured JSON containing text, page statistics, and metadata so you can parse or index PDF content programmatically.

Instructions

Converts a PDF document into structured JSON with text, page statistics, and metadata.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "input": "<input>",
      "output": "<output>"
    },
    "name": "pdf_to_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesThe input PDF file path.
outputYesThe output JSON file path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does not say whether the output file is overwritten, whether conversion is lossy (layout, tables, scanned/image-only PDFs), what happens on failure, or what 'page statistics' means — significant gaps for a file-writing tool.

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?

A single front-loaded sentence with no filler; the output contents are stated immediately after the action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description is the only source on return values, and listing text, page statistics, and metadata partially covers that. It is still thin for a converter with no annotations and no disclosure of failure modes or fidelity limitations.

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 both 'input' and 'output' paths are already documented in the schema. The description adds nothing about path constraints or overwrite semantics, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Converts a PDF document') and names the output shape ('structured JSON with text, page statistics, and metadata'). It does not distinguish itself from siblings like pdf_to_markdown or pdf_to_html, so an agent must infer the choice from the format alone.

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

Usage Guidelines2/5

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

No guidance on when to use this versus the many sibling converters, no prerequisites, and no note that both paths must be local files against an existing output location. Usage is only implied by the tool name.

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