Skip to main content
Glama

Make a PDF

documents_create_pdf

A PDF from Markdown or HTML, saved in the file store with a download link. Markdown gets a clean document style (headings, tables, lists); HTML is printed the way Chrome prints it, without running JavaScript. Images must be public https links or data: URLs. Give exactly one of markdown or html. Costs $0.005 per call; nothing if it fails.

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": {
      "name": "<name>"
    },
    "name": "documents_create_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssNoExtra CSS, e.g. a font size or a logo.
htmlNo
nameYesName for the new file, e.g. "Quote 1042.pdf".
paperNoa4
markdownNo
landscapeNo
margin_mmNo
link_hoursNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Goes well beyond the annotations: rendering semantics (Chrome print engine, JavaScript not executed), image source limits, durable output with an expiring download link, and explicit billing ('$0.005 per call; nothing if it fails'). These are exactly the traits an agent cannot infer from readOnlyHint=false / destructiveHint=false / openWorldHint=false.

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?

Four compact sentences, front-loaded with the outcome (PDF in file store), then styling rules, then constraints, then cost. Every sentence carries information an agent needs and nothing is padded.

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

Completeness4/5

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

No output schema exists, and the description does mention the artifact and download link, which covers the return value adequately. The gap is the undocumented layout parameters (paper, margin_mm, landscape) and, notably, link_hours, whose expiration window is only hinted at by 'download link'.

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 coverage is only 25% (just name and css are described), so the description must compensate and it does so only partly. It clarifies the markdown/html exclusivity and image rules, but paper, margin_mm, landscape, and link_hours receive no explanation in either place.

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?

It states a concrete verb and resource ('A PDF from Markdown or HTML') plus where the result lands ('saved in the file store with a download link'). It does not distinguish itself from the sibling documents_convert_to_pdf, which an agent choosing between the two would need.

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?

'Give exactly one of markdown or html' is a real input rule, and the image URL constraint guides how to prepare content. But there is no statement of when to pick this over documents_convert_to_pdf or documents_merge_pdfs, and no preconditions beyond input shape.

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.

Resources