Skip to main content
Glama

delete_project_task_assignment

Remove a task assignment from a project to prevent time tracking on that task for the specified project.

Instructions

Remove a task assignment from a project, making the task unavailable for time tracking on that project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesThe project ID (required)
task_assignment_idYesThe task assignment ID to delete (required)

Implementation Reference

  • The handler class that executes the deletion of a project task assignment.
    class DeleteProjectTaskAssignmentHandler implements ToolHandler {
      constructor(private readonly config: BaseToolConfig) {}
    
      async execute(args: Record<string, any>): Promise<CallToolResult> {
        try {
          const inputSchema = z.object({
            project_id: z.number().int().positive(),
            task_assignment_id: z.number().int().positive(),
          });
          const { project_id, task_assignment_id } = validateInput(inputSchema, args, 'delete project task assignment');
          
          logger.info('Deleting project task assignment via Harvest API', { 
            projectId: project_id, 
            taskAssignmentId: task_assignment_id 
          });
          await this.config.harvestClient.deleteProjectTaskAssignment(project_id, task_assignment_id);
          
          return {
            content: [{ type: 'text', text: JSON.stringify({ 
              message: `Task assignment ${task_assignment_id} deleted from project ${project_id} successfully` 
            }, null, 2) }],
          };
        } catch (error) {
          return handleMCPToolError(error, 'delete_project_task_assignment');
        }
  • Registration of the delete_project_task_assignment tool, including schema and handler instantiation.
      tool: {
        name: 'delete_project_task_assignment',
        description: 'Remove a task assignment from a project, making the task unavailable for time tracking on that project.',
        inputSchema: {
          type: 'object',
          properties: {
            project_id: { type: 'number', description: 'The project ID (required)' },
            task_assignment_id: { type: 'number', description: 'The task assignment ID to delete (required)' },
          },
          required: ['project_id', 'task_assignment_id'],
          additionalProperties: false,
        },
      },
      handler: new DeleteProjectTaskAssignmentHandler(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