Skip to main content
Glama

create-public-holiday

Add a public holiday to the calendar by specifying name and date, with optional details like region, country, holiday type, and recurrence settings.

Instructions

Create a new public holiday

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesHoliday name
dateYesHoliday date (YYYY-MM-DD)
regionNoRegion or country code
countryNoCountry name
typeNoHoliday type (bank_holiday, observed, etc.)
moveableNoMoveable status (0=fixed, 1=moveable)
recurringNoRecurring status (0=one-time, 1=recurring)
yearNoYear for the holiday
notesNoAdditional notes
activeNoActive status (1=active, 0=archived)

Implementation Reference

  • The handler function that executes the create-public-holiday tool logic. It accepts name, date, and optional fields (region, country, type, moveable, recurring, year, notes, active) as input, then posts to the Float API /public-holidays endpoint and returns the created holiday validated against publicHolidaySchema.
    export const createPublicHoliday = createTool(
      'create-public-holiday',
      'Create a new public holiday',
      z.object({
        name: z.string().describe('Holiday name'),
        date: z.string().describe('Holiday date (YYYY-MM-DD)'),
        region: z.string().optional().describe('Region or country code'),
        country: z.string().optional().describe('Country name'),
        type: z.string().optional().describe('Holiday type (bank_holiday, observed, etc.)'),
        moveable: z.number().optional().describe('Moveable status (0=fixed, 1=moveable)'),
        recurring: z.number().optional().describe('Recurring status (0=one-time, 1=recurring)'),
        year: z.number().optional().describe('Year for the holiday'),
        notes: z.string().optional().describe('Additional notes'),
        active: z.number().optional().describe('Active status (1=active, 0=archived)'),
      }),
      async (params) => {
        const holiday = await floatApi.post('/public-holidays', params, publicHolidaySchema);
        return holiday;
      }
    );
  • Zod schema defining the public holiday response shape. Used to validate the response from Float API when creating (or reading) a public holiday.
    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
    });
  • The createPublicHoliday tool is registered in the legacyTools array (line 288) and exported via the tools and allTools arrays for use by the MCP server.
    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];
    
    // Alternative export that includes both optimized and legacy tools
    export const allTools = [...optimizedTools, ...legacyTools];
  • The createTool helper factory function that wraps a name, description, input schema, and handler into a standardized tool object with error handling and response formatting.
    export const createTool = <T, P extends z.ZodType>(
      name: string,
      description: string,
      schema: P,
      handler: (params: z.infer<P>) => Promise<T>
    ): {
      name: string;
      description: string;
      inputSchema: P;
      handler: (params: unknown) => Promise<ToolResponse<T>>;
    } => {
      return {
        name,
        description,
        inputSchema: schema,
        handler: async (params: unknown): Promise<ToolResponse<T>> => {
          try {
            const validatedParams = schema.parse(params);
            const result = await handler(validatedParams);
    
            // Extract format from params if available
            const responseFormat =
              ((validatedParams as Record<string, unknown>).format as ResponseFormat) || 'json';
    
            return { success: true, data: result, format: responseFormat };
          } catch (error) {
            logger.error(`Error in ${name} tool:`, error);
    
            // Handle Float API errors with enhanced formatting
            if (error instanceof FloatApiError) {
              return FloatErrorHandler.formatErrorForMcp(error) as ToolResponse<T>;
Behavior2/5

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

No annotations exist, and the description only says 'Create a new public holiday', implying mutation but providing no details on side effects, permissions, reversibility, or behavior beyond creation.

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

Conciseness3/5

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

The description is very short and concise, but it adds little value beyond the tool name. It lacks front-loading of critical information and is efficient but incomplete.

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?

For a tool with 10 parameters, no output schema, and no annotations, the description lacks essential context about return values, validation, or typical usage patterns, making it incomplete.

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?

Schema description coverage is 100%, so the input schema already documents all parameters. The description adds no additional parameter-level meaning, hence baseline score of 3.

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 action ('Create') and resource ('new public holiday'), but it does not differentiate from sibling tools like 'create-team-holiday' or 'update-public-holiday'. It is clear but lacks scaling or distinguishing features.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus its siblings (e.g., create-team-holiday) or when not to use it. Missing context for selection.

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