delete_schedule
Remove scheduled tasks by name to manage automated coding maintenance in the Jules MCP Server. This tool helps users delete specific scheduled coding tasks like bug fixes, refactoring, or tests when they are no longer needed.
Instructions
Delete a scheduled task by name
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_name | Yes | Schedule name |
Implementation Reference
- src/mcp/tools.ts:356-381 (handler)The handler function deleteSchedule that executes the tool logic: fetches the task by name, cancels the scheduler job, deletes from storage, and returns success/error JSON.* Tool: delete_schedule * Removes a scheduled task. * @param args - The arguments for deleting a schedule. * @returns A JSON string representing the deletion result. */ async deleteSchedule( args: z.infer<typeof DeleteScheduleSchema> ): Promise<string> { return this.executeWithErrorHandling(async () => { const task = await this.storage.getTaskByName(args.task_name); if (!task) { throw new Error(`No schedule found with name: ${args.task_name}`); } // Cancel in-memory job this.scheduler.cancelTask(task.id); // Remove from storage await this.storage.deleteTask(task.id); return { message: `Schedule "${args.task_name}" deleted successfully`, }; }); }
- src/mcp/tools.ts:119-121 (schema)Zod input schema for delete_schedule tool, requiring a 'task_name' string.export const DeleteScheduleSchema = z.object({ task_name: z.string().describe('Name of the scheduled task to delete'), });
- src/index.ts:295-305 (registration)Registration of the delete_schedule tool in the list_tools response, including name, description, and input schema.{ name: 'delete_schedule', description: 'Delete a scheduled task by name', inputSchema: { type: 'object', properties: { task_name: { type: 'string', description: 'Schedule name' }, }, required: ['task_name'], }, },
- src/index.ts:345-349 (registration)Dispatcher in call_tool handler that validates args with DeleteScheduleSchema and invokes this.tools.deleteSchedule.case 'delete_schedule': { const validated = DeleteScheduleSchema.parse(args); result = await this.tools.deleteSchedule(validated); break; }