Skip to main content
Glama

deleteTask

Destructive

Remove a task from Teamwork projects by specifying its ID to manage project workflows and maintain task lists.

Instructions

Delete a task from Teamwork

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesThe ID of the task to delete

Implementation Reference

  • The handleDeleteTask function that executes the tool logic: validates input, calls the service, logs, handles errors, and returns MCP response.
    export async function handleDeleteTask(input: any) {
      logger.info('Calling teamworkService.deleteTask()');
      logger.info(`Task ID: ${input?.taskId}`);
      
      try {
        const taskId = String(input?.taskId);
        if (!taskId) {
          throw new Error("Task ID is required");
        }
        
        const result = await teamworkService.deleteTask(taskId);
        logger.info(`Task deleted successfully for task ID: ${taskId}`);
        
        return {
          content: [{
            type: "text",
            text: JSON.stringify({ success: result }, null, 2)
          }]
        };
      } catch (error: any) {
        return createErrorResponse(error, 'Deleting task');
      }
    } 
  • Tool definition including name, description, input schema (taskId: integer, required), and annotations (destructive).
    export const deleteTaskDefinition = {
      name: "deleteTask",
      description: "Delete a task from Teamwork",
      inputSchema: {
        type: "object",
        properties: {
          taskId: {
            type: "integer",
            description: "The ID of the task to delete"
          }
        },
        required: ["taskId"]
      },
      annotations: {
        title: "Delete a Task",
        readOnlyHint: false,
        destructiveHint: true,
        openWorldHint: false
      }
    };
  • Registration of the deleteTask tool in the toolPairs array, linking definition and handler.
    { definition: deleteTask, handler: handleDeleteTask },
  • Supporting service function that performs the actual API deletion of the task via Teamwork API.
    export const deleteTask = async (taskId: string) => {
      try {
        const api = ensureApiClient();
        await api.delete(`/tasks/${taskId}.json`);
        return true;
      } catch (error: any) {
        logger.error(`Error deleting task ${taskId}: ${error.message}`);
        throw new Error(`Failed to delete task ${taskId}`);
      }
    };
Behavior3/5

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

Annotations already indicate destructiveHint=true and readOnlyHint=false, so the agent knows this is a destructive write operation. The description adds no behavioral context beyond this, such as irreversible effects, permission requirements, or error handling. Since annotations cover the safety profile, a baseline score is appropriate with minimal added value.

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 a single, direct sentence with no wasted words, making it highly efficient and front-loaded. It immediately conveys the core action without unnecessary elaboration, which is ideal for tool selection.

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?

Given the destructive nature (annotations cover this), single parameter with full schema coverage, and no output schema, the description is minimally adequate. However, it lacks context on outcomes (e.g., what happens to subtasks or comments) or error cases, which could be helpful for a mutation tool without output schema.

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, with 'taskId' clearly documented as 'The ID of the task to delete'. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints, so it meets the baseline for high schema coverage.

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 ('Delete') and resource ('a task from Teamwork'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'deleteCompany' or 'deletePerson' beyond specifying the resource type, which keeps it from a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., task must exist), exclusions (e.g., cannot delete if in use), or related tools like 'updateTask' or 'getTaskById' for verification, leaving the agent without contextual usage cues.

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/Vizioz/Teamwork-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server