Skip to main content
Glama
0Thomas1

Kanban MCP Server

by 0Thomas1

set-prioity

Update task priority levels (low, medium, high) in a Kanban system to manage workflow and focus on important items.

Instructions

set a task to a different priority

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes
new_priorityYes

Implementation Reference

  • Inline handler function for the 'set-prioity' MCP tool. It calls the helper function setTaskPriority and formats success/error responses.
    async (params) => {
      try {
        await mongooseUtils.setTaskPriority(params.task_id, params.new_priority);
        return {
          content: [
            {
              type: "text",
              text: `Set task "${params.task_id}" Priority to "${params.new_priority}" successfully!`,
            },
          ],
        };
      } catch {
        return {
          content: [
            {
              type: "text",
              text: `Failed to set task "${params.task_id}" priority to "${params.new_priority}".`,
            },
          ],
        };
      }
    }
  • Zod input schema for the 'set-prioity' tool defining task_id and new_priority parameters.
      task_id: z.string(),
      new_priority: z.enum(["low", "medium", "high"]),
    },
  • src/index.ts:115-151 (registration)
    Registration of the 'set-prioity' tool using server.tool, including name, description, schema, hints, and handler.
    server.tool(
      "set-prioity",
      "set a task to a different priority",
      {
        task_id: z.string(),
        new_priority: z.enum(["low", "medium", "high"]),
      },
      {
        title: "set a task to a different priority",
        readonlyHint: false,
        destructiveHint: false,
        idempotentHint: false,
        openWorldHint: true,
      },
      async (params) => {
        try {
          await mongooseUtils.setTaskPriority(params.task_id, params.new_priority);
          return {
            content: [
              {
                type: "text",
                text: `Set task "${params.task_id}" Priority to "${params.new_priority}" successfully!`,
              },
            ],
          };
        } catch {
          return {
            content: [
              {
                type: "text",
                text: `Failed to set task "${params.task_id}" priority to "${params.new_priority}".`,
              },
            ],
          };
        }
      }
    );
  • Helper function that performs the actual database update for task priority using Mongoose Task model.
    export async function setTaskPriority(
      taskId: string,
      priority: "low" | "medium" | "high"
    ) {
      try {
        const task = await Task.findById(taskId);
        if (!task) {
          throw new Error("Task not found");
        }
    
        task.priority = priority;
        await task.save();
      } catch {
        throw new Error("Failed to set priority");
      }
    }
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/0Thomas1/Kanban-MCP'

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