Document Tools
Mise en page de chat multi-role en PDF
Appelez cet outil depuis votre code en trois langages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/chat-transcript-to-pdf' \
-F 'file=@/path/to/transcriptFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/fr/api/tools/chat-transcript-to-pdf' \
-F 'transcriptJson={"messages":[{"role":"user","content":"Status update?"},{"role":"assistant","content":"Deployment complete."}]}' \
-F 'transcriptFile=/path/to/file.ext' \
-F 'title=Ops Chat' \
-F 'showTimestamps=false' \
-F 'accentColor=#2a5d6f' \
-F 'userBubbleColor=#d5e8f1' \
-F 'assistantBubbleColor=#f3e6d2' \
-F 'systemBubbleColor=#efefef' \
-F 'baseFontSize=12' \
-F 'pageSize=A4' \
-F 'landscape=false' \
-F 'printBackground=true' \
-F 'marginTop=16' \
-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/chat-transcript-to-pdf| Nom | Type | Requis | Description |
|---|---|---|---|
| transcriptJson | textarea | Non | — |
| transcriptFile | fileupload requis | Non | — |
| title | text | Non | — |
| showTimestamps | checkbox | Non | — |
| accentColor | color | Non | — |
| userBubbleColor | color | Non | — |
| assistantBubbleColor | color | Non | — |
| systemBubbleColor | color | 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-chat-transcript-to-pdf": {
"name": "chat-transcript-to-pdf",
"description": "Mise en page de chat multi-role en PDF",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=chat-transcript-to-pdf",
"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": "chat-transcript-to-pdf",
"arguments": {
"transcriptJson": "{\"messages\":[{\"role\":\"user\",\"content\":\"Status update?\"},{\"role\":\"assistant\",\"content\":\"Deployment complete.\"}]}",
"transcriptFile": "https://example.com/file.ext",
"title": "Ops Chat",
"showTimestamps": false,
"accentColor": "#2a5d6f",
"userBubbleColor": "#d5e8f1",
"assistantBubbleColor": "#f3e6d2",
"systemBubbleColor": "#efefef",
"baseFontSize": 12,
"pageSize": "A4",
"landscape": false,
"printBackground": true,
"marginTop": 16,
"marginBottom": 18,
"marginLeft": 16,
"marginRight": 16,
"waitUntil": "networkidle0",
"waitTime": 0
}
}
}Des questions ou un problème ? Contactez [email protected]