get_portugal_holidays
Retrieve Portuguese national public holidays for any year to plan business deadlines, delivery dates, payment due dates, and SLA periods, avoiding non-working days.
Instructions
Returns all Portuguese national public holidays for a given year as a structured list. Each holiday includes { date: 'YYYY-MM-DD', name: string, name_en: string }. Returns 10 mandatory national holidays defined by Portuguese law. Use when calculating business deadlines, delivery dates, payment due dates, SLA periods, or scheduling tasks that must avoid non-working days in Portugal.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | Calendar year as a 4-digit integer. Example: 2026 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | ||
| country | Yes | ||
| total_holidays | Yes | ||
| holidays | Yes |
Implementation Reference
- index.js:89-109 (registration)Tool registration for 'get_portugal_holidays' via server.registerTool() including description, input/output schemas, and annotations.
// ── 4. Get Portugal Holidays ── server.registerTool("get_portugal_holidays", { description: "Returns all Portuguese national public holidays for a given year as a structured list. Each holiday includes { date: 'YYYY-MM-DD', name: string, name_en: string }. Returns 10 mandatory national holidays defined by Portuguese law. Use when calculating business deadlines, delivery dates, payment due dates, SLA periods, or scheduling tasks that must avoid non-working days in Portugal.", inputSchema: { year: z.number().describe("Calendar year as a 4-digit integer. Example: 2026") }, outputSchema: { year: z.number(), country: z.string(), total_holidays: z.number(), holidays: z.array(z.object({ date: z.string(), name: z.string(), name_en: z.string() })) }, annotations: { title: "Get Portugal Public Holidays", readOnlyHint: true, idempotentHint: true, openWorldHint: false } }, async ({ year }) => { const holidays = [ { date: `${year}-01-01`, name: "Ano Novo", name_en: "New Year's Day" }, { date: `${year}-04-25`, name: "Dia da Liberdade", name_en: "Freedom Day" }, { date: `${year}-05-01`, name: "Dia do Trabalhador", name_en: "Labour Day" }, { date: `${year}-06-10`, name: "Dia de Portugal", name_en: "Portugal Day" }, { date: `${year}-08-15`, name: "Assunção de Nossa Senhora", name_en: "Assumption of Mary" }, { date: `${year}-10-05`, name: "Implantação da República", name_en: "Republic Day" }, { date: `${year}-11-01`, name: "Dia de Todos os Santos", name_en: "All Saints Day" }, { date: `${year}-12-01`, name: "Restauração da Independência", name_en: "Independence Restoration Day" }, { date: `${year}-12-08`, name: "Imaculada Conceição", name_en: "Immaculate Conception" }, { date: `${year}-12-25`, name: "Natal", name_en: "Christmas Day" }, ]; return { content: [{ type: "text", text: JSON.stringify({ year, country: "Portugal", total_holidays: holidays.length, holidays }) }] }; }); - index.js:95-109 (handler)Handler function for get_portugal_holidays that returns 10 fixed-date Portuguese national holidays for a given year as structured data.
}, async ({ year }) => { const holidays = [ { date: `${year}-01-01`, name: "Ano Novo", name_en: "New Year's Day" }, { date: `${year}-04-25`, name: "Dia da Liberdade", name_en: "Freedom Day" }, { date: `${year}-05-01`, name: "Dia do Trabalhador", name_en: "Labour Day" }, { date: `${year}-06-10`, name: "Dia de Portugal", name_en: "Portugal Day" }, { date: `${year}-08-15`, name: "Assunção de Nossa Senhora", name_en: "Assumption of Mary" }, { date: `${year}-10-05`, name: "Implantação da República", name_en: "Republic Day" }, { date: `${year}-11-01`, name: "Dia de Todos os Santos", name_en: "All Saints Day" }, { date: `${year}-12-01`, name: "Restauração da Independência", name_en: "Independence Restoration Day" }, { date: `${year}-12-08`, name: "Imaculada Conceição", name_en: "Immaculate Conception" }, { date: `${year}-12-25`, name: "Natal", name_en: "Christmas Day" }, ]; return { content: [{ type: "text", text: JSON.stringify({ year, country: "Portugal", total_holidays: holidays.length, holidays }) }] }; }); - index.js:92-93 (schema)Input schema (Zod) requiring a 'year' number parameter for the get_portugal_holidays tool.
inputSchema: { year: z.number().describe("Calendar year as a 4-digit integer. Example: 2026") }, outputSchema: { year: z.number(), country: z.string(), total_holidays: z.number(), holidays: z.array(z.object({ date: z.string(), name: z.string(), name_en: z.string() })) }, - index.js:93-93 (schema)Output schema (Zod) specifying the structure: year, country, total_holidays, and array of holiday objects with date, name, name_en.
outputSchema: { year: z.number(), country: z.string(), total_holidays: z.number(), holidays: z.array(z.object({ date: z.string(), name: z.string(), name_en: z.string() })) },