Skip to content

Commit 5cfea0c

Browse files
committed
fix: Convert priority enum values to strings for Gemini API compatibility
- Change priority enum from [1, 2, 3, 4, null] to ["1", "2", "3", "4", null] - Update type from 'number' to 'string' in update_task and update_bulk_tasks tools - Fixes Cursor IDE and Gemini CLI compatibility issues (closes #79) - Maintains backward compatibility via existing toTaskPriority() function The Gemini API expects enum values as strings, while the previous numeric enum values were causing schema validation errors in Gemini-based MCP clients.
1 parent c425ca8 commit 5cfea0c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/tools/task/bulk-operations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ export const updateBulkTasksTool = {
226226
description: "New status"
227227
},
228228
priority: {
229-
type: "number",
229+
type: "string",
230230
nullable: true,
231-
enum: [1, 2, 3, 4, null],
231+
enum: ["1", "2", "3", "4", null],
232232
description: "New priority (1-4 or null)"
233233
},
234234
dueDate: {

src/tools/task/single-operations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ export const updateTaskTool = {
197197
description: "New status. Must be valid for the task's current list."
198198
},
199199
priority: {
200-
type: "number",
200+
type: "string",
201201
nullable: true,
202-
enum: [1, 2, 3, 4, null],
202+
enum: ["1", "2", "3", "4", null],
203203
description: "New priority: 1 (urgent) to 4 (low). Set null to clear priority."
204204
},
205205
dueDate: {

0 commit comments

Comments
 (0)