Skip to main content
Glama

update_task

Modify existing tasks in Harvest time tracking by updating name, billing settings, or activity status with only the fields you specify.

Instructions

Update an existing task. Can modify task name, billing settings, and activity status. Only provided fields will be updated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the task to update (required)
nameNoUpdate task name
billable_by_defaultNoUpdate default billing status
default_hourly_rateNoUpdate default hourly rate
is_defaultNoUpdate default task status
is_activeNoUpdate active status

Implementation Reference

  • The handler class UpdateTaskHandler contains the logic to execute the 'update_task' tool by calling the Harvest API.
    class UpdateTaskHandler implements ToolHandler {
      constructor(private readonly config: BaseToolConfig) {}
    
      async execute(args: Record<string, any>): Promise<CallToolResult> {
        try {
          const validatedArgs = validateInput(UpdateTaskSchema, args, 'update task');
          logger.info('Updating task via Harvest API', { taskId: validatedArgs.id });
          const task = await this.config.harvestClient.updateTask(validatedArgs);
          
          return {
            content: [{ type: 'text', text: JSON.stringify(task, null, 2) }],
          };
        } catch (error) {
          return handleMCPToolError(error, 'update_task');
        }
      }
    }
  • The registration of the 'update_task' tool in the registerTaskTools function, linking it to the UpdateTaskHandler.
    {
      tool: {
        name: 'update_task',
        description: 'Update an existing task. Can modify task name, billing settings, and activity status. Only provided fields will be updated.',
        inputSchema: {
          type: 'object',
          properties: {
            id: { type: 'number', description: 'The ID of the task to update (required)' },
            name: { type: 'string', minLength: 1, description: 'Update task name' },
            billable_by_default: { type: 'boolean', description: 'Update default billing status' },
            default_hourly_rate: { type: 'number', minimum: 0, description: 'Update default hourly rate' },
            is_default: { type: 'boolean', description: 'Update default task status' },
            is_active: { type: 'boolean', description: 'Update active status' },
          },
          required: ['id'],
          additionalProperties: false,
        },
      },
      handler: new UpdateTaskHandler(config),
    },
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the partial update behavior ('Only provided fields will be updated'), which is valuable. However, it doesn't cover critical aspects like authentication needs, rate limits, error responses, or whether the operation is idempotent or reversible.

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 concise sentences with zero waste. The first sentence states the purpose and scope, and the second clarifies the partial update behavior. It's front-loaded and efficiently structured.

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

Completeness3/5

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

For a mutation tool with no annotations and no output schema, the description is adequate but has gaps. It covers the partial update behavior but lacks details on permissions, side effects, error handling, or return values. Given the complexity of updating a task with multiple fields, more behavioral context would be beneficial.

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 description coverage is 100%, so the schema fully documents all parameters. The description adds minimal value by listing some updatable fields (name, billing settings, activity status), but doesn't provide additional context like field dependencies or validation rules beyond the schema.

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

Purpose4/5

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

The description clearly states the action ('Update') and resource ('an existing task'), and specifies the modifiable fields (name, billing settings, activity status). It distinguishes from sibling 'create_task' by focusing on updates, but doesn't explicitly differentiate from other update tools like 'update_project' or 'update_user'.

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 context by mentioning 'Only provided fields will be updated,' suggesting partial updates are supported. However, it lacks explicit guidance on when to use this versus alternatives like 'create_task' or 'delete_task,' and doesn't mention prerequisites or error conditions.

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