Skip to main content
Glama

get-task

Retrieve detailed information about a specific task or allocation using its task ID. Access task details including assignments and dates from your float.com projects.

Instructions

Get detailed information about a specific task/allocation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe task ID (task_id)

Implementation Reference

  • The handler function for the 'get-task' tool. It defines the tool using createTool, validates the task_id input param, and calls floatApi.get('/tasks/{task_id}') to fetch a single task from the Float API, returning the parsed task via taskSchema.
    export const getTask = createTool(
      'get-task',
      'Get detailed information about a specific task/allocation',
      z.object({
        task_id: z.union([z.string(), z.number()]).describe('The task ID (task_id)'),
      }),
      async (params) => {
        const task = await floatApi.get(`/tasks/${params.task_id}`, taskSchema);
        return task;
      }
    );
  • Input schema for the get-task tool: requires a task_id parameter (accepts string or number).
    z.object({
      task_id: z.union([z.string(), z.number()]).describe('The task ID (task_id)'),
    }),
  • taskSchema: Zod schema that validates the task response from the Float API, including fields like task_id, project_id, people_id, name, dates, hours, priority, etc.
    export const taskSchema = z.object({
      task_id: z.number().optional(), // Float API uses task_id, not id
      project_id: z.number().optional(),
      people_id: z.number().optional(),
      name: z.string(),
      notes: z.string().nullable().optional(),
      status: z.number().optional(), // Float API uses numeric status codes
      start_date: z.string().nullable().optional(),
      end_date: z.string().nullable().optional(),
      estimated_hours: z.number().nullable().optional(),
      actual_hours: z.number().nullable().optional(),
      priority: z.number().nullable().optional(),
      created: z.string().nullable().optional(), // Float API uses 'created', not 'created_at'
      modified: z.string().nullable().optional(), // Float API uses 'modified', not 'updated_at'
      task_type: z.number().nullable().optional(),
      billable: z.number().nullable().optional(), // 0 = non-billable, 1 = billable
      repeat_state: z.number().nullable().optional(),
      repeat_end: z.string().nullable().optional(),
    });
  • The getTask export from tasks.ts is imported and included in the legacyTools array, which is then exported as part of the 'tools' and 'allTools' arrays.
      getTask,
      createTask,
      updateTask,
      deleteTask,
    } from './project-management/tasks.js';
    import {
      listClients,
      getClient,
      createClient,
      updateClient,
      deleteClient,
    } from './project-management/clients.js';
    import {
      listAllocations,
      getAllocation,
      createAllocation,
      updateAllocation,
      deleteAllocation,
    } from './project-management/allocations.js';
    import {
      listMilestones,
      getMilestone,
      createMilestone,
      updateMilestone,
      deleteMilestone,
      getProjectMilestones,
      getUpcomingMilestones,
      getOverdueMilestones,
      completeMilestone,
      getMilestoneReminders,
    } from './project-management/milestones.js';
    import {
      listPhases,
      getPhase,
      createPhase,
      updatePhase,
      deletePhase,
      listPhasesByProject,
      getPhasesByDateRange,
      getActivePhases,
      getPhaseSchedule,
    } from './project-management/phases.js';
    import {
      listProjectTasks,
      getProjectTask,
      createProjectTask,
      updateProjectTask,
      deleteProjectTask,
      getProjectTasksByProject,
      getProjectTasksByPhase,
      bulkCreateProjectTasks,
      reorderProjectTasks,
      archiveProjectTask,
      getProjectTaskDependencies,
    } from './project-management/project-tasks.js';
    
    // Time management tools
    import {
      listTimeOff,
      getTimeOff,
      createTimeOff,
      updateTimeOff,
      deleteTimeOff,
      bulkCreateTimeOff,
      approveTimeOff,
      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,
      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 function that wraps all tool definitions - it takes name, description, schema, and an async handler, returns a tool object with inputSchema and a wrapped handler that handles validation, API errors, 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>;
            }
    
            // 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>;
          }
        },
      };
    };
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It only says 'get detailed information', but does not specify what fields are returned, whether authentication is needed, or any potential side effects. More context is needed.

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 with no unnecessary words, front-loading the purpose effectively.

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?

Given the lack of output schema and annotations, the description should explain what 'detailed information' includes or note any constraints. It fails to distinguish from similar tools, leaving ambiguity about the exact resource.

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% with one parameter already described as 'task_id'. The description adds minimal value by mentioning 'task/allocation' but does not provide additional semantic detail 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 tool gets detailed information about a specific task/allocation, with a specific verb and resource. However, it does not differentiate from sibling tools like 'get-allocation' or 'get-project-task', which may be similar.

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. The description does not explain the distinction between 'task' and 'allocation', nor when to prefer this over other get-* tools.

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