harvest_list_users
Retrieve and filter user accounts in Harvest to manage team access and permissions for time tracking and project management.
Instructions
List all users in the account with filtering. Use about {"tool": "harvest_list_users"} for detailed parameters and examples.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| is_active | No | Filter by active status | |
| page | No | Page number | |
| per_page | No | Results per page (max 100) |
Implementation Reference
- src/index.ts:222-231 (handler)The handler case in the MCP tool execution switch statement that invokes harvestClient.getUsers with the provided arguments and formats the response as MCP content.case 'harvest_list_users': const users = await harvestClient.getUsers(typedArgs); return { content: [ { type: 'text', text: JSON.stringify(users, null, 2), }, ], };
- src/tools.ts:152-163 (schema)Defines the tool metadata including name, description, and input schema for parameter validation.{ name: 'harvest_list_users', description: 'List all users in the account with filtering. Use about {"tool": "harvest_list_users"} for detailed parameters and examples.', inputSchema: { type: 'object', properties: { is_active: { type: 'boolean', description: 'Filter by active status' }, page: { type: 'number', description: 'Page number' }, per_page: { type: 'number', description: 'Results per page (max 100)' } } } },
- src/index.ts:68-73 (registration)Registers the tools list (including harvest_list_users) with the MCP server for tool discovery via ListToolsRequest.// Handle tool listing server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: tools, }; });
- src/harvest-client.ts:137-140 (helper)The supporting method in HarvestClient that performs the actual API request to /users endpoint with query parameters.async getUsers(options?: any) { const queryString = this.buildQueryString(options); return this.makeRequest(`/users${queryString}`); }