Skip to main content
Glama

Kanban MCP Server

by 0Thomas1
Task.js1.27 kB
const mongoose = require("mongoose"); const User = require("./User"); const taskSchema = new mongoose.Schema({ title: String, description: String, taskStatus: { type: String, enum: ["todo", "inProgress", "done"], default: "todo", }, priority: { type: String, enum: ["low", "medium", "high"], default: "medium", }, tags: [ { type: String, trim: true, lowercase: true, }, ], startDate: { type: Date, default: null, }, dueDate: { type: Date, default: null, }, createdAt: { type: Date, immutable: true, default: () => Date.now(), }, updatedAt: Date, user: { type: mongoose.Schema.Types.ObjectId, ref: "User", }, }); //static method //private instance method taskSchema.pre("save", function (next) { this.updatedAt = Date.now(); if (this.taskStatus == "inProgress") { this.startDate = Date.now(); } next(); }); taskSchema.methods.removeSelf = async function () { await User.updateOne({ _id: this.user }, { $pull: { tasks: this._id } }); return this.deleteOne(); }; taskSchema.methods.changeStatus = async function (newStatus) { this.taskStatus = newStatus; return this.save(); }; module.exports = mongoose.model("Task", taskSchema);

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