Skip to main content
Glama
0xKoller
by 0xKoller

get-feriados-timeframe

Retrieve official holidays for a specific year in Argentina to plan schedules, avoid conflicts, and ensure compliance with national observances.

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)
    Handler implementation for the 'get-feriados-timeframe' tool. It takes a 'year' parameter, calls the helper getFeriados(year), handles errors, and returns JSON data or error messages.
    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" }], }; } } );
  • Core helper function getFeriados that performs the API fetch for feriados (holidays) data for a given year from argentinadatos.com API.
    export const getFeriados = async (year = new Date().getFullYear()) => { const feriados = await fetch(`${BASE_URL}/feriados/${year}`); const data = await feriados.json(); return data; };
  • main.ts:30-36 (schema)
    Schema definition for the tool in the server's tools list, declaring name, description, and input parameters.
    { name: "get-feriados-timeframe", description: "Devuelve los feriados del año", parameters: { year: z.number().describe("EJ: 2025"), }, },
  • main.ts:141-145 (registration)
    Tool registration call with name, description, and Zod schema for input validation within the server.tool method.
    "get-feriados-timeframe", "Devuelve los feriados de un año específico pasado por parámetro", { year: z.number().describe("EJ: 2025"), },
  • BASE_URL constant used by getFeriados to construct the API endpoint.
    const BASE_URL = "https://api.argentinadatos.com/v1";

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