Markdown to PDF
markdown_to_pdfConvert Markdown text or a public Markdown file URL into a Letter-size PDF with tables, code blocks, images, footnotes, and CJK text.
Instructions
Convert Markdown into a PDF (Letter portrait, fixed stylesheet) with tables, code blocks, footnotes, images and CJK text.
The job always runs in the background: this returns a job ID, and the result comes from 'wait_job_completion'.
A successful result can carry warnings (for example an image that could not be loaded was omitted); check them before using the PDF.
Ref: https://developer.pdf.co/api/pdf-from-markdown.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": "markdown_to_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public HTTP(S) URL to a UTF-8 Markdown file (up to 4 MiB). Provide either this or 'markdown', not both. Relative images and links resolve against this URL. | |
| name | No | File name for the output PDF. Defaults to markdown.pdf. (Optional) | |
| api_key | No | PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional) | |
| markdown | No | Markdown text to convert (UTF-8, up to 4 MiB). Provide either this or 'url', not both. Use absolute URLs for images; relative paths cannot be resolved from inline text. | |
| expiration | No | Lifetime of the output link in minutes, from 1 to 10080; the file is deleted afterwards. API default is 60. (Optional) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tips | No | ||
| status | Yes | ||
| content | Yes | ||
| credits_used | No | ||
| credits_remaining | No |