Document Tools
Convert Markdown files to PDF documents with proper formatting, syntax highlighting, and styling
Call this tool from your code in three languages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/markdown-to-pdf-converter' \
-F 'file=@/path/to/file.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/markdown-to-pdf-converter' \
-F 'file=/path/to/file.ext' \
-F 'encoding=auto' \
-F 'fontSize=12' \
-F 'lineHeight=1.6' \
-F 'codeTheme=default' \
-F 'enableSyntaxHighlighting=true' \
-F 'enableLinks=true' \
-F 'enableTables=true' \
-F 'enableImages=true' \
-F 'pageSize=A4' \
-F 'orientation=portrait' \
-F 'title=Enter optional document title' \
-F 'author=Elysia Tools' \
-F 'subject=Converted from Markdown' \
-F 'keywords=markdown,pdf,conversion'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/markdown-to-pdf-converter| Name | Type | Required | Description |
|---|---|---|---|
| file | fileupload required | Yes | — |
| encoding | select | No | — |
| fontSize | number | No | — |
| lineHeight | number | No | — |
| codeTheme | select | No | — |
| enableSyntaxHighlighting | checkbox | No | — |
| enableLinks | checkbox | No | — |
| enableTables | checkbox | No | — |
| enableImages | checkbox | No | — |
| pageSize | select | No | — |
| orientation | select | No | — |
| title | text | No | — |
| author | text | No | — |
| subject | text | No | — |
| keywords | text | No | — |
File result
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-markdown-to-pdf-converter": {
"name": "markdown-to-pdf-converter",
"description": "Convert Markdown files to PDF documents with proper formatting, syntax highlighting, and styling",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=markdown-to-pdf-converter",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "markdown-to-pdf-converter",
"arguments": {
"file": "https://example.com/file.ext",
"encoding": "auto",
"fontSize": 12,
"lineHeight": 1.6,
"codeTheme": "default",
"enableSyntaxHighlighting": true,
"enableLinks": true,
"enableTables": true,
"enableImages": true,
"pageSize": "A4",
"orientation": "portrait",
"title": "Enter optional document title",
"author": "Elysia Tools",
"subject": "Converted from Markdown",
"keywords": "markdown,pdf,conversion"
}
}
}Questions or issues? Contact [email protected]