salud
Check the operational status and health of the Argentina Datos API to ensure reliable access to information on holidays, exchange rates, legislative data, and more.
Instructions
Devuelve el estado de la salud de la API
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.ts:581-612 (handler)The MCP tool handler for 'salud', which fetches the API health status using getSalud() and returns a corresponding message.server.tool( "salud", "Devuelve el estado de la salud de la API", {}, async ({}) => { try { const data = await getSalud(); if (data.estado === "Correcto") { return { content: [ { type: "text", text: "La API está funcionando correctamente" }, ], }; } else { return { content: [ { type: "text", text: "La API no está funcionando correctamente" }, ], }; } } catch (error) { return { content: [ { type: "text", text: "Error al obtener el estado de la salud de la API", }, ], }; } } );
- main.ts:99-103 (schema)The input schema declaration for the 'salud' tool (no parameters).{ name: "salud", description: "Devuelve el estado de la salud de la API", parameters: {}, },
- utils/functions.ts:70-74 (helper)Helper function that fetches the raw health status data from the API.export const getSalud = async () => { const salud = await fetch(`${BASE_URL}/estado`); const data = await salud.json(); return data; };