Skip to main content
Glama

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
NameRequiredDescriptionDefault
nameYesProject name (required)
client_idYesThe client ID this project belongs to (required)
codeNoProject code for reference
is_activeNoWhether the project is active
is_billableNoWhether the project is billable
is_fixed_feeNoWhether the project uses fixed fee billing
bill_byNoHow to bill for this project
hourly_rateNoDefault hourly rate for the project
budgetNoProject budget amount
budget_byNoHow budget is calculated
budget_is_monthlyNoWhether budget resets monthly
notify_when_over_budgetNoSend notifications when over budget
over_budget_notification_percentageNoPercentage threshold for budget notifications
show_budget_to_allNoShow budget information to all team members
cost_budgetNoCost budget for the project
cost_budget_include_expensesNoInclude expenses in cost budget calculations
feeNoFixed fee amount
notesNoProject notes
starts_onNoProject start date (YYYY-MM-DD)
ends_onNoProject end date (YYYY-MM-DD)

Implementation Reference

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

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