Skip to main content
Glama

complete_becky_task

Complete a shared Todoist task by setting its due date to today, adding a completion comment, and moving it to the designated inbox project.

Instructions

Complete a Brian shared task (assigned to Brian from Becky) by setting due date to today, adding a completion comment, and moving it to Becky inbox project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe ID of the task to complete

Implementation Reference

  • The handler function for the 'complete_becky_task' tool. It takes a task_id argument, calls the completeBeckyTask helper function, logs execution, and returns a success or error message in the required MCP format.
    export const completeBeckyTaskTool: Tool = { schema: { name: 'complete_becky_task', description: 'Complete a Brian shared task (assigned to Brian from Becky) by setting due date to today, adding a completion comment, and moving it to Becky inbox project', inputSchema: { type: 'object', properties: { task_id: { type: 'string', description: 'The ID of the task to complete', }, }, required: ['task_id'], }, }, handler: async (args: { task_id: string }) => { try { console.error('Executing complete_becky_task...'); await completeBeckyTask(args.task_id); console.error('complete_becky_task completed successfully'); return { content: [ { type: 'text', text: 'Task completed successfully. Due date set to today, completion comment added, and task moved to Becky inbox project.', }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error: ${ error instanceof Error ? error.message : 'Unknown error' }`, }, ], }; } }, };
  • The core helper function implementing the logic to complete a Becky task: sets due date to 'today', adds a specific completion comment, and moves the task to the 'Becky inbox - per Brian' project.
    export async function completeBeckyTask(taskId: string): Promise<void> { try { const commentContent = buildCommentContent(); // Find the Becky inbox project const beckyInboxProjectId = await findProjectByName( 'Becky inbox - per Brian' ); // Update the task due string to today await updateTask({ taskId, dueString: 'today', }); // Add the completion comment await createAutomatedTaskComment(taskId, commentContent); // Move the task to the Becky inbox project await moveTask(taskId, beckyInboxProjectId); } catch (error) { throw new Error(`Failed to complete Becky task: ${getErrorMessage(error)}`); } }
  • Registration of the complete_becky_task tool handler in the toolsWithArgs registry used by handleToolRequest.
    search_tasks_using_or: searchTasksUsingOrTool.handler, complete_becky_task: completeBeckyTaskTool.handler, };
  • The tool's schema is registered in the MCP server's listTools handler response.
    completeBeckyTaskTool.schema,
  • src/tools/index.ts:8-8 (registration)
    Re-export of the completeBeckyTaskTool for use in other modules.
    completeBeckyTaskTool,

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/bkotos/todoist-mcp'

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