Skip to main content
Glama
awwaiid
by awwaiid

add_task

Create and manage tasks by adding descriptions, due dates, priorities, projects, and tags through the TaskWarrior MCP Server interface.

Instructions

Add a new task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYes
dueNo
priorityNo
projectNo
tagsNo

Implementation Reference

  • Handler for the 'add_task' tool within the CallToolRequest handler. Parses input using addTaskRequest schema, builds TaskWarrior 'task add' command from description and optional fields (due, priority, project, tags), executes it via execSync, and returns the command output.
    case "add_task": { const parsed = addTaskRequest.safeParse(args); if (!parsed.success) { throw new Error(`Invalid arguments for add_task: ${parsed.error}`); } let task_args = [parsed.data.description]; if (parsed.data.due) { task_args.push(`due:${parsed.data.due}`); } if (parsed.data.priority) { task_args.push(`priority:${parsed.data.priority}`); } if (parsed.data.project) { task_args.push(`project:${parsed.data.project}`); } if (parsed.data.tags) { for (let tag of parsed.data.tags) { task_args.push(`+${tag}`); } } const content = execSync(`task add ${task_args.join(" ")}`, { maxBuffer: 1024 * 1024 * 10 }).toString().trim(); return { content: [{ type: "text", text: content }], }; }
  • Zod input schema for 'add_task' tool: requires description; optional due (ISO), priority (H/M/L), project, tags.
    const addTaskRequest = z.object({ description: z.string(), // Optional fields that can be set when adding due: z.string().optional(), // ISO timestamp priority: z.enum(["H", "M", "L"]).optional(), project: z.string().regex(/^[a-z.]+$/).optional(), tags: z.array(z.string().regex(/^a-z$/)).optional(), });
  • index.ts:106-110 (registration)
    Tool registration in ListToolsRequest handler response array, specifying name, description, and inputSchema from addTaskRequest.
    { name: "add_task", description: "Add a new task", inputSchema: zodToJsonSchema(addTaskRequest) as ToolInput, },

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/awwaiid/mcp-server-taskwarrior'

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