Skip to main content
Glama

listTasks

Retrieve tasks from the Godspeed task application based on specific criteria such as list ID, status, or update timestamps. Integrate with the godspeed-mcp server to manage task data efficiently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idNo
statusNo
updated_afterNo
updated_beforeNo

Implementation Reference

  • Core handler function in GodspeedAPI that executes the listTasks logic: builds query parameters from input and performs GET request to the Godspeed API /tasks endpoint.
    async listTasks(params?: ListTasksParams): Promise<ApiResponse<Task[]>> { try { const headers = this.getAuthHeaders(); // Build query string from params const queryParams = params ? Object.entries(params) .filter(([_, value]) => value !== undefined) .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`) .join('&') : ''; const url = `${API_BASE_URL}/tasks${queryParams ? `?${queryParams}` : ''}`; const response = await fetch(url, { method: 'GET', headers, }); const data = await response.json(); if (!response.ok) { throw new Error(data.error || 'Failed to list tasks'); } return data; } catch (error) { throw new Error(`List tasks error: ${error instanceof Error ? error.message : String(error)}`); } }
  • TypeScript interface defining the input parameters for the listTasks tool.
    export interface ListTasksParams { status?: 'incomplete' | 'complete'; list_id?: string; updated_before?: string; updated_after?: string; }
  • src/index.ts:46-66 (registration)
    Registers the 'listTasks' tool with the MCP server, providing Zod input schema matching ListTasksParams and a thin async handler that delegates to GodspeedAPI.listTasks and formats the response.
    server.tool( "listTasks", { status: z.enum(["incomplete", "complete"]).optional(), list_id: z.string().optional(), updated_before: z.string().optional(), updated_after: z.string().optional() }, async (params) => { try { const result = await godspeedApi.listTasks(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)}` }] }; } } );

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