list-allocations
Retrieve a list of allocations from Float, with optional filters by project, person, date range, status, and pagination.
Instructions
List all allocations with optional filtering (same as tasks in Float API)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | Filter by project ID | |
| people_id | No | Filter by person ID | |
| start_date | No | Filter by start date (YYYY-MM-DD) | |
| end_date | No | Filter by end date (YYYY-MM-DD) | |
| status | No | Filter by status (numeric) | |
| page | No | Page number for pagination | |
| per-page | No | Number of items per page (max 200) |
Implementation Reference
- The main handler function that executes the 'list-allocations' tool logic. It calls floatApi.getPaginated('/tasks', params, allocationsResponseSchema) to list allocations from the Float API (which uses the /tasks endpoint for allocations). The handler accepts optional filtering parameters: project_id, people_id, start_date, end_date, status, page, and per-page.
export const listAllocations = createTool( 'list-allocations', 'List all allocations with optional filtering (same as tasks in Float API)', z.object({ project_id: z.number().optional().describe('Filter by project ID'), people_id: z.number().optional().describe('Filter by person ID'), start_date: z.string().optional().describe('Filter by start date (YYYY-MM-DD)'), end_date: z.string().optional().describe('Filter by end date (YYYY-MM-DD)'), status: z.number().optional().describe('Filter by status (numeric)'), 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( '/tasks', // Allocations are managed through /tasks endpoint params, allocationsResponseSchema ); return response; } ); - src/types/float.ts:130-145 (schema)The Zod schema for individual allocation objects returned by the Float API. Defines the shape of each allocation with fields like task_id, project_id, people_id, start_date, end_date, hours, notes, billable, repeat_state, task_type, and status.
export const allocationSchema = z.object({ task_id: z.number().optional(), // Float API uses task_id for allocations project_id: z.number().optional(), people_id: z.number().optional(), // Float API uses people_id, not person_id start_date: z.string().nullable().optional(), end_date: z.string().nullable().optional(), hours: z.number().nullable().optional(), notes: z.string().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' billable: z.number().nullable().optional(), // 0 = non-billable, 1 = billable repeat_state: z.number().nullable().optional(), repeat_end: z.string().nullable().optional(), task_type: z.number().nullable().optional(), status: z.number().nullable().optional(), }); - src/types/float.ts:335-335 (schema)The response schema for list-allocations - an array of allocationSchema objects.
export const allocationsResponseSchema = z.array(allocationSchema); - src/tools/index.ts:71-77 (registration)Imports listAllocations from the allocations module and registers it in the legacyTools array for use in the MCP server.
import { listAllocations, getAllocation, createAllocation, updateAllocation, deleteAllocation, } from './project-management/allocations.js'; - src/tools/index.ts:233-237 (registration)The listAllocations tool is included in the legacyTools array exported from the index, making it available for registration with the MCP server.
listAllocations, getAllocation, createAllocation, updateAllocation, deleteAllocation,