create_project
Create projects in FreshBooks with configurable billing options including hourly or fixed rates, client assignments, budgets, and due dates.
Instructions
Create a project. project_type: hourly_rate or fixed_price. billing_method: business_rate, project_rate, service_rate, team_member_rate.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| client_id | No | ||
| project_type | No | hourly_rate | |
| billing_method | No | project_rate | |
| description | No | ||
| budget | No | ||
| due_date | No |
Implementation Reference
- src/mcp_freshbooks/server.py:433-458 (handler)The create_project function is the handler for the tool that creates a new project in FreshBooks. It accepts project details, constructs the request payload, and calls the underlying client to perform the API operation.
async def create_project( title: str, client_id: int | None = None, project_type: str = "hourly_rate", billing_method: str = "project_rate", description: str = "", budget: float | None = None, due_date: str | None = None, ) -> str: """Create a project. project_type: hourly_rate or fixed_price. billing_method: business_rate, project_rate, service_rate, team_member_rate.""" data = { "title": title, "project_type": project_type, "billing_method": billing_method, } if client_id: data["client_id"] = client_id if description: data["description"] = description if budget is not None: data["budget"] = budget if due_date: data["due_date"] = due_date result = await client.projects_create("projects", "project", data) p = result.get("project", result) return f"Project '{title}' created (ID: {p.get('id')})"