Skip to main content
Glama

list-public-holidays

Filter and list public holidays by date range, region, country, active status, moveable, recurring, year, and pagination. This tool returns holidays matching your specified criteria.

Instructions

List all public holidays with optional filtering by date range, region, and status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateNoStart date filter (YYYY-MM-DD)
end_dateNoEnd date filter (YYYY-MM-DD)
regionNoFilter by region or country code
countryNoFilter by country name
activeNoFilter by active status (0=archived, 1=active)
moveableNoFilter by moveable status (0=fixed, 1=moveable)
recurringNoFilter by recurring status (0=one-time, 1=recurring)
yearNoFilter by year
pageNoPage number for pagination
per-pageNoNumber of items per page (max 200)

Implementation Reference

  • The 'listPublicHolidays' tool handler created via createTool() with name 'list-public-holidays'. It accepts optional filters (start_date, end_date, region, country, active, moveable, recurring, year, page, per-page) and calls floatApi.getPaginated() to GET /public-holidays.
    export const listPublicHolidays = createTool(
      'list-public-holidays',
      'List all public holidays with optional filtering by date range, region, and status',
      z.object({
        start_date: z.string().optional().describe('Start date filter (YYYY-MM-DD)'),
        end_date: z.string().optional().describe('End date filter (YYYY-MM-DD)'),
        region: z.string().optional().describe('Filter by region or country code'),
        country: z.string().optional().describe('Filter by country name'),
        active: z.number().optional().describe('Filter by active status (0=archived, 1=active)'),
        moveable: z.number().optional().describe('Filter by moveable status (0=fixed, 1=moveable)'),
        recurring: z
          .number()
          .optional()
          .describe('Filter by recurring status (0=one-time, 1=recurring)'),
        year: z.number().optional().describe('Filter by year'),
        page: z.number().optional().describe('Page number for pagination'),
        'per-page': z.number().optional().describe('Number of items per page (max 200)'),
      }),
      async (params) => {
        const response = await floatApi.getPaginated(
          '/public-holidays',
          params,
          publicHolidaysResponseSchema
        );
        return response;
      }
    );
  • Input schema (Zod) for list-public-holidays tool defining optional filter parameters: start_date, end_date, region, country, active, moveable, recurring, year, page, per-page.
    z.object({
      start_date: z.string().optional().describe('Start date filter (YYYY-MM-DD)'),
      end_date: z.string().optional().describe('End date filter (YYYY-MM-DD)'),
      region: z.string().optional().describe('Filter by region or country code'),
      country: z.string().optional().describe('Filter by country name'),
      active: z.number().optional().describe('Filter by active status (0=archived, 1=active)'),
      moveable: z.number().optional().describe('Filter by moveable status (0=fixed, 1=moveable)'),
      recurring: z
        .number()
        .optional()
        .describe('Filter by recurring status (0=one-time, 1=recurring)'),
      year: z.number().optional().describe('Filter by year'),
      page: z.number().optional().describe('Page number for pagination'),
      'per-page': z.number().optional().describe('Number of items per page (max 200)'),
    }),
  • PublicHoliday schema (Zod) defining the shape of a public holiday object, and publicHolidaysResponseSchema (array of publicHolidaySchema) for response validation.
    // Public Holiday schema - based on Float API v3 structure
    export const publicHolidaySchema = z.object({
      holiday_id: z.union([z.string(), z.number()]).optional(), // Float API uses holiday_id
      name: z.string(),
      date: z.string(), // ISO date format (YYYY-MM-DD)
      region: z.string().nullable().optional(), // Region or country code
      country: z.string().nullable().optional(), // Country name
      type: z.string().nullable().optional(), // Holiday type (bank_holiday, observed, etc.)
      active: z.number().nullable().optional(), // 0 = archived, 1 = active
      created: z.string().nullable().optional(), // Float API uses 'created', not 'created_at'
      modified: z.string().nullable().optional(), // Float API uses 'modified', not 'updated_at'
      moveable: z.number().nullable().optional(), // 0 = fixed date, 1 = moveable
      year: z.number().nullable().optional(), // Year for the holiday
      recurring: z.number().nullable().optional(), // 0 = one-time, 1 = recurring
      notes: z.string().nullable().optional(), // Additional notes
    });
    
    export const publicHolidaysResponseSchema = z.array(publicHolidaySchema);
  • getPaginated() method on FloatApi class that builds query params, defaults per-page to 200, and performs a GET request. Used by the listPublicHolidays handler.
    async getPaginated<T>(
      url: string,
      params?: Record<string, unknown>,
      schema?: z.ZodType<T[]>,
      format: ResponseFormat = 'json'
    ): Promise<T[]> {
      const queryString = this.buildQueryParams({
        ...params,
        'per-page': params?.['per-page'] || 200, // Float API max page size
      });
    
      return this.get<T[]>(`${url}${queryString}`, schema, format);
    }
  • listPublicHolidays is imported from './time-management/public-holidays.ts' (line 137) and registered in the legacyTools array (line 286), which is exported as part of the 'tools' and 'allTools' arrays.
    import {
      listPublicHolidays,
      getPublicHoliday,
      createPublicHoliday,
      updatePublicHoliday,
      deletePublicHoliday,
    } from './time-management/public-holidays.js';
    import {
      listTeamHolidays,
      getTeamHoliday,
      createTeamHoliday,
      updateTeamHoliday,
      deleteTeamHoliday,
      listTeamHolidaysByDepartment,
      listTeamHolidaysByDateRange,
      listRecurringTeamHolidays,
      getUpcomingTeamHolidays,
    } from './time-management/team-holidays.js';
    import {
      listLoggedTime,
      getLoggedTime,
      createLoggedTime,
      updateLoggedTime,
      deleteLoggedTime,
      bulkCreateLoggedTime,
      getPersonLoggedTimeSummary,
      getProjectLoggedTimeSummary,
      getLoggedTimeTimesheet,
      getBillableTimeReport,
    } from './time-management/logged-time.js';
    
    // Reporting tools
    import {
      getTimeReport,
      getProjectReport,
      getPeopleUtilizationReport,
    } from './reporting/reports.js';
    
    // Legacy tools export (preserved for backward compatibility)
    export const legacyTools = [
      // Core entity tools
      listPeople,
      getPerson,
      createPerson,
      updatePerson,
      deletePerson,
      listDepartments,
      getDepartment,
      createDepartment,
      updateDepartment,
      deleteDepartment,
      listStatuses,
      getStatus,
      createStatus,
      updateStatus,
      deleteStatus,
      getDefaultStatus,
      setDefaultStatus,
      getStatusesByType,
      listRoles,
      getRole,
      createRole,
      updateRole,
      deleteRole,
      getRolesByPermission,
      getRolePermissions,
      updateRolePermissions,
      getRoleHierarchy,
      checkRoleAccess,
      listAccounts,
      getAccount,
      updateAccount,
      manageAccountPermissions,
      createAccount,
      deactivateAccount,
      reactivateAccount,
      getCurrentAccount,
      updateAccountTimezone,
      setAccountDepartmentFilter,
      bulkUpdateAccountPermissions,
    
      // Project management tools
      listProjects,
      getProject,
      createProject,
      updateProject,
      deleteProject,
      listTasks,
      getTask,
      createTask,
      updateTask,
      deleteTask,
      listClients,
      getClient,
      createClient,
      updateClient,
      deleteClient,
      listAllocations,
      getAllocation,
      createAllocation,
      updateAllocation,
      deleteAllocation,
      listMilestones,
      getMilestone,
      createMilestone,
      updateMilestone,
      deleteMilestone,
      getProjectMilestones,
      getUpcomingMilestones,
      getOverdueMilestones,
      completeMilestone,
      getMilestoneReminders,
      listPhases,
      getPhase,
      createPhase,
      updatePhase,
      deletePhase,
      listPhasesByProject,
      getPhasesByDateRange,
      getActivePhases,
      getPhaseSchedule,
      listProjectTasks,
      getProjectTask,
      createProjectTask,
      updateProjectTask,
      deleteProjectTask,
      getProjectTasksByProject,
      getProjectTasksByPhase,
      bulkCreateProjectTasks,
      reorderProjectTasks,
      archiveProjectTask,
      getProjectTaskDependencies,
    
      // Time management tools
      listTimeOff,
      getTimeOff,
      createTimeOff,
      updateTimeOff,
      deleteTimeOff,
      bulkCreateTimeOff,
      approveTimeOff,
      rejectTimeOff,
      listTimeOffTypes,
      getTimeOffCalendar,
      getPersonTimeOffSummary,
      listTimeOffTypesConfig,
      getTimeOffType,
      createTimeOffType,
      updateTimeOffType,
      deleteTimeOffType,
      listPublicHolidays,
      getPublicHoliday,
      createPublicHoliday,
      updatePublicHoliday,
      deletePublicHoliday,
      listTeamHolidays,
      getTeamHoliday,
      createTeamHoliday,
      updateTeamHoliday,
      deleteTeamHoliday,
      listTeamHolidaysByDepartment,
      listTeamHolidaysByDateRange,
      listRecurringTeamHolidays,
      getUpcomingTeamHolidays,
      listLoggedTime,
      getLoggedTime,
      createLoggedTime,
      updateLoggedTime,
      deleteLoggedTime,
      bulkCreateLoggedTime,
      getPersonLoggedTimeSummary,
      getProjectLoggedTimeSummary,
      getLoggedTimeTimesheet,
      getBillableTimeReport,
    
      // Reporting tools
      getTimeReport,
      getProjectReport,
      getPeopleUtilizationReport,
    ];
    
    // Primary export: Optimized tools (4 consolidated tools replacing 246+ granular tools)
    // Also includes legacy tools for backward compatibility with existing tests
    export const tools = [...optimizedTools, ...legacyTools];
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry full burden. It states 'List all public holidays' implying a safe read operation, but fails to disclose pagination behavior, performance implications, or any effects on state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence that is clear and front-loaded. No unnecessary words, though it could be slightly more structured to list filter categories.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 10 optional parameters and no output schema, the description lacks context on return value format, pagination behavior, or valid filter combinations. This is incomplete for a list endpoint with many filters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% coverage, so baseline is 3. The description adds 'optional filtering by date range, region, and status', but 'status' is ambiguous and does not significantly enhance understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and resource 'public holidays', and mentions optional filtering. However, it does not differentiate from sibling list tools like list-team-holidays or list-allocations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for listing public holidays with filters, but does not provide explicit guidance on when to use this tool versus alternatives (e.g., get-public-holiday for a single holiday). No when-not-to-use or exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/asachs01/float-mcp'

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