Skip to main content
Glama
0Thomas1
by 0Thomas1

set-prioity

Update task priority in Kanban-style workflows. Specify task ID and new priority (low, medium, high) to streamline task management and enhance productivity.

Instructions

set a task to a different priority

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
new_priorityYes
task_idYes

Implementation Reference

  • The inline handler function for the 'set-prioity' tool. It calls the utility function setTaskPriority and returns a success or error message.
    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 defining parameters for the 'set-prioity' tool: task_id (string) and new_priority (enum: low, medium, high).
    { task_id: z.string(), new_priority: z.enum(["low", "medium", "high"]), },
  • src/index.ts:115-151 (registration)
    Full registration of the 'set-prioity' tool using server.tool(), including description, input schema, metadata 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}".`, }, ], }; } } );
  • Core utility function that updates the priority of a task by ID in the MongoDB database using the 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"); } }

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/0Thomas1/Kanban-MCP'

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