Skip to main content
Glama
brysontang

DeltaTask MCP Server

by brysontang

create_subtasks

Break down complex tasks into manageable subtasks with categories to organize work and track progress in your task management system.

Instructions

Create multiple subtasks for a parent task with categories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes
subtasksYes

Implementation Reference

  • server.py:77-80 (handler)
    MCP tool handler function for 'create_subtasks', registered via @mcp.tool() decorator. Delegates to TaskService.create_subtasks.
    @mcp.tool()
    async def create_subtasks(task_id: str, subtasks: list[dict[str, Any]]) -> dict[str, Any]:
        """Create multiple subtasks for a parent task with categories."""
        return service.create_subtasks(task_id, subtasks)
  • Core implementation of create_subtasks in TaskService class. Validates parent task, sets parent_id on each subtask, calls add_task to create them, and returns subtask IDs.
    def create_subtasks(self, task_id: str, 
                      subtasks: List[Dict[str, Any]]) -> Dict[str, Any]:
        """Create subtasks for a task and return their IDs."""
        # Check if parent task exists
        parent_task = self.repository.get_todo_by_id(task_id)
        if not parent_task:
            return {"error": "Parent task not found"}
        
        subtask_ids = []
        
        # Create each subtask
        for subtask in subtasks:
            subtask['parent_id'] = task_id
            subtask_id = self._ensure_id(subtask)
            self.add_task(subtask)
            subtask_ids.append(subtask_id)
        
        return {
            "message": f"Created {len(subtask_ids)} subtasks",
            "subtask_ids": subtask_ids
        }

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/brysontang/DeltaTask'

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