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 <noreply@anthropic.com>
This commit is contained in:
Jiang Bohan 2026-02-06 14:59:35 +08:00
parent ea7a2c837b
commit ab85a01431

View file

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