planko-mcp-server 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -4
- package/package.json +1 -1
- package/src/listing.js +4 -2
- package/src/tools.js +63 -4
package/README.md
CHANGED
|
@@ -121,8 +121,9 @@ These work with the **same API key** and require **no folder setup**. Tasks, not
|
|
|
121
121
|
| Property | Type | Notes |
|
|
122
122
|
|---|---|---|
|
|
123
123
|
| `description` | Markdown string | Converted to BlockNote JSON before saving |
|
|
124
|
-
| `dueDate` | ISO 8601 string | |
|
|
125
|
-
| `datePlain` | `YYYY-MM-DD` | |
|
|
124
|
+
| `dueDate` | ISO 8601 string | Execution date — when the task appears on the agenda/day view |
|
|
125
|
+
| `datePlain` | `YYYY-MM-DD` | Execution date, plain form — same meaning as `dueDate` |
|
|
126
|
+
| `deadline` | `YYYY-MM-DD`\|`null` | **Tasks only** (`planko_create_task`, `planko_edit_task`, `planko_recommend_task` — never notes or sticky notes). The final deadline, independent of `dueDate`/`datePlain`. `null` clears it on edit |
|
|
126
127
|
| `time` / `endTime` | `HH:MM` | Start / end time |
|
|
127
128
|
| `alert` | boolean | Whether a reminder is enabled |
|
|
128
129
|
| `alertLeadTime` | `null`\|`ontime`\|`15min`\|`30min`\|`1hour`\|`1day` | Reminder lead time |
|
|
@@ -146,8 +147,10 @@ Notes:
|
|
|
146
147
|
|
|
147
148
|
```
|
|
148
149
|
planko_create_task(name: "Ship v2", projectName: "Work", dueDate: "2026-08-01", priority: 1)
|
|
150
|
+
planko_create_task(name: "Renovar contrato", deadline: "2026-12-15")
|
|
149
151
|
planko_create_note(name: "Meeting notes", description: "# Sync\n- point A\n- point B")
|
|
150
152
|
planko_edit_task(taskId: "665f...c0", name: "Ship v2.1", alertLeadTime: "1hour")
|
|
153
|
+
planko_edit_task(taskId: "665f...c0", deadline: null)
|
|
151
154
|
planko_complete_task(taskId: "665f...c0")
|
|
152
155
|
planko_delete_note(taskId: "665f...aa")
|
|
153
156
|
```
|
|
@@ -164,6 +167,7 @@ Notes:
|
|
|
164
167
|
|
|
165
168
|
- The recipient is **always the owner of the API key**, never other project members, even when the suggestion targets a shared workspace project.
|
|
166
169
|
- `description` is Markdown, converted to BlockNote like the create tools. `datePlain` is derived from the date part of `dueDate` when only `dueDate` is given, because the owner's notification card shows `datePlain` (plus `time` and `priority`).
|
|
170
|
+
- `deadline` (`YYYY-MM-DD`) is accepted like on `planko_create_task`, applied to the task on accept.
|
|
167
171
|
- A reference the owner cannot access (`projectId`, `parentId`, `tags`, `boardId`, `kanbanColumnId`) is rejected at send time with a `400`. A reference that becomes stale later is dropped when the owner accepts; the task is still created.
|
|
168
172
|
- There is **no read-back**: the API has no endpoint to list recommendations or learn their outcome, and every call creates a new pending suggestion plus a new notification. Send each suggestion once; do not retry on a slow response.
|
|
169
173
|
- Under `PLANKO_PROJECT_LOCK` the suggestion always targets the locked project (see below).
|
|
@@ -211,8 +215,9 @@ These also work with the **same API key** and require **no folder setup**. `list
|
|
|
211
215
|
| `boardId` / `kanbanColumnId` | ObjectId | Direct id alternatives to the names (not offered under project lock) |
|
|
212
216
|
| `tags` | array of ObjectId | AND semantics — item must have all tags |
|
|
213
217
|
| `search` | string | Case-insensitive match on the name |
|
|
214
|
-
| `dueDateFrom` / `dueDateTo` | `YYYY-MM-DD` | (tasks only) inclusive due-date bounds |
|
|
215
|
-
| `
|
|
218
|
+
| `dueDateFrom` / `dueDateTo` | `YYYY-MM-DD` | (tasks only) inclusive due-date (execution date) bounds |
|
|
219
|
+
| `deadlineFrom` / `deadlineTo` | `YYYY-MM-DD` | Only on `planko_list_tasks` and `planko_list_all` (never `planko_list_notes`/`planko_list_sticky_notes`). Inclusive bounds on `deadline`. Matches **tasks only** (type=1); a recurring series appears as one item |
|
|
220
|
+
| `sortBy` | `field:asc` \| `field:desc` | Fields: `dueDate`, `deadline`, `createdAt`, `updatedAt`, `priority`, `position`, `name`; default `updatedAt:desc` |
|
|
216
221
|
| `limit` | int | Default 50, max 200 |
|
|
217
222
|
| `page` | int | Default 1 |
|
|
218
223
|
|
|
@@ -224,6 +229,7 @@ Board/column filters are ANDed onto the list scope. Boards belong to a user or a
|
|
|
224
229
|
|
|
225
230
|
```
|
|
226
231
|
planko_list_tasks(status: 1, priority: 1, dueDateFrom: "2026-07-20", dueDateTo: "2026-07-26", sortBy: "dueDate:asc")
|
|
232
|
+
planko_list_tasks(deadlineFrom: "2026-12-01", deadlineTo: "2026-12-31", sortBy: "deadline:asc")
|
|
227
233
|
planko_list_tasks(projectName: "Work", search: "invoice", limit: 20)
|
|
228
234
|
planko_list_tasks(boardName: "Time Planko", kanbanColumnName: "In Progress")
|
|
229
235
|
planko_list_sticky_notes(showCompleted: false)
|
package/package.json
CHANGED
package/src/listing.js
CHANGED
|
@@ -166,6 +166,7 @@ export function summarizeItem(item, index) {
|
|
|
166
166
|
if (item.priority != null) parts.push(`priority: ${item.priority}`);
|
|
167
167
|
if (item.dueDate) parts.push(`due: ${item.dueDate}${item.time ? ` ${item.time}` : ''}`);
|
|
168
168
|
else if (item.datePlain) parts.push(`due: ${item.datePlain}${item.time ? ` ${item.time}` : ''}`);
|
|
169
|
+
if (item.type === TYPE_TASK && item.deadline) parts.push(`deadline: ${item.deadline}`);
|
|
169
170
|
const tagStr = formatTags(item.tags);
|
|
170
171
|
if (tagStr) parts.push(`tags: ${tagStr}`);
|
|
171
172
|
const board = boardLabel(item);
|
|
@@ -207,6 +208,7 @@ export function renderItem(item) {
|
|
|
207
208
|
if (item.priority != null) lines.push(`priority: ${item.priority}`);
|
|
208
209
|
if (item.dueDate) lines.push(`due: ${item.dueDate}${item.time ? ` ${item.time}` : ''}`);
|
|
209
210
|
else if (item.datePlain) lines.push(`due: ${item.datePlain}${item.time ? ` ${item.time}` : ''}`);
|
|
211
|
+
if (item.type === TYPE_TASK && item.deadline) lines.push(`deadline: ${item.deadline}`);
|
|
210
212
|
const tagStr = formatTags(item.tags);
|
|
211
213
|
if (tagStr) lines.push(`tags: ${tagStr}`);
|
|
212
214
|
const board = boardLabel(item);
|
|
@@ -227,8 +229,8 @@ export function renderItem(item) {
|
|
|
227
229
|
return lines.join('\n');
|
|
228
230
|
}
|
|
229
231
|
|
|
230
|
-
const SORTABLE_FIELDS = new Set(['dueDate', 'createdAt', 'updatedAt', 'priority', 'position', 'name']);
|
|
231
|
-
const DATE_FIELDS = new Set(['dueDate', 'createdAt', 'updatedAt']);
|
|
232
|
+
const SORTABLE_FIELDS = new Set(['dueDate', 'deadline', 'createdAt', 'updatedAt', 'priority', 'position', 'name']);
|
|
233
|
+
const DATE_FIELDS = new Set(['dueDate', 'deadline', 'createdAt', 'updatedAt']);
|
|
232
234
|
|
|
233
235
|
/** Parse 'field:dir' with the backend's whitelist; default updatedAt:desc. */
|
|
234
236
|
export function parseSort(sortBy) {
|
package/src/tools.js
CHANGED
|
@@ -68,12 +68,21 @@ export function registerStandaloneTools(server, { api, projectLock = null, wrapH
|
|
|
68
68
|
.string()
|
|
69
69
|
.optional()
|
|
70
70
|
.describe('Body as Markdown (converted to BlockNote JSON before saving)'),
|
|
71
|
-
dueDate: z
|
|
71
|
+
dueDate: z
|
|
72
|
+
.string()
|
|
73
|
+
.optional()
|
|
74
|
+
.describe(
|
|
75
|
+
'Execution date (ISO 8601 string): when the task appears on the agenda/day view. ' +
|
|
76
|
+
'Independent of deadline (the final deadline, when supported).'
|
|
77
|
+
),
|
|
72
78
|
datePlain: z
|
|
73
79
|
.string()
|
|
74
80
|
.regex(/^\d{4}-\d{2}-\d{2}$/, 'Must be YYYY-MM-DD')
|
|
75
81
|
.optional()
|
|
76
|
-
.describe(
|
|
82
|
+
.describe(
|
|
83
|
+
'Execution date, plain YYYY-MM-DD: when the task appears on the agenda/day view. ' +
|
|
84
|
+
'Independent of deadline (the final deadline, when supported).'
|
|
85
|
+
),
|
|
77
86
|
time: z.string().regex(timeRegex, 'Must be HH:MM').optional().describe('Start time, HH:MM'),
|
|
78
87
|
endTime: z.string().regex(timeRegex, 'Must be HH:MM').optional().describe('End time, HH:MM'),
|
|
79
88
|
alert: z.boolean().optional().describe('Whether an alert/reminder is enabled'),
|
|
@@ -109,13 +118,43 @@ export function registerStandaloneTools(server, { api, projectLock = null, wrapH
|
|
|
109
118
|
boardId: objectId.optional().describe('Board id'),
|
|
110
119
|
};
|
|
111
120
|
|
|
121
|
+
// Task-only properties (PL328): never offered on note/sticky-note tools.
|
|
122
|
+
// `deadline` is independent of dueDate/datePlain (the execution date) — it is
|
|
123
|
+
// the day by which the task must be done. `null` clears it; omitted leaves it
|
|
124
|
+
// unchanged.
|
|
125
|
+
const deadlineProps = {
|
|
126
|
+
deadline: z
|
|
127
|
+
.string()
|
|
128
|
+
.regex(/^\d{4}-\d{2}-\d{2}$/, 'Must be YYYY-MM-DD')
|
|
129
|
+
.nullable()
|
|
130
|
+
.optional()
|
|
131
|
+
.describe(
|
|
132
|
+
'Prazo final (YYYY-MM-DD): até quando a tarefa precisa estar pronta. ' +
|
|
133
|
+
'É independente de dueDate/datePlain (data de execução, quando a tarefa aparece na agenda). ' +
|
|
134
|
+
'null remove o prazo. Só para tarefas (type=1) — nunca para notas ou sticky notes.'
|
|
135
|
+
),
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// Fields that support an explicit null to clear a value on edit (as opposed to
|
|
139
|
+
// isBlankValue's "omitted" semantics, which would otherwise drop the null).
|
|
140
|
+
// '' is treated the same as null so a model that sends an empty string still
|
|
141
|
+
// clears the field.
|
|
142
|
+
const NULLABLE_CLEAR_FIELDS = new Set(['deadline']);
|
|
143
|
+
|
|
112
144
|
/**
|
|
113
145
|
* Build a request body from tool params: drop undefined values and convert the
|
|
114
|
-
* Markdown `description` into BlockNote JSON.
|
|
146
|
+
* Markdown `description` into BlockNote JSON. Fields in NULLABLE_CLEAR_FIELDS
|
|
147
|
+
* keep an explicit null (and treat '' as null) so the model can clear them;
|
|
148
|
+
* omitted stays omitted.
|
|
115
149
|
*/
|
|
116
150
|
function buildTaskBody(params) {
|
|
117
151
|
const body = {};
|
|
118
152
|
for (const [key, value] of Object.entries(params)) {
|
|
153
|
+
if (NULLABLE_CLEAR_FIELDS.has(key)) {
|
|
154
|
+
if (value === undefined) continue;
|
|
155
|
+
body[key] = value === '' ? null : value;
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
119
158
|
if (isBlankValue(value)) continue;
|
|
120
159
|
body[key] = value;
|
|
121
160
|
}
|
|
@@ -230,6 +269,7 @@ export function registerStandaloneTools(server, { api, projectLock = null, wrapH
|
|
|
230
269
|
.optional()
|
|
231
270
|
.describe('Project name to create the task in (optional — omit for your default project)'),
|
|
232
271
|
...taskProps,
|
|
272
|
+
...deadlineProps,
|
|
233
273
|
},
|
|
234
274
|
annotations: ANNOTATIONS.WRITE,
|
|
235
275
|
},
|
|
@@ -308,6 +348,7 @@ export function registerStandaloneTools(server, { api, projectLock = null, wrapH
|
|
|
308
348
|
.optional()
|
|
309
349
|
.describe('Project name the task would be created in (optional — omit for the owner\'s default project)'),
|
|
310
350
|
...taskProps,
|
|
351
|
+
...deadlineProps,
|
|
311
352
|
},
|
|
312
353
|
annotations: ANNOTATIONS.WRITE,
|
|
313
354
|
},
|
|
@@ -357,6 +398,7 @@ export function registerStandaloneTools(server, { api, projectLock = null, wrapH
|
|
|
357
398
|
type: editableType,
|
|
358
399
|
projectId: objectId.optional().describe('Move to a different project by id'),
|
|
359
400
|
...taskProps,
|
|
401
|
+
...deadlineProps,
|
|
360
402
|
},
|
|
361
403
|
annotations: ANNOTATIONS.IDEMPOTENT_WRITE,
|
|
362
404
|
},
|
|
@@ -519,7 +561,7 @@ export function registerStandaloneTools(server, { api, projectLock = null, wrapH
|
|
|
519
561
|
const sortBySchema = z
|
|
520
562
|
.string()
|
|
521
563
|
.describe(
|
|
522
|
-
"Sort as 'field:asc' or 'field:desc'. Allowed fields: dueDate, createdAt, updatedAt, priority, position, name. Default updatedAt:desc."
|
|
564
|
+
"Sort as 'field:asc' or 'field:desc'. Allowed fields: dueDate, deadline, createdAt, updatedAt, priority, position, name. Default updatedAt:desc."
|
|
523
565
|
);
|
|
524
566
|
|
|
525
567
|
/**
|
|
@@ -634,6 +676,7 @@ export function registerStandaloneTools(server, { api, projectLock = null, wrapH
|
|
|
634
676
|
// are offered for every task-page kind (sticky notes carry the same fields).
|
|
635
677
|
function listSchema(kind) {
|
|
636
678
|
const taskLike = kind !== 'note';
|
|
679
|
+
const deadlineLike = kind === 'task' || kind === 'all';
|
|
637
680
|
const base = { showCompleted: listShowCompleted };
|
|
638
681
|
if (taskLike) base.status = listStatus;
|
|
639
682
|
const tail = {
|
|
@@ -647,6 +690,22 @@ export function registerStandaloneTools(server, { api, projectLock = null, wrapH
|
|
|
647
690
|
dueDateTo: datePlain.optional().describe('Inclusive upper bound on due date (YYYY-MM-DD)'),
|
|
648
691
|
}
|
|
649
692
|
: {}),
|
|
693
|
+
...(deadlineLike
|
|
694
|
+
? {
|
|
695
|
+
deadlineFrom: datePlain
|
|
696
|
+
.optional()
|
|
697
|
+
.describe(
|
|
698
|
+
'Inclusive lower bound on deadline/prazo final (YYYY-MM-DD). Tasks only (type=1): never matches ' +
|
|
699
|
+
'notes or sticky notes. A recurring series appears as one item.'
|
|
700
|
+
),
|
|
701
|
+
deadlineTo: datePlain
|
|
702
|
+
.optional()
|
|
703
|
+
.describe(
|
|
704
|
+
'Inclusive upper bound on deadline/prazo final (YYYY-MM-DD). Tasks only (type=1): never matches ' +
|
|
705
|
+
'notes or sticky notes. A recurring series appears as one item.'
|
|
706
|
+
),
|
|
707
|
+
}
|
|
708
|
+
: {}),
|
|
650
709
|
sortBy: listSortBy,
|
|
651
710
|
limit: listLimit,
|
|
652
711
|
...(kind === 'all' ? {} : { page: listPage }),
|