Skip to main content
Glama

update_project

Update an existing project by modifying its settings like name, billing configuration, budget, and timeline. Only specified fields are changed.

Instructions

Update an existing project. Can modify any project settings including name, billing configuration, budget settings, and project timeline. Only provided fields will be updated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the project to update (required)
nameNoUpdate project name
codeNoUpdate project code
is_activeNoUpdate active status
is_billableNoUpdate billable status
is_fixed_feeNoUpdate fixed fee billing
bill_byNoUpdate billing method
hourly_rateNoUpdate hourly rate
budgetNoUpdate budget amount
budget_byNoUpdate budget calculation method
budget_is_monthlyNoUpdate monthly budget reset
notify_when_over_budgetNoUpdate budget notifications
over_budget_notification_percentageNoUpdate notification threshold
show_budget_to_allNoUpdate budget visibility
cost_budgetNoUpdate cost budget
cost_budget_include_expensesNoUpdate expense inclusion
feeNoUpdate fixed fee
notesNoUpdate project notes
starts_onNoUpdate start date (YYYY-MM-DD)
ends_onNoUpdate end date (YYYY-MM-DD)

Implementation Reference

  • The UpdateProjectHandler class implements the 'update_project' tool logic. It validates input using UpdateProjectSchema, calls the Harvest API's updateProject method, and returns the result. Errors are caught and handled via handleMCPToolError with the tool name 'update_project'.
    class UpdateProjectHandler implements ToolHandler {
      constructor(private readonly config: BaseToolConfig) {}
    
      async execute(args: Record<string, any>): Promise<CallToolResult> {
        try {
          const validatedArgs = validateInput(UpdateProjectSchema, args, 'update project');
          logger.info('Updating project via Harvest API', { projectId: validatedArgs.id });
          const project = await this.config.harvestClient.updateProject(validatedArgs);
          
          return {
            content: [{ type: 'text', text: JSON.stringify(project, null, 2) }],
          };
        } catch (error) {
          return handleMCPToolError(error, 'update_project');
        }
      }
  • The UpdateProjectSchema is defined by taking CreateProjectSchema (all fields optional via .partial()) and extending it with a required 'id' field (positive integer). This defines the full set of validated input fields for updating a project.
    export const UpdateProjectSchema = CreateProjectSchema.partial().extend({
      id: z.number().int().positive(),
    });
  • The tool 'update_project' is registered in the registerProjectTools function. It specifies the name 'update_project', a description, an inputSchema (JSON Schema) listing all updatable project fields with 'id' as required, and maps to new UpdateProjectHandler(config) as the handler.
    {
      tool: {
        name: 'update_project',
        description: 'Update an existing project. Can modify any project settings including name, billing configuration, budget settings, and project timeline. Only provided fields will be updated.',
        inputSchema: {
          type: 'object',
          properties: {
            id: { type: 'number', description: 'The ID of the project to update (required)' },
            name: { type: 'string', minLength: 1, description: 'Update project name' },
            code: { type: 'string', description: 'Update project code' },
            is_active: { type: 'boolean', description: 'Update active status' },
            is_billable: { type: 'boolean', description: 'Update billable status' },
            is_fixed_fee: { type: 'boolean', description: 'Update fixed fee billing' },
            bill_by: { type: 'string', enum: ['Project', 'Tasks', 'People', 'none'], description: 'Update billing method' },
            hourly_rate: { type: 'number', minimum: 0, description: 'Update hourly rate' },
            budget: { type: 'number', minimum: 0, description: 'Update budget amount' },
            budget_by: { type: 'string', enum: ['project', 'project_cost', 'task', 'task_fees', 'person', 'none'], description: 'Update budget calculation method' },
            budget_is_monthly: { type: 'boolean', description: 'Update monthly budget reset' },
            notify_when_over_budget: { type: 'boolean', description: 'Update budget notifications' },
            over_budget_notification_percentage: { type: 'number', minimum: 0, maximum: 100, description: 'Update notification threshold' },
            show_budget_to_all: { type: 'boolean', description: 'Update budget visibility' },
            cost_budget: { type: 'number', minimum: 0, description: 'Update cost budget' },
            cost_budget_include_expenses: { type: 'boolean', description: 'Update expense inclusion' },
            fee: { type: 'number', minimum: 0, description: 'Update fixed fee' },
            notes: { type: 'string', description: 'Update project notes' },
            starts_on: { type: 'string', format: 'date', description: 'Update start date (YYYY-MM-DD)' },
            ends_on: { type: 'string', format: 'date', description: 'Update end date (YYYY-MM-DD)' },
          },
          required: ['id'],
          additionalProperties: false,
        },
      },
      handler: new UpdateProjectHandler(config),
    },
  • The ProjectsClient.updateProject method is the actual HTTP API client helper. It destructures 'id' from the input, performs a PATCH request to /projects/{id}, logs the operation, and returns the response data.
    async updateProject(input: any): Promise<any> {
      try {
        const { id, ...updateData } = input;
        
        this.logger.debug('Updating project', {
          projectId: id,
          updateFields: Object.keys(updateData)
        });
        
        const response = await this.client.patch(`/projects/${id}`, updateData);
        
        this.logger.info('Successfully updated project', {
          projectId: response.data.id,
          projectName: response.data.name
        });
        
        return response.data;
      } catch (error) {
        this.logger.error('Failed to update project:', error);
        throw error;
      }
    }
  • The HarvestApi.updateProject method is a thin wrapper that delegates to projectsClient.updateProject(input). This is the intermediary between the tool handler and the low-level HTTP client.
    async updateProject(input: any): Promise<any> {
      return this.projectsClient.updateProject(input);
    }
Behavior2/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 of behavioral disclosure. It notes that only provided fields are updated (partial update), which is useful, but it omits any mention of return behavior, side effects, permissions required, rate limits, or error handling. For a mutation tool with 20 parameters, this is insufficient.

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 with no wasted words. The first sentence front-loads the core action, and the second adds critical detail about partial updates. Ideal length for clarity.

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

Completeness2/5

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

With 20 parameters, no output schema, and no annotations, the description is minimal. It does not explain what the tool returns after update, what happens on invalid input, or any side effects. For a complex update tool, more context is needed.

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

Parameters3/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 groups parameters into categories (name, billing, budget, timeline), which adds some meaning, but it does not provide additional semantic nuance beyond what the schema descriptions already offer.

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 it updates an existing project and lists categories of settings (name, billing, budget, timeline). This distinguishes it effectively from sibling tools like create_project (creation) and delete_project (deletion), as well as get_project (retrieval).

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

Usage Guidelines3/5

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

The description implies usage for modifying an existing project but does not explicitly state when to prefer this over alternatives (e.g., create_project for new projects) or what prerequisites are needed (e.g., project existence). No exclusions are mentioned.

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