Skip to main content
Glama

plan_task

Break down user requests into structured tasks with subtasks, dependencies, and notes to initiate organized workflows in TaskFlow MCP.

Instructions

Register a new user request and plan its associated tasks. You must provide 'originalRequest' and 'tasks', and optionally 'splitDetails'.

Tasks can now include subtasks, which are smaller units of work that make up a task. All subtasks must be completed before a task can be marked as done.

You can also include:

  • 'dependencies': List of project or task-specific dependencies (libraries, tools, etc.)

  • 'notes': General notes about the project (preferences, guidelines, etc.)

  • 'outputPath': Path to save a Markdown file with the task plan for reference. It's recommended to use absolute paths (e.g., 'C:/Users/username/Documents/task-plan.md') rather than relative paths for more reliable file creation.

This tool initiates a new workflow for handling a user's request. The workflow is as follows:

  1. Use 'plan_task' to register a request and its tasks (with optional subtasks, dependencies, and notes).

  2. After adding tasks, you MUST use 'get_next_task' to retrieve the first task. A progress table will be displayed.

  3. Use 'get_next_task' to retrieve the next uncompleted task.

  4. If the task has subtasks, complete each subtask using 'mark_subtask_done' before marking the task as done.

  5. IMPORTANT: After marking a task as done, a progress table will be displayed showing the updated status of all tasks. The assistant MUST NOT proceed to another task without the user's approval. Ask the user for approval before proceeding.

  6. Once the user approves the completed task, you can proceed to 'get_next_task' again to fetch the next pending task.

  7. Repeat this cycle until all tasks are done.

  8. After all tasks are completed, 'get_next_task' will indicate that all tasks are done. At this point, ask the user for confirmation that the entire request has been completed satisfactorily.

  9. If the user wants more tasks, you can use 'add_tasks_to_request' or 'plan_task' to add new tasks and continue the cycle.

The critical point is to always wait for user approval after completing each task and after all tasks are done. Do not proceed automatically, UNLESS the user has explicitly told you to continue with all tasks and that you do not need approval.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originalRequestYes
splitDetailsNo
outputPathNo
dependenciesNo
notesNo
tasksYes

Implementation Reference

  • The executing handler for the 'plan_task' tool. Destructures input arguments and calls the TaskFlowService.requestPlanning method to register the request and plan tasks.
    async plan_task(args: any) { const { originalRequest, tasks, splitDetails, outputPath, dependencies, notes, } = args ?? {}; return service.requestPlanning( String(originalRequest), tasks ?? [], splitDetails, outputPath, dependencies, notes ); },
  • Registration of the 'plan_task' tool (as PLAN_TASK_TOOL) in the server's list of available tools, returned by ListToolsRequestSchema handler.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ PLAN_TASK_TOOL, GET_NEXT_TASK_TOOL, MARK_TASK_DONE_TOOL, OPEN_TASK_DETAILS_TOOL, LIST_REQUESTS_TOOL, ADD_TASKS_TO_REQUEST_TOOL, UPDATE_TASK_TOOL, DELETE_TASK_TOOL, ADD_SUBTASKS_TOOL, MARK_SUBTASK_DONE_TOOL, UPDATE_SUBTASK_TOOL, DELETE_SUBTASK_TOOL, EXPORT_TASK_STATUS_TOOL, ADD_NOTE_TOOL, UPDATE_NOTE_TOOL, DELETE_NOTE_TOOL, ADD_DEPENDENCY_TOOL, GET_PROMPTS_TOOL, SET_PROMPTS_TOOL, UPDATE_PROMPTS_TOOL, REMOVE_PROMPTS_TOOL, ARCHIVE_COMPLETED_REQUESTS_TOOL, LIST_ARCHIVED_REQUESTS_TOOL, RESTORE_ARCHIVED_REQUEST_TOOL, ], }));
  • Tool definition including the input schema for 'plan_task', defining parameters like originalRequest, tasks, dependencies, etc.
    export const PLAN_TASK_TOOL: Tool = { name: "plan_task", description: "Register a new user request and plan its associated tasks. You must provide 'originalRequest' and 'tasks', and optionally 'splitDetails'.\n\n" + "Tasks can now include subtasks, which are smaller units of work that make up a task. All subtasks must be completed before a task can be marked as done.\n\n" + "You can also include:\n" + "- 'dependencies': List of project or task-specific dependencies (libraries, tools, etc.)\n" + "- 'notes': General notes about the project (preferences, guidelines, etc.)\n" + "- 'outputPath': Path to save a Markdown file with the task plan for reference. It's recommended to use absolute paths (e.g., 'C:/Users/username/Documents/task-plan.md') rather than relative paths for more reliable file creation.\n\n" + "This tool initiates a new workflow for handling a user's request. The workflow is as follows:\n" + "1. Use 'plan_task' to register a request and its tasks (with optional subtasks, dependencies, and notes).\n" + "2. After adding tasks, you MUST use 'get_next_task' to retrieve the first task. A progress table will be displayed.\n" + "3. Use 'get_next_task' to retrieve the next uncompleted task.\n" + "4. If the task has subtasks, complete each subtask using 'mark_subtask_done' before marking the task as done.\n" + "5. **IMPORTANT:** After marking a task as done, a progress table will be displayed showing the updated status of all tasks. The assistant MUST NOT proceed to another task without the user's approval. Ask the user for approval before proceeding.\n" + "6. Once the user approves the completed task, you can proceed to 'get_next_task' again to fetch the next pending task.\n" + "7. Repeat this cycle until all tasks are done.\n" + "8. After all tasks are completed, 'get_next_task' will indicate that all tasks are done. At this point, ask the user for confirmation that the entire request has been completed satisfactorily.\n" + "9. If the user wants more tasks, you can use 'add_tasks_to_request' or 'plan_task' to add new tasks and continue the cycle.\n\n" + "The critical point is to always wait for user approval after completing each task and after all tasks are done. Do not proceed automatically, UNLESS the user has explicitly told you to continue with all tasks and that you do not need approval.", inputSchema: { type: "object", properties: { originalRequest: { type: "string" }, splitDetails: { type: "string" }, outputPath: { type: "string" }, dependencies: { type: "array", items: { type: "object", properties: { name: { type: "string" }, version: { type: "string" }, url: { type: "string" }, description: { type: "string" }, }, required: ["name"], }, }, notes: { type: "array", items: { type: "object", properties: { title: { type: "string" }, content: { type: "string" }, }, required: ["title", "content"], }, }, tasks: { type: "array", items: { type: "object", properties: { title: { type: "string" }, description: { type: "string" }, dependencies: { type: "array", items: { type: "object", properties: { name: { type: "string" }, version: { type: "string" }, url: { type: "string" }, description: { type: "string" }, }, required: ["name"], }, }, subtasks: { type: "array", items: { type: "object", properties: { title: { type: "string" }, description: { type: "string" }, }, required: ["title", "description"], }, }, }, required: ["title", "description"], }, }, }, required: ["originalRequest", "tasks"], }, };
  • JSON schema definition for 'plan_task' input validation in TaskFlowSchemas.ts (matches the inline tool schema).
    plan_task: { type: "object", properties: { originalRequest: { type: "string" }, tasks: { type: "array", items: taskInputJson }, splitDetails: { type: "string" }, outputPath: { type: "string" }, dependencies: { type: "array", items: dependencyJson }, notes: { type: "array", items: noteJson }, }, required: ["originalRequest", "tasks"], },
  • Instantiates the taskflowHandlers dispatcher which includes the plan_task handler function.
    this.handlers = taskflowHandlers(service);

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/pinkpixel-dev/taskflow-mcp'

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