Document Tools
Convertit Markdown en PDF avec thèmes clair, sombre ou impression
Appelez cet outil depuis votre code en trois langages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/markdown-to-pdf-theme-pack' \
-F 'file=@/path/to/markdownFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/fr/api/tools/markdown-to-pdf-theme-pack' \
-F 'markdownContent=# Print Theme
Generated sample content.' \
-F 'markdownFile=/path/to/file.ext' \
-F 'theme=print' \
-F 'baseFontSize=12' \
-F 'pageSize=A4' \
-F 'landscape=false' \
-F 'printBackground=true' \
-F 'marginTop=18' \
-F 'marginBottom=18' \
-F 'marginLeft=16' \
-F 'marginRight=16' \
-F 'waitUntil=networkidle0' \
-F 'waitTime=0'Envoyez une requête POST avec vos entrées en JSON. Les paramètres de type fichier nécessitent un upload préalable.
POST https://api.elysiatools.com/fr/api/tools/markdown-to-pdf-theme-pack| Nom | Type | Requis | Description |
|---|---|---|---|
| markdownContent | textarea | Non | — |
| markdownFile | fileupload requis | Non | — |
| theme | select | Non | — |
| baseFontSize | number | Non | — |
| pageSize | select | Non | — |
| landscape | checkbox | Non | — |
| printBackground | checkbox | Non | — |
| marginTop | number | Non | — |
| marginBottom | number | Non | — |
| marginLeft | number | Non | — |
| marginRight | number | Non | — |
| waitUntil | select | Non | — |
| waitTime | number | Non | — |
Résultat fichier
{
"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)"
}Ajoutez cet outil à votre serveur Model Context Protocol pour que les agents IA puissent le lister et l'appeler.
Ajoutez ce bloc à la configuration de votre client MCP :
{
"mcpServers": {
"elysiatools-markdown-to-pdf-theme-pack": {
"name": "markdown-to-pdf-theme-pack",
"description": "Convertit Markdown en PDF avec thèmes clair, sombre ou impression",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=markdown-to-pdf-theme-pack",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Après connexion au point d'accès SSE, listez les outils exposés :
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Appelez l'outil par son id ; les arguments sont construits à partir de ses paramètres :
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "markdown-to-pdf-theme-pack",
"arguments": {
"markdownContent": "# Print Theme\n\nGenerated sample content.",
"markdownFile": "https://example.com/file.ext",
"theme": "print",
"baseFontSize": 12,
"pageSize": "A4",
"landscape": false,
"printBackground": true,
"marginTop": 18,
"marginBottom": 18,
"marginLeft": 16,
"marginRight": 16,
"waitUntil": "networkidle0",
"waitTime": 0
}
}
}Des questions ou un problème ? Contactez [email protected]