Document Tools
Convertit URLs et noms de chapitre en liens cliquables
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'https://api.elysiatools.com/fr/api/tools/pdf-link-annotator' \
-H 'Content-Type: application/json' \
-d '{"documentText":"# Guide Overview\nRead https://example.com/docs and jump to [[Chapter 2: API Usage]].\n\n# Chapter 1: Setup\nInstall from https://example.com/setup and continue to Chapter 2: API Usage.\n\n# Chapter 2: API Usage\nAPI details: https://example.com/api\nReturn to [[Chapter 1: Setup]].","pageSize":"A4","landscape":false,"fontSize":12,"lineHeight":1.45,"margin":42,"linkChapterNames":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-link-annotator| Nom | Type | Requis | Description |
|---|---|---|---|
| documentText | textarea | Oui | — |
| pageSize | select | Non | — |
| landscape | checkbox | Non | — |
| fontSize | number | Non | — |
| lineHeight | number | Non | — |
| margin |
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-link-annotator": {
"name": "pdf-link-annotator",
"description": "Convertit URLs et noms de chapitre en liens cliquables",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-link-annotator",
"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-link-annotator",
"arguments": {
"documentText": "# Guide Overview\nRead https://example.com/docs and jump to [[Chapter 2: API Usage]].\n\n# Chapter 1: Setup\nInstall from https://example.com/setup and continue to Chapter 2: API Usage.\n\n# Chapter 2: API Usage\nAPI details: https://example.com/api\nReturn to [[Chapter 1: Setup]].",
"pageSize": "A4",
"landscape": false,
"fontSize": 12,
"lineHeight": 1.45,
"margin": 42,
"linkChapterNames": true
}
}
}| number |
| Non |
| — |
| linkChapterNames | 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]