list_project_task_assignments
Retrieve task assignments for a specific Harvest project to view available tasks for time tracking and their settings.
Instructions
Retrieve task assignments for a specific project. Shows which tasks are available for time tracking on the project and their specific settings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The project ID to get task assignments for (required) | |
| is_active | No | Filter by active status | |
| updated_since | No | Filter by assignments updated since this timestamp | |
| page | No | Page number for pagination | |
| per_page | No | Number of assignments per page (max 2000) |
Implementation Reference
- src/tools/projects.ts:119-135 (handler)The handler implementation for 'list_project_task_assignments'.
class ListProjectTaskAssignmentsHandler implements ToolHandler { constructor(private readonly config: BaseToolConfig) {} async execute(args: Record<string, any>): Promise<CallToolResult> { try { const validatedArgs = validateInput(ProjectTaskAssignmentQuerySchema, args, 'project task assignments query'); logger.info('Listing project task assignments from Harvest API', { projectId: validatedArgs.project_id }); const assignments = await this.config.harvestClient.getProjectTaskAssignments(validatedArgs.project_id, validatedArgs); return { content: [{ type: 'text', text: JSON.stringify(assignments, null, 2) }], }; } catch (error) { return handleMCPToolError(error, 'list_project_task_assignments'); } } } - src/tools/projects.ts:322-340 (registration)Registration of the 'list_project_task_assignments' tool, defining its schema and associated handler.
{ tool: { name: 'list_project_task_assignments', description: 'Retrieve task assignments for a specific project. Shows which tasks are available for time tracking on the project and their specific settings.', inputSchema: { type: 'object', properties: { project_id: { type: 'number', description: 'The project ID to get task assignments for (required)' }, is_active: { type: 'boolean', description: 'Filter by active status' }, updated_since: { type: 'string', format: 'date-time', description: 'Filter by assignments updated since this timestamp' }, page: { type: 'number', minimum: 1, description: 'Page number for pagination' }, per_page: { type: 'number', minimum: 1, maximum: 2000, description: 'Number of assignments per page (max 2000)' }, }, required: ['project_id'], additionalProperties: false, }, }, handler: new ListProjectTaskAssignmentsHandler(config), },