Math & Numbers
Calcula la actividad restante tras el decaimiento radiactivo: A(t) = A₀·e^(−λt) = A₀·2^(−t/T½), con λ = ln2/T½. Admite unidades de actividad Bq/kBq/MBq/GBq/Ci/mCi/µCi/dpm y unidades de tiempo s/min/h/días/años, y devuelve la actividad restante, el porcentaje restante, la constante de decaimiento y el número de vidas medias transcurridas. Ejemplos: Tc-99m (T½=6,01 h, medicina nuclear) y F-18 (T½=109,77 min, PET).
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'http://127.0.0.1:3003/es/api/tools/half-life-activity-decay' \
-H 'Content-Type: application/json' \
-d '{"initialActivity":800,"activityUnit":"MBq","halfLife":6.01,"halfLifeUnit":"hours","elapsedTime":6,"timeUnit":"hours","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/half-life-activity-decay| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| initialActivity | number | Sí | Activity at t = 0 in the selected activity unit. Must be non-negative. |
| activityUnit | select | Sí | Unit of the initial (and remaining) activity. |
| halfLife | number | Sí | Physical half-life in the selected time unit. Must be greater than zero. |
| halfLifeUnit | select | Sí | Time unit of the half-life. |
| elapsedTime | number |
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-half-life-activity-decay": {
"name": "half-life-activity-decay",
"description": "Calcula la actividad restante tras el decaimiento radiactivo: A(t) = A₀·e^(−λt) = A₀·2^(−t/T½), con λ = ln2/T½. Admite unidades de actividad Bq/kBq/MBq/GBq/Ci/mCi/µCi/dpm y unidades de tiempo s/min/h/días/años, y devuelve la actividad restante, el porcentaje restante, la constante de decaimiento y el número de vidas medias transcurridas. Ejemplos: Tc-99m (T½=6,01 h, medicina nuclear) y F-18 (T½=109,77 min, PET).",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=half-life-activity-decay",
"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": "half-life-activity-decay",
"arguments": {
"initialActivity": 800,
"activityUnit": "MBq",
"halfLife": 6.01,
"halfLifeUnit": "hours",
"elapsedTime": 6,
"timeUnit": "hours",
"decimalPlaces": 2
}
}
}| Time since the initial activity measurement. Must be non-negative. |
| timeUnit | select | Sí | Time unit of the elapsed time. |
| decimalPlaces | number | No | — |
Resultado JSON
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}¿Dudas o problemas? Contacta con [email protected]