Skip to main content
Glama

clear_task

Clear current task data to reset progress or start fresh within the Divide and Conquer MCP Server's structured task management system.

Instructions

Clears the current task data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the clear_task tool logic: reads the config, resets to DEFAULT_TASK_DATA, updates metadata/progress, and writes back to the config file.
    private async clearTask(): Promise<any> { try { // Write the default task data to the file await this.writeTaskData({ ...DEFAULT_TASK_DATA }); return { content: [ { type: 'text', text: 'Task cleared successfully.', }, ], }; } catch (error) { console.error('Error clearing task:', error); return { content: [ { type: 'text', text: `Error clearing task: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; }
  • The input schema for the clear_task tool, which requires no parameters.
    inputSchema: { type: 'object', properties: {}, required: [] }
  • src/index.ts:385-393 (registration)
    Registration of the clear_task tool in the listTools response, including name, description, and schema.
    { name: 'clear_task', description: 'Clears the current task data.', inputSchema: { type: 'object', properties: {}, required: [] } },
  • src/index.ts:448-449 (registration)
    Dispatch in the CallToolRequestSchema handler switch statement that routes clear_task calls to the clearTask method.
    case 'clear_task': return await this.clearTask();
  • Default task data structure used by clearTask to reset the current task to an empty state.
    const DEFAULT_TASK_DATA: TaskData = { task_description: '', checklist: [], context_for_all_tasks: '', metadata: { created_at: new Date().toISOString(), updated_at: new Date().toISOString(), progress: { completed: 0, total: 0, percentage: 0 } } };

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/landicefu/divide-and-conquer-mcp-server'

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