From ab85a014313230c833b760cd64fc4391817feb4a Mon Sep 17 00:00:00 2001 From: Jiang Bohan Date: Fri, 6 Feb 2026 14:59:35 +0800 Subject: [PATCH] fix(cron): improve action parameter description for better model understanding - Add explicit list of valid actions in parameter description - Add IMPORTANT note at start of tool description Co-Authored-By: Claude Opus 4.5 --- src/agent/tools/cron/cron-tool.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/agent/tools/cron/cron-tool.ts b/src/agent/tools/cron/cron-tool.ts index 1d0aa941..650d9121 100644 --- a/src/agent/tools/cron/cron-tool.ts +++ b/src/agent/tools/cron/cron-tool.ts @@ -27,7 +27,7 @@ const CronSchema = Type.Object({ Type.Literal("remove"), Type.Literal("run"), Type.Literal("logs"), - ], { description: "The action to perform" }), + ], { description: "The action to perform. Must be one of: status, list, add, update, remove, run, logs" }), // list filter enabled: Type.Optional(Type.Boolean({ description: "Filter by enabled status (for list)" })), @@ -154,6 +154,8 @@ function parseSchedule(schedule: CronArgs["schedule"]): CronSchedule | { error: const TOOL_DESCRIPTION = `Create, manage, and execute scheduled tasks (cron jobs). +IMPORTANT: The "action" parameter must be exactly one of these values: "status", "list", "add", "update", "remove", "run", "logs" + ## Actions ### status