Document Tools
Genere un PDF de docs depuis les commentaires
Appelez cet outil depuis votre code en trois langages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/doc-comment-to-pdf-docs' \
-F 'file=@/path/to/sourceFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/fr/api/tools/doc-comment-to-pdf-docs' \
-F 'sourceText=/**
* Adds two values
* @param {number} a
* @param {number} b
*/
function add(a,b){ return a+b }' \
-F 'sourceFile=/path/to/file.ext' \
-F 'docTitle=Utility Docs' \
-F 'version=1.0.0' \
-F 'baseFontSize=12' \
-F 'pageSize=A4' \
-F 'landscape=false' \
-F 'printBackground=true' \
-F 'marginTop=18' \
-F 'marginBottom=18' \
-F 'marginLeft=18' \
-F 'marginRight=18' \
-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/doc-comment-to-pdf-docs| Nom | Type | Requis | Description |
|---|---|---|---|
| sourceText | textarea | Non | — |
| sourceFile | fileupload requis | Non | — |
| docTitle | text | Non | — |
| version | text | 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-doc-comment-to-pdf-docs": {
"name": "doc-comment-to-pdf-docs",
"description": "Genere un PDF de docs depuis les commentaires",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=doc-comment-to-pdf-docs",
"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": "doc-comment-to-pdf-docs",
"arguments": {
"sourceText": "/**\n * Adds two values\n * @param {number} a\n * @param {number} b\n */\nfunction add(a,b){ return a+b }",
"sourceFile": "https://example.com/file.ext",
"docTitle": "Utility Docs",
"version": "1.0.0",
"baseFontSize": 12,
"pageSize": "A4",
"landscape": false,
"printBackground": true,
"marginTop": 18,
"marginBottom": 18,
"marginLeft": 18,
"marginRight": 18,
"waitUntil": "networkidle0",
"waitTime": 0
}
}
}Des questions ou un problème ? Contactez [email protected]