Skip to main content
Glama
0xKoller
by 0xKoller

get-feriados-timeframe

Retrieve public holidays for a specific year in Argentina using the MCP Argentina Datos API. Input the desired year to access accurate holiday data.

Instructions

Devuelve los feriados de un año específico pasado por parámetro

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearYesEJ: 2025

Implementation Reference

  • main.ts:140-184 (handler)
    The full handler implementation for the 'get-feriados-timeframe' tool, registered via server.tool. It handles input validation, calls the getFeriados helper with the year parameter, formats the response as JSON, and manages errors.
    server.tool( "get-feriados-timeframe", "Devuelve los feriados de un año específico pasado por parámetro", { year: z.number().describe("EJ: 2025"), }, async ({ year }) => { if (year === undefined) { return { content: [ { type: "text", text: "No se ha provisto el parámetro 'year'", }, ], }; } try { const data = await getFeriados(year); if (data.length === 0) { return { content: [ { type: "text", text: "No se encontraron feriados para el año especificado", }, ], }; } 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:30-36 (schema)
    Tool schema in the McpServer tools array for discovery, defining name, description, and input parameters schema using Zod.
    { name: "get-feriados-timeframe", description: "Devuelve los feriados del año", parameters: { year: z.number().describe("EJ: 2025"), }, },
  • Core helper function getFeriados that fetches holiday data from the Argentina Datos API for a specific year (or current year by default). This is the actual implementation performing the HTTP request.
    export const getFeriados = async (year = new Date().getFullYear()) => { const feriados = await fetch(`${BASE_URL}/feriados/${year}`); const data = await feriados.json(); return data; };

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/0xKoller/mcp-argentina-datos'

If you have feedback or need assistance with the MCP directory API, please join our Discord server