Skip to main content
Glama

delete_task

Archive a task in Harvest time tracking to make it inactive while preserving historical data for reporting and record-keeping purposes.

Instructions

Delete (archive) a task. This action archives the task rather than permanently deleting it, preserving historical data while making it inactive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe ID of the task to delete

Implementation Reference

  • Handler class that implements the deletion logic for a task using the Harvest client.
    class DeleteTaskHandler implements ToolHandler {
      constructor(private readonly config: BaseToolConfig) {}
    
      async execute(args: Record<string, any>): Promise<CallToolResult> {
        try {
          const inputSchema = z.object({ task_id: z.number().int().positive() });
          const { task_id } = validateInput(inputSchema, args, 'delete task');
          
          logger.info('Deleting task via Harvest API', { taskId: task_id });
          await this.config.harvestClient.deleteTask(task_id);
          
          return {
            content: [{ type: 'text', text: JSON.stringify({ message: `Task ${task_id} deleted successfully` }, null, 2) }],
          };
        } catch (error) {
          return handleMCPToolError(error, 'delete_task');
        }
      }
    }
  • Tool registration configuration for delete_task.
    {
      tool: {
        name: 'delete_task',
        description: 'Delete (archive) a task. This action archives the task rather than permanently deleting it, preserving historical data while making it inactive.',
        inputSchema: {
          type: 'object',
          properties: {
            task_id: { type: 'number', description: 'The ID of the task to delete' },
          },
          required: ['task_id'],
          additionalProperties: false,
        },
      },
      handler: new DeleteTaskHandler(config),
    },
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively explains that the action archives rather than permanently deletes, preserving historical data and making the task inactive, which are crucial behavioral traits for a mutation tool. However, it lacks details on permissions, reversibility, 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 front-loaded with the core action and resource, followed by clarifying archival behavior in a single, efficient sentence. There is no wasted text, and every part contributes directly to understanding the tool's purpose and behavior.

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 adequately covers the archival behavior but lacks information on return values, error conditions, or side effects. It is minimally viable but has clear gaps in completeness given the tool's complexity.

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?

The input schema has 100% description coverage, fully documenting the 'task_id' parameter. The description does not add any semantic details beyond what the schema provides, such as format constraints or examples, so it meets the baseline for high schema coverage without extra value.

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 the specific action ('Delete (archive)') and resource ('a task'), distinguishing it from siblings like 'delete_client' or 'delete_project' by focusing on tasks. It also clarifies the archival behavior, which adds nuance beyond a simple deletion.

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 when archiving a task is needed, but it does not explicitly state when to use this tool versus alternatives like 'update_task' for deactivation or other delete tools for different resources. No prerequisites or 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