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
This commit is contained in:
ygd58 2026-05-26 08:35:18 +02:00 committed by Teknium
parent ccd3d04fc5
commit 51013268cf

View file

@ -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",