Skip to main content
Glama
kazuph

@kazuph/mcp-taskmanager

by kazuph

request_planning

Register user requests and plan associated tasks with structured workflows. Initiate task execution, track progress, and ensure user approval at each step to manage and complete requests efficiently.

Instructions

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

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

  1. Use 'request_planning' to register a request and its tasks.

  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. IMPORTANT: After marking a task as done, the assistant MUST NOT proceed to another task without the user's approval. The user must explicitly approve the completed task using 'approve_task_completion'. A progress table will be displayed before each approval request.

  5. Once a task is approved, you can proceed to 'get_next_task' again to fetch the next pending task.

  6. Repeat this cycle until all tasks are done.

  7. After all tasks are completed (and approved), 'get_next_task' will indicate that all tasks are done and that the request awaits approval for full completion.

  8. The user must then approve the entire request's completion using 'approve_request_completion'. If the user does not approve and wants more tasks, you can again use 'request_planning' 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, wait for request completion approval. Do not proceed automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originalRequestYes
splitDetailsNo
tasksYes

Implementation Reference

  • Core handler function that executes the tool logic: generates IDs, creates tasks, persists to JSON file, generates progress table.
    public async requestPlanning(
      originalRequest: string,
      tasks: { title: string; description: string }[],
      splitDetails?: string
    ) {
      await this.loadTasks();
      this.requestCounter += 1;
      const requestId = `req-${this.requestCounter}`;
    
      const newTasks: Task[] = [];
      for (const taskDef of tasks) {
        this.taskCounter += 1;
        newTasks.push({
          id: `task-${this.taskCounter}`,
          title: taskDef.title,
          description: taskDef.description,
          done: false,
          approved: false,
          completedDetails: "",
        });
      }
    
      this.data.requests.push({
        requestId,
        originalRequest,
        splitDetails: splitDetails || originalRequest,
        tasks: newTasks,
        completed: false,
      });
    
      await this.saveTasks();
    
      const progressTable = this.formatTaskProgressTable(requestId);
    
      return {
        status: "planned",
        requestId,
        totalTasks: newTasks.length,
        tasks: newTasks.map((t) => ({
          id: t.id,
          title: t.title,
          description: t.description,
        })),
        message: `Tasks have been successfully added. Please use 'get_next_task' to retrieve the first task.\n${progressTable}`,
      };
    }
  • Zod schema used for input validation of the request_planning tool parameters.
    const RequestPlanningSchema = z.object({
      originalRequest: z.string(),
      splitDetails: z.string().optional(),
      tasks: z.array(
        z.object({
          title: z.string(),
          description: z.string(),
        })
      ),
    });
  • index.ts:101-134 (registration)
    Definition of the REQUEST_PLANNING_TOOL object with name, description, and input schema.
    const REQUEST_PLANNING_TOOL: Tool = {
      name: "request_planning",
      description:
        "Register a new user request and plan its associated tasks. You must provide 'originalRequest' and 'tasks', and optionally 'splitDetails'.\n\n" +
        "This tool initiates a new workflow for handling a user's request. The workflow is as follows:\n" +
        "1. Use 'request_planning' to register a request and its tasks.\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. **IMPORTANT:** After marking a task as done, the assistant MUST NOT proceed to another task without the user's approval. The user must explicitly approve the completed task using 'approve_task_completion'. A progress table will be displayed before each approval request.\n" +
        "5. Once a task is approved, you can proceed to 'get_next_task' again to fetch the next pending task.\n" +
        "6. Repeat this cycle until all tasks are done.\n" +
        "7. After all tasks are completed (and approved), 'get_next_task' will indicate that all tasks are done and that the request awaits approval for full completion.\n" +
        "8. The user must then approve the entire request's completion using 'approve_request_completion'. If the user does not approve and wants more tasks, you can again use 'request_planning' 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, wait for request completion approval. Do not proceed automatically.",
      inputSchema: {
        type: "object",
        properties: {
          originalRequest: { type: "string" },
          splitDetails: { type: "string" },
          tasks: {
            type: "array",
            items: {
              type: "object",
              properties: {
                title: { type: "string" },
                description: { type: "string" },
              },
              required: ["title", "description"],
            },
          },
        },
        required: ["originalRequest", "tasks"],
      },
    };
  • index.ts:683-697 (registration)
    Registration of the request_planning tool (as REQUEST_PLANNING_TOOL) in the list of available tools returned by ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        REQUEST_PLANNING_TOOL,
        GET_NEXT_TASK_TOOL,
        MARK_TASK_DONE_TOOL,
        APPROVE_TASK_COMPLETION_TOOL,
        APPROVE_REQUEST_COMPLETION_TOOL,
        OPEN_TASK_DETAILS_TOOL,
        LIST_REQUESTS_TOOL,
        ADD_TASKS_TO_REQUEST_TOOL,
        UPDATE_TASK_TOOL,
        DELETE_TASK_TOOL,
      ],
    }));
  • Entry point handler for tool calls to 'request_planning': validates input and delegates to TaskManagerServer.requestPlanning method.
    case "request_planning": {
      const parsed = RequestPlanningSchema.safeParse(args);
      if (!parsed.success) {
        throw new Error(`Invalid arguments: ${parsed.error}`);
      }
      const { originalRequest, tasks, splitDetails } = parsed.data;
      const result = await taskManagerServer.requestPlanning(
        originalRequest,
        tasks,
        splitDetails
      );
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
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 the tool's role in initiating a workflow, the required user approvals after each task, and the overall process until request completion. However, it lacks details on error handling, performance characteristics, or specific constraints like rate limits.

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 appropriately front-loaded with the core purpose, but the detailed workflow explanation is lengthy and somewhat repetitive (e.g., emphasizing approval steps multiple times). While informative, it could be more streamlined without losing critical guidance.

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 of a 3-parameter tool with no annotations or output schema, the description does a good job of explaining the tool's role in a broader workflow and interaction with siblings. It covers the essential context for correct usage, though it omits details on return values or error cases.

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 for 3 parameters, the description compensates by explaining the purpose of 'originalRequest' and 'tasks' as required inputs and 'splitDetails' as optional. It clarifies that tasks must include 'title' and 'description', adding meaning beyond the bare schema, though it could provide more context on format or constraints.

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 'plan') and resource ('user request' and 'tasks'), and distinguishes it from siblings like 'add_tasks_to_request' by indicating this is for initial registration rather than modification.

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 guidance on when to use this tool versus alternatives, detailing a step-by-step workflow that includes this tool as the first step and references sibling tools like 'get_next_task', 'approve_task_completion', and 'approve_request_completion' for subsequent actions. It explicitly states not to proceed automatically without user approval.

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

Related 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/kazuph/mcp-taskmanager'

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