Skip to main content
Glama
complete-task.ts760 B
import { z } from "zod" import { tasks } from "../client.ts" export const completeTaskInputSchema = z.object({ taskListId: z.string().describe("ID of the task list"), taskId: z.string().describe("ID of the task to complete") }) export type CompleteTaskInput = z.infer<typeof completeTaskInputSchema> export async function completeTask(args: CompleteTaskInput) { const existingTask = await tasks.tasks.get({ tasklist: args.taskListId, task: args.taskId }) const response = await tasks.tasks.update({ tasklist: args.taskListId, task: args.taskId, requestBody: { id: args.taskId, title: existingTask.data.title, status: "completed", completed: new Date().toISOString() } }) return response.data }

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/itsregularjohn/mcps'

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