Skip to main content
Glama
landicefu

Divide and Conquer MCP Server

by landicefu

initialize_task

Creates a new task with description and optional checklist items to break down complex work into manageable pieces for structured tracking and progress monitoring.

Instructions

Creates a new task with the specified description and optional initial checklist items.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_descriptionYesA medium-level detailed description about the whole task
context_for_all_tasksNoInformation that all tasks in the checklist should include
initial_checklistNoOptional initial checklist items
metadataNoOptional metadata for the task

Implementation Reference

  • The core handler function that implements the logic for the 'initialize_task' tool. It creates a new TaskData object from arguments, ensures checklist items have 'done' property, persists it to file, and returns success or error response.
    private async initializeTask(args: any): Promise<any> {
      if (!args?.task_description) {
        throw new McpError(ErrorCode.InvalidParams, 'Task description is required');
      }
    
      try {
        // Create a new task data object
        const taskData: TaskData = {
          task_description: args.task_description,
          checklist: args.initial_checklist || [],
          context_for_all_tasks: args.context_for_all_tasks || '',
          metadata: {
            created_at: new Date().toISOString(),
            updated_at: new Date().toISOString(),
            progress: {
              completed: 0,
              total: args.initial_checklist ? args.initial_checklist.length : 0,
              percentage: 0
            },
            ...(args.metadata || {})
          },
          notes: [],
          resources: []
        };
        
        // Ensure all checklist items have the done property
        taskData.checklist = taskData.checklist.map(item => ({
          ...item,
          done: item.done || false
        }));
        
        // Write the task data to the file
        await this.writeTaskData(taskData);
        
        return {
          content: [
            {
              type: 'text',
              text: 'Task initialized successfully.',
            },
          ],
        };
      } catch (error) {
        console.error('Error initializing task:', error);
        return {
          content: [
            {
              type: 'text',
              text: `Error initializing task: ${error instanceof Error ? error.message : String(error)}`,
            },
          ],
          isError: true,
        };
      }
    }
  • The input schema defining the expected arguments for the 'initialize_task' tool, including task_description (required), context_for_all_tasks, initial_checklist, and metadata.
    inputSchema: {
      type: 'object',
      properties: {
        task_description: {
          type: 'string',
          description: 'A medium-level detailed description about the whole task'
        },
        context_for_all_tasks: {
          type: 'string',
          description: 'Information that all tasks in the checklist should include'
        },
        initial_checklist: {
          type: 'array',
          description: 'Optional initial checklist items',
          items: {
            type: 'object',
            properties: {
              task: {
                type: 'string',
                description: 'A short yet comprehensive name for the task'
              },
              detailed_description: {
                type: 'string',
                description: 'A longer description about what we want to achieve with this task'
              },
              context_and_plan: {
                type: 'string',
                description: 'Related information, files the agent should read, and more details from other tasks, as well as a detailed plan for this task'
              },
              done: {
                type: 'boolean',
                description: 'Whether the task is already completed',
                default: false
              }
            },
            required: ['task', 'detailed_description']
          }
        },
        metadata: {
          type: 'object',
          description: 'Optional metadata for the task',
          properties: {
            tags: {
              type: 'array',
              items: {
                type: 'string'
              },
              description: 'Tags to categorize the task'
            },
            priority: {
              type: 'string',
              enum: ['high', 'medium', 'low'],
              description: 'Priority level of the task'
            },
            estimated_completion_time: {
              type: 'string',
              description: 'Estimated completion time (ISO timestamp or duration)'
            }
          }
        }
      },
      required: ['task_description']
    }
  • src/index.ts:423-425 (registration)
    The switch case in the CallToolRequestSchema handler that dispatches calls to the 'initialize_task' handler function.
    switch (request.params.name) {
      case 'initialize_task':
        return await this.initializeTask(request.params.arguments);
  • src/index.ts:108-174 (registration)
    The tool registration entry in the ListToolsRequestSchema response, providing name, description, and schema for discovery.
    {
      name: 'initialize_task',
      description: 'Creates a new task with the specified description and optional initial checklist items.',
      inputSchema: {
        type: 'object',
        properties: {
          task_description: {
            type: 'string',
            description: 'A medium-level detailed description about the whole task'
          },
          context_for_all_tasks: {
            type: 'string',
            description: 'Information that all tasks in the checklist should include'
          },
          initial_checklist: {
            type: 'array',
            description: 'Optional initial checklist items',
            items: {
              type: 'object',
              properties: {
                task: {
                  type: 'string',
                  description: 'A short yet comprehensive name for the task'
                },
                detailed_description: {
                  type: 'string',
                  description: 'A longer description about what we want to achieve with this task'
                },
                context_and_plan: {
                  type: 'string',
                  description: 'Related information, files the agent should read, and more details from other tasks, as well as a detailed plan for this task'
                },
                done: {
                  type: 'boolean',
                  description: 'Whether the task is already completed',
                  default: false
                }
              },
              required: ['task', 'detailed_description']
            }
          },
          metadata: {
            type: 'object',
            description: 'Optional metadata for the task',
            properties: {
              tags: {
                type: 'array',
                items: {
                  type: 'string'
                },
                description: 'Tags to categorize the task'
              },
              priority: {
                type: 'string',
                enum: ['high', 'medium', 'low'],
                description: 'Priority level of the task'
              },
              estimated_completion_time: {
                type: 'string',
                description: 'Estimated completion time (ISO timestamp or duration)'
              }
            }
          }
        },
        required: ['task_description']
      }
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While it correctly identifies this as a creation operation ('Creates'), it doesn't mention important behavioral aspects: whether this requires specific permissions, what happens if a task with the same description already exists, whether the task is immediately active or in draft state, or what the response looks like. For a creation tool with zero annotation coverage, this leaves significant gaps in understanding the tool's behavior.

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 perfectly concise and well-structured: a single sentence that clearly states the core functionality. Every word earns its place - 'Creates' (verb), 'new task' (resource), 'specified description' (primary parameter), and 'optional initial checklist items' (secondary functionality). There's no wasted language or redundancy.

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 creation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address what happens after creation (e.g., does it return a task ID?), error conditions, or how this tool relates to the ecosystem of 14 sibling tools. The agent would need to guess about the tool's behavior in the broader task management context, making this description inadequate for confident tool selection and invocation.

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 description mentions 'specified description and optional initial checklist items,' which maps to two of the four parameters. However, with 100% schema description coverage, the schema already documents all parameters thoroughly. The description adds minimal value beyond what's in the schema - it doesn't explain the relationship between parameters or provide usage examples. The baseline of 3 is appropriate when the schema does the heavy lifting.

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 tool's purpose: 'Creates a new task with the specified description and optional initial checklist items.' It includes a specific verb ('Creates') and resource ('new task'), and mentions key parameters. However, it doesn't explicitly differentiate from sibling tools like 'add_checklist_item' or 'update_task_description', which could create ambiguity about when to use this tool versus others for task-related operations.

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. With 14 sibling tools available (including 'add_checklist_item', 'update_task_description', etc.), there's no indication whether this is the primary creation tool or if it should be used only for specific scenarios. The description mentions 'optional initial checklist items' but doesn't explain when to include them versus using 'add_checklist_item' later.

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