delete-task
Delete a task or allocation from float.com by providing its task ID to remove it from the schedule.
Instructions
Delete a task/allocation
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The task ID (task_id) |
Implementation Reference
- Handler function for the 'delete-task' tool. Calls floatApi.delete to send a DELETE request to /tasks/{task_id}, then returns a success message.
// Delete task export const deleteTask = createTool( 'delete-task', 'Delete a task/allocation', z.object({ task_id: z.union([z.string(), z.number()]).describe('The task ID (task_id)'), }), async (params) => { await floatApi.delete(`/tasks/${params.task_id}`); return { success: true, message: 'Task deleted successfully' }; } ); - Input schema for the delete-task tool: expects a single 'task_id' parameter that can be a string or number.
z.object({ task_id: z.union([z.string(), z.number()]).describe('The task ID (task_id)'), }), - src/services/float-api.ts:663-667 (helper)The floatApi.delete method used by the delete-task handler to make the actual HTTP DELETE request to the Float API.
async delete<T>(url: string, schema?: z.ZodType<T>, format: ResponseFormat = 'json'): Promise<T> { return this.handleRateLimitRetry(() => this.makeRequest<T>('DELETE', url, undefined, schema, format) ); } - src/tools/index.ts:227-227 (registration)Registration of deleteTask in the legacyTools array, making it available as part of the MCP server tools.
deleteTask, - src/tools/index.ts:62-63 (registration)Import of deleteTask from the tasks.ts module into the tools index for registration.
deleteTask, } from './project-management/tasks.js';