Design
Génère des codes QR à partir d'URL ou de texte avec taille et couleurs personnalisables
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'https://api.elysiatools.com/fr/api/tools/qr-code-generator' \
-H 'Content-Type: application/json' \
-d '{"text":"Enter text, URL, or any content to encode in QR code","size":200,"errorCorrectionLevel":"M","margin":4,"color":"#000000","backgroundColor":"#FFFFFF","format":"png"}'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/qr-code-generator| Nom | Type | Requis | Description |
|---|---|---|---|
| text | textarea | Oui | — |
| size | number | Non | — |
| errorCorrectionLevel | select | Non | — |
| margin | number | Non | — |
| color | color | Non | — |
| backgroundColor |
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-qr-code-generator": {
"name": "qr-code-generator",
"description": "Génère des codes QR à partir d'URL ou de texte avec taille et couleurs personnalisables",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=qr-code-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": "qr-code-generator",
"arguments": {
"text": "Enter text, URL, or any content to encode in QR code",
"size": 200,
"errorCorrectionLevel": "M",
"margin": 4,
"color": "#000000",
"backgroundColor": "#FFFFFF",
"format": "png"
}
}
}Des questions ou un problème ? Contactez [email protected]
| color |
| Non |
| — |
| format | select | Non | — |
Résultat image
{
"result": "/public/processing/randomid.jpg",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"width": 800,
"height": 600,
"format": "jpeg"
}
}