Skip to main content
Glama

json_to_pdf

Convert structured JSON text and embedded images into a publication-ready PDF with preset or custom CSS, selectable page size, and portrait or landscape orientation.

Instructions

Synthesizes a publication-ready PDF document from structured JSON text and embedded images

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": "json_to_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesPath to input file
outputYesPath to output PDF file
presetNoCSS preset (github, elegant, minimal, branded, compact)
page_sizeNoPage size format (e.g. A4, Letter)
custom_cssNoCustom CSS rules to apply
orientationNoPage orientation (portrait or landscape)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/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 disclosure burden, and it covers very little. "Publication-ready" and "embedded images" hint at rendering fidelity and image handling, but nothing is said about what the JSON must contain, whether an existing file at `output` is overwritten, what happens on invalid JSON, or whether failures are atomic. For a tool that writes a file to disk with zero annotation coverage, this is a meaningful gap.

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?

A single front-loaded sentence with no filler or redundancy, so nothing needs cutting. It is efficient, but the terseness comes at the cost of substance that the completeness dimension penalizes rather than this one.

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

Completeness2/5

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

With six parameters, no output schema, and no annotations, the description should describe the expected JSON input structure at least in outline. Instead it is one sentence that leaves the core contract — what `input` must actually contain — undefined, and it is inconsistent with the schema, which describes `input` as a "Path to input file" while the description says "structured JSON text."

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 the schema already explains all six parameters including the preset list and page_size format, making 3 the baseline. The description adds only the indirect hint that the input carries embedded images and that output should be publication-grade; it says nothing about how preset, custom_css, and orientation interact or which wins.

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?

The description pairs a specific verb ("Synthesizes") with a specific artifact ("publication-ready PDF document") and names the source format ("structured JSON text and embedded images"). That source-format qualifier implicitly separates it from the html_to_pdf / md_to_pdf / img_to_pdf siblings, though it never states the distinction explicitly.

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?

There is no when-to-use, when-not-to-use, or alternative-tool guidance at all. An agent must infer from the input format alone that JSON source belongs here and Markdown/HTML belong to md_to_pdf or html_to_pdf; nothing in the text confirms that routing.

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