You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(scheduler): add update action to phantom_schedule tool
Adds an 'update' action to the phantom_schedule MCP tool so jobs
can be edited in place without deleting and recreating, preserving
run_count, last_run_at, last_run_status, consecutive_errors, and
the stable jobId.
Updatable fields: name, description, task, schedule, delivery, enabled.
Schedule changes recompute next_run_at automatically.
Closes#86
constTOOL_DESCRIPTION=`Create, list, delete, or trigger scheduled tasks. Lets you set up recurring jobs, one-shot reminders, and automated reports.
16
+
constTOOL_DESCRIPTION=`Create, list, delete, update, or trigger scheduled tasks. Lets you set up recurring jobs, one-shot reminders, and automated reports.
17
17
18
18
Actions:
19
19
- create: Create a new scheduled task. Returns the job id and next run time. Rejects invalid schedules, past timestamps, duplicate names, task text over 32 KB, and delivery targets that are not "owner", a channel id (C...), or a user id (U...).
20
20
- list: List all scheduled tasks with status and next run time. Corrupt rows are logged and skipped.
21
21
- delete: Remove a scheduled task by jobId or by name (case insensitive).
22
+
- update: Update a scheduled task by jobId or by name. Preserves run history (run_count, last_run_at, last_run_status, consecutive_errors). Only provided fields are updated. If schedule is changed, next_run_at is recomputed.
22
23
- run: Trigger a task immediately. Only runs when status is active and no other job is currently executing. Returns the task output.
23
24
24
25
Schedule types:
@@ -60,9 +61,9 @@ export function createSchedulerToolServer(scheduler: Scheduler): McpSdkServerCon
60
61
TOOL_DESCRIPTION,
61
62
{
62
63
action: z
63
-
.enum(["create","list","delete","run"])
64
+
.enum(["create","list","delete","update","run"])
64
65
.describe(
65
-
"create: new scheduled task. list: enumerate tasks. delete: remove by jobId or name. run: trigger immediately (only when status=active and scheduler is idle).",
66
+
"create: new scheduled task. list: enumerate tasks. delete: remove by jobId or name. update: modify by jobId or name. run: trigger immediately (only when status=active and scheduler is idle).",
66
67
),
67
68
name: z.string().optional().describe("Job name (required for create)"),
0 commit comments