harvest_list_project_assignments
Retrieve your assigned projects from Harvest to track time and manage tasks effectively.
Instructions
List project assignments for the current user. Use about {"tool": "harvest_list_project_assignments"} for detailed usage.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number | |
| per_page | No | Results per page (max 100) |
Implementation Reference
- src/harvest-client.ts:167-170 (handler)Core handler function that executes the tool logic by making the Harvest API request to /users/me/project_assignments with optional pagination parameters.async getProjectAssignments(options?: any) { const queryString = this.buildQueryString(options); return this.makeRequest(`/users/me/project_assignments${queryString}`); }
- src/index.ts:258-267 (handler)MCP server tool call handler that delegates to HarvestClient and formats the JSON response.case 'harvest_list_project_assignments': const projectAssignments = await harvestClient.getProjectAssignments(typedArgs); return { content: [ { type: 'text', text: JSON.stringify(projectAssignments, null, 2), }, ], };
- src/tools.ts:198-207 (schema)Tool schema definition including name, description, and input validation schema.name: 'harvest_list_project_assignments', description: 'List project assignments for the current user. Use about {"tool": "harvest_list_project_assignments"} for detailed usage.', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Page number' }, per_page: { type: 'number', description: 'Results per page (max 100)' } } } },
- src/index.ts:69-73 (registration)Registers the list of tools (including this one) for the MCP server.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: tools, }; });
- src/harvest-client.ts:825-872 (helper)Detailed documentation string for the tool, used by the 'about' tool.'harvest_list_project_assignments': `# harvest_list_project_assignments Lists project assignments for the current user. ## Purpose See which projects you have access to and can log time against. ## Parameters - \`page\` (number, optional): Page number for pagination - \`per_page\` (number, optional): Results per page, max 100 ## Example Usage **List your project assignments:** \`\`\`json { "tool": "harvest_list_project_assignments" } \`\`\` **With pagination:** \`\`\`json { "tool": "harvest_list_project_assignments", "page": 1, "per_page": 25 } \`\`\` ## Response Format Returns object with: - \`project_assignments\`: Array of assignment objects - Pagination information Each assignment includes: - \`id\`: Assignment ID - \`project\`: Full project object - \`client\`: Full client object - \`hourly_rate\`: Your rate for this project - \`budget\`: Budget information - \`is_active\`: Assignment status - \`created_at\`, \`updated_at\`: Timestamps ## Usage Tips - Essential for finding valid project_id values for time entries - Shows your specific hourly rate per project - Use with harvest_list_task_assignments to get complete assignment info`,