Skip to main content
Glama
landicefu

Divide and Conquer MCP Server

by landicefu

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
        }
      }
    };
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'Clears' implies a destructive mutation, but it doesn't specify whether this is reversible, what exactly gets cleared (e.g., checklist items, notes, metadata), or if it requires confirmation. This leaves significant behavioral gaps for a mutation tool.

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, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it immediately understandable without any structural issues.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/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 is inadequate. It doesn't explain what 'clearing' entails, what data is affected, whether it's permanent, or what happens after execution. Given the complexity of task management and rich sibling tools, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a baseline score of 4 for not adding unnecessary information.

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 ('clears') and the resource ('current task data'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'mark_task_done' or 'update_task_description' which also modify task state, leaving some ambiguity about when to choose this specific tool.

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'mark_task_done', 'update_task_description', and 'initialize_task' that also affect task state, the description offers no context about prerequisites, timing, or what 'clearing' entails compared to other modifications.

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

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