From efd3d15c7037438e7a1d467fddfb6b0c4a08c3fc Mon Sep 17 00:00:00 2001 From: chungtran4078 <46410548+chungtran4078@users.noreply.github.com> Date: Thu, 19 Mar 2026 14:15:46 +0700 Subject: [PATCH] fix: agent add cron within invalid params (#277) Co-authored-by: Chung Tran --- internal/tools/cron.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/tools/cron.go b/internal/tools/cron.go index 75059228..b6428754 100644 --- a/internal/tools/cron.go +++ b/internal/tools/cron.go @@ -60,13 +60,12 @@ SCHEDULE TYPES (schedule.kind): { "kind": "cron", "expr": "<5-field cron expression>", "tz": "" } CRITICAL CONSTRAINTS: -- name must be a valid slug (lowercase letters, numbers, hyphens only) -- message is required for add action -- schedule is required for add action +- "name" must be a valid slug (lowercase letters, numbers, hyphens only) +- For action="add": send the job inside "job", "message" is required and "schedule" is required +- For action="update", send changes inside "patch" - Default: jobs run as isolated agent turns with the specified message - Before creating or updating a scheduled job, call the datetime tool first to get the precise current time and unix_ms timestamp. Do NOT guess or estimate timestamps. - -Use jobId as the canonical identifier; id is accepted for compatibility.` +- Use "jobId" as the canonical identifier; "id" is accepted for compatibility.` } func (t *CronTool) Parameters() map[string]any {