Skip to main content
Glama

reject-timeoff

Reject pending time off requests by specifying the time off ID. Optionally include rejection notes to provide context for the denial.

Instructions

Reject a pending time off request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoff_idYesThe time off ID
rejected_byNoUser ID who is rejecting
notesNoOptional rejection notes

Implementation Reference

  • Handler for 'reject-timeoff' operation inside the consolidated manage-time-tracking tool. Sets status to 3 (rejected) and optionally sets rejected_by and rejected_at on the timeoff entry via PATCH /timeoffs/{id}.
    case 'reject-timeoff': {
      const rejector_id = otherParams.rejected_by || 1; // Default to system user
      return floatApi.patch(
        `/timeoffs/${id}`,
        {
          status: 3, // 3 = rejected (numeric status)
          rejected_by: rejector_id,
          rejected_at: new Date().toISOString(),
        },
        timeOffSchema,
        format
      );
    }
  • Standalone legacy handler for the 'reject-timeoff' tool. Uses createTool with name 'reject-timeoff', validates timeoff_id, rejected_by, and notes, then sets status to 3 (rejected) via PATCH /timeoffs/{id}.
    // Reject time off request
    export const rejectTimeOff = createTool(
      'reject-timeoff',
      'Reject a pending time off request',
      z.object({
        timeoff_id: z.union([z.string(), z.number()]).describe('The time off ID'),
        rejected_by: z.number().optional().describe('User ID who is rejecting'),
        notes: z.string().optional().describe('Optional rejection notes'),
      }),
      async (params) => {
        const { timeoff_id, rejected_by, notes } = params;
        const updateData = {
          status: 3, // 3 = rejected in Float API
          rejected_by,
          rejected_at: new Date().toISOString(),
          notes,
        };
    
        const timeOff = await floatApi.patch(`/timeoffs/${timeoff_id}`, updateData, timeOffSchema);
        return timeOff;
      }
    );
  • Schema definitions for the consolidated tool including 'reject-timeoff' as a valid operation enum value in timeTrackingOperationTypeSchema.
    const timeTrackingEntityTypeSchema = z.enum([
      'logged-time',
      'timeoff',
      'timeoff-types',
      'public-holidays',
      'team-holidays',
    ]);
    
    // Time tracking operation types enum for decision tree routing
    const timeTrackingOperationTypeSchema = z.enum([
      'list',
      'get',
      'create',
      'update',
      'delete',
      // Logged time specific operations
      'bulk-create-logged-time',
      'get-person-logged-time-summary',
      'get-project-logged-time-summary',
      'get-logged-time-timesheet',
      'get-billable-time-report',
      // Time off specific operations
      'bulk-create-timeoff',
      'approve-timeoff',
      'reject-timeoff',
      'get-timeoff-calendar',
      'get-person-timeoff-summary',
      // Team holiday specific operations
      'list-team-holidays-by-department',
      'list-team-holidays-by-date-range',
      'list-recurring-team-holidays',
      'get-upcoming-team-holidays',
    ]);
  • Input schema for the standalone reject-timeoff tool: timeoff_id (required), rejected_by (optional), notes (optional).
    z.object({
      timeoff_id: z.union([z.string(), z.number()]).describe('The time off ID'),
      rejected_by: z.number().optional().describe('User ID who is rejecting'),
      notes: z.string().optional().describe('Optional rejection notes'),
    }),
  • Registration of rejectTimeOff in the legacy tools array, imported from time-management/timeoff.ts. Also the tool definition itself via createTool registers it under name 'reject-timeoff'.
      rejectTimeOff,
      listTimeOffTypes,
      getTimeOffCalendar,
      getPersonTimeOffSummary,
    } from './time-management/timeoff.js';
    import {
      listTimeOffTypes as listTimeOffTypesConfig,
      getTimeOffType,
      createTimeOffType,
      updateTimeOffType,
      deleteTimeOffType,
    } from './time-management/timeoff-types.js';
    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,
Behavior2/5

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

With no annotations, the description fails to disclose the consequences of rejection, such as notifications, reversibility, or state changes. The word 'reject' implies mutation but lacks detail.

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 concise sentence that directly states the tool's action without unnecessary words.

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?

Despite being a simple tool, the description lacks critical context such as constraints (only pending requests) and post-rejection behavior, making it insufficiently complete.

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 coverage is 100%, meeting the baseline. The description adds no additional meaning beyond the parameter descriptions already in the schema.

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 uses a specific verb ('reject') and resource ('pending time off request'), clearly distinguishing from sibling tools like 'approve-timeoff' or 'create-timeoff'.

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 alternatives, such as 'approve-timeoff' or 'delete-timeoff'. There is no mention of prerequisites or conditions for rejection.

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