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);
Behavior4/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. It effectively describes key behaviors: it initiates a workflow, creates a Markdown file if 'outputPath' is provided, and explains the workflow's interactive nature (requiring user approval after each task). However, it doesn't mention potential side effects like file system changes or error handling, leaving some gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and required parameters, but it becomes verbose with an extensive workflow explanation (9 steps) that might be better suited for general documentation. While informative, some sentences (e.g., the detailed workflow steps) could be condensed without losing essential guidance, making it less concise than ideal.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (6 parameters, no annotations, no output schema), the description is largely complete. It covers the tool's role in a workflow, parameter semantics, and usage guidelines. However, it lacks details on return values (since no output schema exists) and doesn't address error conditions or validation rules, which are important for a tool with nested object parameters.

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?

With 0% schema description coverage, the description must compensate for the lack of parameter documentation. It adds significant meaning: it explains that 'originalRequest' and 'tasks' are required, 'splitDetails' is optional, 'dependencies' are project/task-specific, 'notes' are general guidelines, and 'outputPath' saves a Markdown file with absolute path recommendations. It also clarifies that tasks can include subtasks and dependencies. However, it doesn't detail the structure of 'tasks' objects beyond mentioning subtasks and dependencies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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: 'Register a new user request and plan its associated tasks.' It specifies the verb 'register' and resource 'user request and tasks,' distinguishing it from siblings like 'add_tasks_to_request' (which adds to existing requests) or 'list_requests' (which only lists).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidelines, detailing when to use this tool (to initiate a new workflow) versus alternatives (e.g., 'add_tasks_to_request' for adding tasks to existing requests). It outlines the entire workflow sequence, including when to use sibling tools like 'get_next_task' and 'mark_subtask_done,' and specifies prerequisites (must provide 'originalRequest' and 'tasks').

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

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