From 51013268cf9b0ccc1078c8534cafef48eab145e7 Mon Sep 17 00:00:00 2001 From: ygd58 Date: Tue, 26 May 2026 08:35:18 +0200 Subject: [PATCH] fix(cron): clarify schedule is required for create in tool schema Grok models (and other LLMs) sometimes omit the schedule parameter when calling the cronjob tool with action=create because the schema only listed 'action' in required[] and the schedule description did not explicitly state it was mandatory (issue #32427). Fix: update schema descriptions to clearly state schedule is REQUIRED for action=create, making this explicit for models that rely on description text for parameter compliance. Fixes #32427 --- tools/cronjob_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cronjob_tools.py b/tools/cronjob_tools.py index c62eb4ba1c4..18c68a7ce91 100644 --- a/tools/cronjob_tools.py +++ b/tools/cronjob_tools.py @@ -706,7 +706,7 @@ Important safety rule: cron-run sessions should not recursively schedule more cr "properties": { "action": { "type": "string", - "description": "One of: create, list, update, pause, resume, remove, run" + "description": "One of: create, list, update, pause, resume, remove, run. When action=create, the 'schedule' and 'prompt' fields are REQUIRED." }, "job_id": { "type": "string", @@ -718,7 +718,7 @@ Important safety rule: cron-run sessions should not recursively schedule more cr }, "schedule": { "type": "string", - "description": "For create/update: '30m', 'every 2h', '0 9 * * *', or ISO timestamp" + "description": "REQUIRED for action=create. For create/update: '30m', 'every 2h', '0 9 * * *', or ISO timestamp. Examples: '30m' (every 30 minutes), 'every 2h' (every 2 hours), '0 9 * * *' (daily at 9am), '2026-06-01T09:00:00' (one-shot). You MUST include this field when action=create." }, "name": { "type": "string",