create_project
Create a new Harvest project with name, client ID, budget settings, billing preferences, and timeline configuration for time tracking and management.
Instructions
Create a new project for a client. Requires project name and client ID. Supports extensive configuration including budget settings, billing preferences, and project timeline.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Project name (required) | |
| client_id | Yes | The client ID this project belongs to (required) | |
| code | No | Project code for reference | |
| is_active | No | Whether the project is active | |
| is_billable | No | Whether the project is billable | |
| is_fixed_fee | No | Whether the project uses fixed fee billing | |
| bill_by | No | How to bill for this project | |
| hourly_rate | No | Default hourly rate for the project | |
| budget | No | Project budget amount | |
| budget_by | No | How budget is calculated | |
| budget_is_monthly | No | Whether budget resets monthly | |
| notify_when_over_budget | No | Send notifications when over budget | |
| over_budget_notification_percentage | No | Percentage threshold for budget notifications | |
| show_budget_to_all | No | Show budget information to all team members | |
| cost_budget | No | Cost budget for the project | |
| cost_budget_include_expenses | No | Include expenses in cost budget calculations | |
| fee | No | Fixed fee amount | |
| notes | No | Project notes | |
| starts_on | No | Project start date (YYYY-MM-DD) | |
| ends_on | No | Project end date (YYYY-MM-DD) |
Implementation Reference
- src/tools/projects.ts:63-79 (handler)The handler class that implements the logic for the 'create_project' tool. It validates input using CreateProjectSchema and calls the harvestClient.createProject method.
class CreateProjectHandler implements ToolHandler { constructor(private readonly config: BaseToolConfig) {} async execute(args: Record<string, any>): Promise<CallToolResult> { try { const validatedArgs = validateInput(CreateProjectSchema, args, 'create project'); logger.info('Creating project via Harvest API'); const project = await this.config.harvestClient.createProject(validatedArgs); return { content: [{ type: 'text', text: JSON.stringify(project, null, 2) }], }; } catch (error) { return handleMCPToolError(error, 'create_project'); } } } - src/tools/projects.ts:240-272 (registration)Registration of the 'create_project' tool, including its schema definition and link to the handler class.
tool: { name: 'create_project', description: 'Create a new project for a client. Requires project name and client ID. Supports extensive configuration including budget settings, billing preferences, and project timeline.', inputSchema: { type: 'object', properties: { name: { type: 'string', minLength: 1, description: 'Project name (required)' }, client_id: { type: 'number', description: 'The client ID this project belongs to (required)' }, code: { type: 'string', description: 'Project code for reference' }, is_active: { type: 'boolean', description: 'Whether the project is active' }, is_billable: { type: 'boolean', description: 'Whether the project is billable' }, is_fixed_fee: { type: 'boolean', description: 'Whether the project uses fixed fee billing' }, bill_by: { type: 'string', enum: ['Project', 'Tasks', 'People', 'none'], description: 'How to bill for this project' }, hourly_rate: { type: 'number', minimum: 0, description: 'Default hourly rate for the project' }, budget: { type: 'number', minimum: 0, description: 'Project budget amount' }, budget_by: { type: 'string', enum: ['project', 'project_cost', 'task', 'task_fees', 'person', 'none'], description: 'How budget is calculated' }, budget_is_monthly: { type: 'boolean', description: 'Whether budget resets monthly' }, notify_when_over_budget: { type: 'boolean', description: 'Send notifications when over budget' }, over_budget_notification_percentage: { type: 'number', minimum: 0, maximum: 100, description: 'Percentage threshold for budget notifications' }, show_budget_to_all: { type: 'boolean', description: 'Show budget information to all team members' }, cost_budget: { type: 'number', minimum: 0, description: 'Cost budget for the project' }, cost_budget_include_expenses: { type: 'boolean', description: 'Include expenses in cost budget calculations' }, fee: { type: 'number', minimum: 0, description: 'Fixed fee amount' }, notes: { type: 'string', description: 'Project notes' }, starts_on: { type: 'string', format: 'date', description: 'Project start date (YYYY-MM-DD)' }, ends_on: { type: 'string', format: 'date', description: 'Project end date (YYYY-MM-DD)' }, }, required: ['name', 'client_id'], additionalProperties: false, }, }, handler: new CreateProjectHandler(config), },