Skip to main content
Glama

create_project

Create a new project for a client by specifying the project name and client ID, with optional budget, billing, and timeline settings.

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

  • CreateProjectHandler - The core handler class that executes the create_project tool logic. It validates input using CreateProjectSchema, calls harvestClient.createProject(), and returns the result.
    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');
        }
      }
    }
  • CreateProjectSchema - Zod schema defining all input fields for creating a project (name, client_id, billing config, budget, dates, etc.) with validation constraints and defaults.
    export const CreateProjectSchema = z.object({
      name: z.string().min(1, 'Project name is required'),
      client_id: z.number().int().positive(),
      code: z.string().optional(),
      is_active: z.boolean().optional().default(true),
      is_billable: z.boolean().optional().default(true),
      is_fixed_fee: z.boolean().optional().default(false),
      bill_by: z.enum(['Project', 'Tasks', 'People', 'none']).optional().default('none'),
      hourly_rate: z.number().min(0).optional(),
      budget: z.number().min(0).optional(),
      budget_by: z.enum(['project', 'project_cost', 'task', 'task_fees', 'person', 'none']).optional(),
      budget_is_monthly: z.boolean().optional().default(false),
      notify_when_over_budget: z.boolean().optional().default(false),
      over_budget_notification_percentage: z.number().min(0).max(100).optional(),
      show_budget_to_all: z.boolean().optional().default(false),
      cost_budget: z.number().min(0).optional(),
      cost_budget_include_expenses: z.boolean().optional().default(false),
      fee: z.number().min(0).optional(),
      notes: z.string().optional(),
      starts_on: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, 'Date must be in YYYY-MM-DD format').optional(),
      ends_on: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, 'Date must be in YYYY-MM-DD format').optional(),
    });
  • Tool registration entry for 'create_project' in registerProjectTools(). Defines the tool name, description, JSON input schema, and binds the CreateProjectHandler instance.
    {
      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),
    },
  • ProjectsClient.createProject() - Low-level HTTP client method that POSTs to /projects via Axios to create the project in the Harvest API.
    async createProject(input: any): Promise<any> {
      try {
        this.logger.debug('Creating project', {
          name: input.name,
          clientId: input.client_id
        });
        
        const response = await this.client.post('/projects', input);
        
        this.logger.info('Successfully created project', {
          projectId: response.data.id,
          projectName: response.data.name,
          clientId: response.data.client.id
        });
        
        return response.data;
      } catch (error) {
        this.logger.error('Failed to create project:', error);
        throw error;
      }
    }
  • HarvestAPIClient.createProject() - Facade method that delegates to projectsClient.createProject().
    async createProject(input: any): Promise<any> {
      return this.projectsClient.createProject(input);
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool creates a project (a write operation) and supports extensive configuration. However, it lacks details on side effects, authentication needs, or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, front-loads the core action and requirements, and includes no filler. Every sentence serves a purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 20 parameters and no output schema, the description adequately summarizes the tool's capabilities. It covers the main functional areas but lacks mention of return values or potential side effects. Given the complexity, it is fairly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds value by grouping parameters into 'budget settings, billing preferences, and project timeline,' providing a higher-level understanding beyond individual schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Create a new project for a client' with a specific verb and resource. It distinguishes itself from sibling tools like create_client, create_estimate, etc., all of which target different resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly requires 'project name and client ID' as prerequisites. While it doesn't mention when not to use or provide alternatives, the tool's purpose is clear among many create tools, and the requirement hints are helpful.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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