Design
Prévisualisez une paire de polices titre/corps avec du texte réel, tailles, graisses, interlignes, caractères et CSS.
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'https://api.elysiatools.com/fr/api/tools/font-pairing-preview-card' \
-H 'Content-Type: application/json' \
-d '{"headingFont":"Fraunces, Georgia, serif","bodyFont":"Inter, system-ui, sans-serif","sampleText":"Design systems should make the right choice easy.","language":"latin","headingSize":48,"bodySize":18,"headingWeight":700,"bodyWeight":400,"headingLineHeight":1.1,"bodyLineHeight":1.6}'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/font-pairing-preview-card| Nom | Type | Requis | Description |
|---|---|---|---|
| headingFont | text | Oui | — |
| bodyFont | text | Oui | — |
| sampleText | textarea | Oui | — |
| language | select | Non | — |
| headingSize | number | Non | — |
| bodySize |
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-font-pairing-preview-card": {
"name": "font-pairing-preview-card",
"description": "Prévisualisez une paire de polices titre/corps avec du texte réel, tailles, graisses, interlignes, caractères et CSS.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=font-pairing-preview-card",
"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": "font-pairing-preview-card",
"arguments": {
"headingFont": "Fraunces, Georgia, serif",
"bodyFont": "Inter, system-ui, sans-serif",
"sampleText": "Design systems should make the right choice easy.",
"language": "latin",
"headingSize": 48,
"bodySize": 18,
"headingWeight": 700,
"bodyWeight": 400,
"headingLineHeight": 1.1,
"bodyLineHeight": 1.6
}
}
}| number |
| Non |
| — |
| headingWeight | number | Non | — |
| bodyWeight | number | Non | — |
| headingLineHeight | number | Non | — |
| bodyLineHeight | number | Non | — |
Résultat HTML
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Des questions ou un problème ? Contactez [email protected]