delete_schedule
Remove scheduled tasks by name to manage automated coding workflows and maintenance schedules in the Jules MCP Server.
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:355-381 (handler)The deleteSchedule method in JulesTools class implements the core logic for the delete_schedule tool. It retrieves the task by name, cancels the scheduler job, deletes from storage, and returns a success message or error./** * 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 validation schema for the 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:287-305 (registration)Tool registration in the ListToolsRequestSchema handler, defining the name, description, and input schema for delete_schedule.{ name: 'list_schedules', description: 'List all locally-managed scheduled tasks', inputSchema: { type: 'object', properties: {}, }, }, { 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)Dispatch handler in CallToolRequestSchema switch statement that validates args with DeleteScheduleSchema and calls the deleteSchedule method.case 'delete_schedule': { const validated = DeleteScheduleSchema.parse(args); result = await this.tools.deleteSchedule(validated); break; }