Skip to main content
Glama

delete-public-holiday

Archive a public holiday in Float by providing its holiday ID to remove it from the calendar.

Instructions

Delete a public holiday (archives it in Float)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
holiday_idYesThe public holiday ID

Implementation Reference

  • The actual handler implementation for delete-public-holiday. It uses createTool to define the tool, accepting holiday_id as input, calling floatApi.delete, and returning a success message.
    // Delete public holiday
    export const deletePublicHoliday = createTool(
      'delete-public-holiday',
      'Delete a public holiday (archives it in Float)',
      z.object({
        holiday_id: z.union([z.string(), z.number()]).describe('The public holiday ID'),
      }),
      async (params) => {
        await floatApi.delete(`/public-holidays/${params.holiday_id}`);
        return { success: true, message: 'Public holiday deleted successfully' };
      }
    );
  • Input schema for delete-public-holiday: requires holiday_id (string or number).
    z.object({
      holiday_id: z.union([z.string(), z.number()]).describe('The public holiday ID'),
    }),
  • Import of deletePublicHoliday from the public-holidays module into the tools index.
    import {
      listPublicHolidays,
      getPublicHoliday,
      createPublicHoliday,
      updatePublicHoliday,
      deletePublicHoliday,
    } from './time-management/public-holidays.js';
  • Registration of deletePublicHoliday in the legacyTools array for export.
    listPublicHolidays,
    getPublicHoliday,
    createPublicHoliday,
    updatePublicHoliday,
    deletePublicHoliday,
  • The createTool helper function that wraps the handler with schema validation and error handling.
    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>;
            }
    
            // Handle parameter validation errors
            if (error instanceof z.ZodError) {
              return {
                success: false,
                error: `Parameter validation failed: ${error.errors.map((e) => `${e.path.join('.')}: ${e.message}`).join(', ')}`,
                errorCode: 'PARAMETER_VALIDATION_ERROR',
                details: {
                  validationErrors: error.errors,
                },
              } as ToolResponse<T>;
            }
    
            // Handle other errors
            return {
              success: false,
              error: error instanceof Error ? error.message : 'Unknown error occurred',
              errorCode: 'UNKNOWN_ERROR',
            } as ToolResponse<T>;
          }
        },
      };
    };
Behavior3/5

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

With no annotations provided, the description carries full behavioral burden. The phrase 'archives it in Float' partially clarifies that it is not a hard delete but an archival. However, it omits critical details like required permissions, side effects on related data, or whether the operation is reversible.

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

Conciseness5/5

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

The description is a single sentence that conveys the core action and a clarifying detail. No unnecessary words, and the parenthetical adds value without bloat.

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

Completeness4/5

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

Given the simplicity (one required parameter, no output schema), the description is mostly complete. It clarifies the archival nature, but could improve by hinting at the response structure (e.g., success confirmation).

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 covers 100% of the parameter with a description ('The public holiday ID'), and the tool description adds no additional semantic context beyond what the schema already provides. Baseline score of 3 applies.

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

Purpose5/5

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

The description clearly states the verb 'Delete' and the resource 'public holiday', with the added clarification 'archives it in Float'. This effectively distinguishes it from sibling tools like 'create-public-holiday' or 'update-public-holiday'.

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?

The description provides no guidance on when to use this tool versus alternatives. There is no mention of prerequisites, context, or conditions that warrant deletion versus other actions like archiving or updating.

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