Skip to main content
Glama
rafliruslan

TickTick MCP Server

by rafliruslan

delete_task

Remove a task from TickTick task management by specifying its task ID and project ID to maintain organized workflows.

Instructions

Delete a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesTask ID to delete (required)
projectIdYesProject ID containing the task (required)

Implementation Reference

  • Core handler function that authenticates and makes the API DELETE request to remove the task from the specified project.
    async deleteTask(taskId: string, projectId: string): Promise<void> {
      await this.ensureAuthenticated();
      
      try {
        await this.client.delete(`/project/${projectId}/task/${taskId}`);
      } catch (error) {
        throw new Error(`Failed to delete task: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
  • MCP server handler for the delete_task tool, which validates input parameters and calls the TickTickClient's deleteTask method.
    case 'delete_task':
      if (!args?.taskId || !args?.projectId) {
        throw new McpError(ErrorCode.InvalidParams, 'Task ID and Project ID are required');
      }
      await this.ticktickClient!.deleteTask(args.taskId as string, args.projectId as string);
      return {
        content: [
          {
            type: 'text',
            text: 'Task deleted successfully',
          },
        ],
      };
  • src/index.ts:161-177 (registration)
    Registration of the delete_task tool in the ListTools handler, defining name, description, and input schema.
      name: 'delete_task',
      description: 'Delete a task',
      inputSchema: {
        type: 'object',
        properties: {
          taskId: {
            type: 'string',
            description: 'Task ID to delete (required)',
          },
          projectId: {
            type: 'string',
            description: 'Project ID containing the task (required)',
          },
        },
        required: ['taskId', 'projectId'],
      },
    },
  • Input schema definition for the delete_task tool, specifying required taskId and projectId parameters.
    inputSchema: {
      type: 'object',
      properties: {
        taskId: {
          type: 'string',
          description: 'Task ID to delete (required)',
        },
        projectId: {
          type: 'string',
          description: 'Project ID containing the task (required)',
        },
      },
      required: ['taskId', 'projectId'],
    },

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/rafliruslan/ticktick-mcp-server'

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