Skip to main content
Glama

createTask

Create and manage tasks within Godspeed by specifying title, due date, duration, labels, and metadata. Simplifies task organization and tracking using structured input schema.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
due_atNo
duration_minutesNo
label_idsNo
label_namesNo
list_idNo
locationNo
metadataNo
notesNo
starts_atNo
timeless_due_atNo
timeless_starts_atNo
titleYes

Implementation Reference

  • src/index.ts:87-115 (registration)
    MCP server.tool registration for the 'createTask' tool, including Zod input schema validation and a thin async handler that delegates to godspeedApi.createTask and formats the response.
    server.tool( "createTask", { title: z.string(), list_id: z.string().optional(), location: z.enum(["start", "end"]).optional(), notes: z.string().optional(), due_at: z.date().optional(), timeless_due_at: z.string().optional(), starts_at: z.date().optional(), timeless_starts_at: z.string().optional(), duration_minutes: z.number().int().nonnegative().optional(), label_names: z.array(z.string()).optional(), label_ids: z.array(z.string()).optional(), metadata: z.record(z.any()).optional() }, async (params) => { try { const result = await godspeedApi.createTask(params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : String(error)}` }] }; } } );
  • TypeScript interface defining the CreateTaskParams used by the createTask functions in GodspeedAPI and matching the MCP tool input schema.
    export interface CreateTaskParams { title: string; list_id?: string; location?: 'start' | 'end'; notes?: string; due_at?: Date; timeless_due_at?: string; starts_at?: Date; timeless_starts_at?: string; duration_minutes?: number; label_names?: string[]; label_ids?: string[]; metadata?: Record<string, any>; }
  • Core handler implementation in GodspeedAPI class that executes the HTTP POST request to the Godspeed API /tasks endpoint to create a new task, handles auth, errors, and returns ApiResponse<Task>.
    async createTask(params: CreateTaskParams): Promise<ApiResponse<Task>> { try { const headers = this.getAuthHeaders(); const response = await fetch(`${API_BASE_URL}/tasks`, { method: 'POST', headers, body: JSON.stringify(params), }); const data = await response.json(); if (!response.ok) { throw new Error(data.error || 'Failed to create task'); } return data; } catch (error) { throw new Error(`Create task error: ${error instanceof Error ? error.message : String(error)}`); } }

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/AliNagy/godspeed-mcp'

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