get-feriados
Retrieve Argentina's official holidays for the current year. Use this tool to access national holiday dates through the Argentina Datos API.
Instructions
Devuelve los feriados del año
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.ts:110-137 (handler)Handler function for 'get-feriados' tool, calls getFeriados() and returns JSON response or error.server.tool("get-feriados", "Devuelve los feriados del año", {}, async ({}) => { try { const data = await getFeriados(); if (data.length === 0) { return { content: [ { type: "text", text: "No se encontraron feriados para el año actual", }, ], }; } return { content: [ { type: "text", text: JSON.stringify(data, null, 2), mimeType: "application/json", }, ], }; } catch (error) { return { content: [{ type: "text", text: "Error al obtener los feriados" }], }; } });
- main.ts:26-29 (schema)Schema definition for 'get-feriados' tool in the MCP server tools list (empty parameters).name: "get-feriados", description: "Devuelve los feriados del año", parameters: {}, },
- main.ts:110-137 (registration)Registration of the 'get-feriados' tool using server.tool, including inline handler.server.tool("get-feriados", "Devuelve los feriados del año", {}, async ({}) => { try { const data = await getFeriados(); if (data.length === 0) { return { content: [ { type: "text", text: "No se encontraron feriados para el año actual", }, ], }; } return { content: [ { type: "text", text: JSON.stringify(data, null, 2), mimeType: "application/json", }, ], }; } catch (error) { return { content: [{ type: "text", text: "Error al obtener los feriados" }], }; } });
- utils/functions.ts:1-6 (helper)Core implementation of getFeriados helper function that fetches holidays data from API for given or current year.const BASE_URL = "https://api.argentinadatos.com/v1"; export const getFeriados = async (year = new Date().getFullYear()) => { const feriados = await fetch(`${BASE_URL}/feriados/${year}`); const data = await feriados.json(); return data; };