Skip to main content
Glama

completeTask

Mark tasks as complete in the Godspeed task application using their unique IDs via the godspeed-mcp server API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • The MCP tool handler function for 'completeTask'. It takes a task ID, calls the GodspeedAPI.completeTask method, and returns the JSON stringified result or an error message.
    async ({ id }) => {
        try {
            const result = await godspeedApi.completeTask(id);
            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)}` }]
            };
        }
    }
  • Input schema validation for the 'completeTask' tool using Zod: requires a string 'id' parameter.
    id: z.string()
  • src/index.ts:171-188 (registration)
    Registration of the 'completeTask' MCP tool using server.tool() with name, input schema, and handler function.
    server.tool(
        "completeTask",
        {
            id: z.string()
        },
        async ({ id }) => {
            try {
                const result = await godspeedApi.completeTask(id);
                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)}` }]
                };
            }
        }
    );
  • Supporting helper method in GodspeedAPI class that completes a task by calling updateTask with is_complete: true.
    async completeTask(id: string): Promise<ApiResponse<Task>> {
        return this.updateTask({ id, is_complete: true });
    }
Install Server

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