Convert markdown to PDF
convert_to_pdfConverts markdown to a PDF rendered via headless Chrome (tables, code, and typography match the on-site preview) and returns a download URL valid for 10 minutes. For large files, POST to https://md2doc.com/mcp/upload and pass the returned id as markdown_upload_id.
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": "convert_to_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | Optional filename for the download, without the .pdf extension. Defaults to 'document'. | |
| markdown | No | The markdown text to convert. Provide either this OR markdown_upload_id. | |
| markdown_upload_id | No | ID returned by POST /mcp/upload (multipart file field 'file'). Single-use, expires after 10 minutes. |