Health
Convertit la glycémie entre unités conventionnelles (mg/dL) et SI (mmol/L). Le glucose (C₆H₁₂O₆) a une masse molaire de 180.156 g/mol, donc le facteur est fixe : mg/dL × 0.05551 = mmol/L (÷18.0182). Références (ADA / OMS) : glycémie à jeun normale <100 mg/dL (<5.6 mmol/L) ; prédiabète 100–125 (5.6–6.9) ; diabète ≥126 (≥7.0). À 2 h après HGPO 75 g : normale <140 (<7.8) ; IGT 140–199 (7.8–11.0) ; diabète ≥200 (≥11.1). Hypoglycémie <70 (<3.9), sévère <54 ; DKA/HHS souvent >250 / >600. HbA1c ≈ 6.5% équivaut à eAG ~140 mg/dL. Sources : ADA 2024, OMS 2006, Young 1987, StatPearls, ADAG 2008. Non un avis médical.
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'http://127.0.0.1:3003/fr/api/tools/glucose-unit-converter' \
-H 'Content-Type: application/json' \
-d '{"value":126,"sourceUnit":"mgdl","targetUnit":"mmol","decimalPlaces":2}'Envoyez une requête POST avec vos entrées en JSON. Les paramètres de type fichier nécessitent un upload préalable.
POST http://127.0.0.1:3003/fr/api/tools/glucose-unit-converter| Nom | Type | Requis | Description |
|---|---|---|---|
| value | number | Oui | The blood glucose value to convert. |
| sourceUnit | select | Oui | The unit of the input value. |
| targetUnit | select | Oui | The unit to convert into. |
| decimalPlaces | number | Non | — |
Résultat JSON
{
"key": {...},
"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-glucose-unit-converter": {
"name": "glucose-unit-converter",
"description": "Convertit la glycémie entre unités conventionnelles (mg/dL) et SI (mmol/L). Le glucose (C₆H₁₂O₆) a une masse molaire de 180.156 g/mol, donc le facteur est fixe : mg/dL × 0.05551 = mmol/L (÷18.0182). Références (ADA / OMS) : glycémie à jeun normale <100 mg/dL (<5.6 mmol/L) ; prédiabète 100–125 (5.6–6.9) ; diabète ≥126 (≥7.0). À 2 h après HGPO 75 g : normale <140 (<7.8) ; IGT 140–199 (7.8–11.0) ; diabète ≥200 (≥11.1). Hypoglycémie <70 (<3.9), sévère <54 ; DKA/HHS souvent >250 / >600. HbA1c ≈ 6.5% équivaut à eAG ~140 mg/dL. Sources : ADA 2024, OMS 2006, Young 1987, StatPearls, ADAG 2008. Non un avis médical.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=glucose-unit-converter",
"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": "glucose-unit-converter",
"arguments": {
"value": 126,
"sourceUnit": "mgdl",
"targetUnit": "mmol",
"decimalPlaces": 2
}
}
}Des questions ou un problème ? Contactez [email protected]