Skip to main content
Glama

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
NameRequiredDescriptionDefault
project_idYesThe project ID to get task assignments for (required)
is_activeNoFilter by active status
updated_sinceNoFilter by assignments updated since this timestamp
pageNoPage number for pagination
per_pageNoNumber of assignments per page (max 2000)

Implementation Reference

  • 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');
        }
      }
    }
  • 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),
    },

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/ianaleck/harvest-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server