Health
Convierte la hemoglobina entre g/dL, g/L y mmol/L. mmol/L usa el criterio monómero IFCC/IUPAC (masa molar 16.1145 g/mmol): g/dL × 0.6206 = mmol/L; g/dL × 10 = g/L. Rangos (WHO / adulto): hombres 13.0–17.0 g/dL (130–170 g/L, 8.1–10.6 mmol/L); mujeres 12.0–15.0 g/dL (120–150 g/L, 7.4–9.3 mmol/L). Umbral de anemia (WHO): hombres <13.0 g/dL; mujeres <12.0 g/dL; embarazadas <11.0 g/dL. Policitemia a menudo >18 g/dL. Fuentes: WHO 2011, IFCC/IUPAC, Young 1987, StatPearls. No es consejo médico.
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'http://127.0.0.1:3003/es/api/tools/hemoglobin-unit-converter' \
-H 'Content-Type: application/json' \
-d '{"value":12,"sourceUnit":"gdl","targetUnit":"mmol","decimalPlaces":2}'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST http://127.0.0.1:3003/es/api/tools/hemoglobin-unit-converter| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| value | number | Sí | The hemoglobin value to convert. |
| sourceUnit | select | Sí | The unit of the input value. |
| targetUnit | select | Sí | The unit to convert into. |
| decimalPlaces | number | No | — |
Resultado JSON
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-hemoglobin-unit-converter": {
"name": "hemoglobin-unit-converter",
"description": "Convierte la hemoglobina entre g/dL, g/L y mmol/L. mmol/L usa el criterio monómero IFCC/IUPAC (masa molar 16.1145 g/mmol): g/dL × 0.6206 = mmol/L; g/dL × 10 = g/L. Rangos (WHO / adulto): hombres 13.0–17.0 g/dL (130–170 g/L, 8.1–10.6 mmol/L); mujeres 12.0–15.0 g/dL (120–150 g/L, 7.4–9.3 mmol/L). Umbral de anemia (WHO): hombres <13.0 g/dL; mujeres <12.0 g/dL; embarazadas <11.0 g/dL. Policitemia a menudo >18 g/dL. Fuentes: WHO 2011, IFCC/IUPAC, Young 1987, StatPearls. No es consejo médico.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=hemoglobin-unit-converter",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "hemoglobin-unit-converter",
"arguments": {
"value": 12,
"sourceUnit": "gdl",
"targetUnit": "mmol",
"decimalPlaces": 2
}
}
}¿Dudas o problemas? Contacta con [email protected]