Document Tools
Génère un PDF avec table des matières et pages de section
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'https://api.elysiatools.com/fr/api/tools/pdf-section-toc-generator' \
-H 'Content-Type: application/json' \
-d '{"sections":"Introduction|2\nMethods|3\nResults|4\nDiscussion|2\nAppendix|1","tocTitle":"Table of Contents","startPageNumber":2,"pageSize":"A4","orientation":"portrait","marginTop":72,"marginBottom":72,"marginLeft":72,"marginRight":72,"tocTitleSize":20,"tocEntrySize":12,"sectionTitleSize":24,"showLeaders":true,"leaderStyle":"dots","showPageNumbers":true}'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/pdf-section-toc-generator| Nom | Type | Requis | Description |
|---|---|---|---|
| sections | textarea | Oui | — |
| tocTitle | text | Non | — |
| startPageNumber | number | Non | — |
| pageSize | select | Non | — |
| orientation | select | Non | — |
| marginTop |
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-pdf-section-toc-generator": {
"name": "pdf-section-toc-generator",
"description": "Génère un PDF avec table des matières et pages de section",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-section-toc-generator",
"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": "pdf-section-toc-generator",
"arguments": {
"sections": "Introduction|2\nMethods|3\nResults|4\nDiscussion|2\nAppendix|1",
"tocTitle": "Table of Contents",
"startPageNumber": 2,
"pageSize": "A4",
"orientation": "portrait",
"marginTop": 72,
"marginBottom": 72,
"marginLeft": 72,
"marginRight": 72,
"tocTitleSize": 20,
"tocEntrySize": 12,
"sectionTitleSize": 24,
"showLeaders": true,
"leaderStyle": "dots",
"showPageNumbers": true
}
}
}| number |
| Non |
| — |
| marginBottom | number | Non | — |
| marginLeft | number | Non | — |
| marginRight | number | Non | — |
| tocTitleSize | number | Non | — |
| tocEntrySize | number | Non | — |
| sectionTitleSize | number | Non | — |
| showLeaders | checkbox | Non | — |
| leaderStyle | select | Non | — |
| showPageNumbers | checkbox | 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)"
}Des questions ou un problème ? Contactez [email protected]