@damper/mcp 0.3.19 ā 0.3.20
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/dist/index.js +16 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -117,10 +117,12 @@ server.registerTool('list_tasks', {
|
|
|
117
117
|
type: z.enum(['bug', 'feature', 'improvement', 'task']).optional().describe('Filter by task type'),
|
|
118
118
|
quarter: z.string().optional().describe('Filter by quarter (e.g., "Q1 2025") or "none" for unscheduled'),
|
|
119
119
|
sort: z.enum(['importance', 'newest', 'votes']).optional().describe('Sort order: importance (priority+votes, default), newest, or votes'),
|
|
120
|
-
limit: z.number().optional(),
|
|
120
|
+
limit: z.number().optional().describe('Max tasks to return (default: 20)'),
|
|
121
|
+
offset: z.number().optional().describe('Skip first N tasks for pagination (default: 0)'),
|
|
121
122
|
}),
|
|
122
123
|
outputSchema: z.object({
|
|
123
124
|
project: z.string(),
|
|
125
|
+
total: z.number(),
|
|
124
126
|
tasks: z.array(TaskSummarySchema),
|
|
125
127
|
}),
|
|
126
128
|
annotations: {
|
|
@@ -129,7 +131,7 @@ server.registerTool('list_tasks', {
|
|
|
129
131
|
idempotentHint: true,
|
|
130
132
|
openWorldHint: false,
|
|
131
133
|
},
|
|
132
|
-
}, async ({ status, type, quarter, sort, limit }) => {
|
|
134
|
+
}, async ({ status, type, quarter, sort, limit, offset }) => {
|
|
133
135
|
const params = new URLSearchParams();
|
|
134
136
|
if (status)
|
|
135
137
|
params.set('status', status);
|
|
@@ -141,13 +143,15 @@ server.registerTool('list_tasks', {
|
|
|
141
143
|
params.set('sort', sort);
|
|
142
144
|
if (limit)
|
|
143
145
|
params.set('limit', String(limit));
|
|
146
|
+
if (offset)
|
|
147
|
+
params.set('offset', String(offset));
|
|
144
148
|
const query = params.toString();
|
|
145
149
|
const data = await api('GET', `/api/agent/tasks${query ? `?${query}` : ''}`);
|
|
146
150
|
if (!data.tasks.length) {
|
|
147
151
|
const filters = [type && `type: ${type}`, quarter && `quarter: ${quarter}`].filter(Boolean).join(', ');
|
|
148
152
|
return {
|
|
149
153
|
content: [{ type: 'text', text: `No tasks in "${data.project.name}"${filters ? ` (${filters})` : ''}` }],
|
|
150
|
-
structuredContent: { project: data.project.name, tasks: [] },
|
|
154
|
+
structuredContent: { project: data.project.name, total: 0, tasks: [] },
|
|
151
155
|
};
|
|
152
156
|
}
|
|
153
157
|
const lines = data.tasks.map((t) => {
|
|
@@ -157,15 +161,20 @@ server.registerTool('list_tasks', {
|
|
|
157
161
|
const quarterInfo = t.quarter ? ` š
${t.quarter}` : '';
|
|
158
162
|
return `⢠${t.id}: ${typeIcon} ${t.title} [${t.status}] ${p}${quarterInfo}${t.hasImplementationPlan ? ' š' : ''}${subtaskInfo}`;
|
|
159
163
|
});
|
|
164
|
+
const currentOffset = offset || 0;
|
|
165
|
+
const paginationInfo = data.total > currentOffset + data.tasks.length
|
|
166
|
+
? `\nš Showing ${currentOffset + 1}ā${currentOffset + data.tasks.length} of ${data.total}. Use offset=${currentOffset + data.tasks.length} to see more.`
|
|
167
|
+
: '';
|
|
160
168
|
const output = [
|
|
161
|
-
`Tasks in "${data.project.name}":`,
|
|
169
|
+
`Tasks in "${data.project.name}" (${data.total} total):`,
|
|
162
170
|
lines.join('\n'),
|
|
171
|
+
paginationInfo,
|
|
163
172
|
'',
|
|
164
173
|
'š” **Tip:** Run `get_project_context` first to understand codebase patterns before starting work.',
|
|
165
174
|
].join('\n');
|
|
166
175
|
return {
|
|
167
176
|
content: [{ type: 'text', text: output }],
|
|
168
|
-
structuredContent: { project: data.project.name, tasks: data.tasks },
|
|
177
|
+
structuredContent: { project: data.project.name, total: data.total, tasks: data.tasks },
|
|
169
178
|
};
|
|
170
179
|
});
|
|
171
180
|
// Tool: Get task
|
|
@@ -326,7 +335,8 @@ server.registerTool('create_task', {
|
|
|
326
335
|
title: 'Create Task',
|
|
327
336
|
description: 'Create a new roadmap task. Use for importing from TODO files or creating work items.',
|
|
328
337
|
inputSchema: z.object({
|
|
329
|
-
title: z.string()
|
|
338
|
+
title: z.string().describe('Task title. Use verb prefix matching the type: ' +
|
|
339
|
+
'bug ā "Fix ā¦", feature ā "Add ā¦", improvement ā "Improve ā¦", task ā "Set up ā¦" / "Update ā¦"'),
|
|
330
340
|
description: z.string().optional(),
|
|
331
341
|
type: z.enum(['bug', 'feature', 'improvement', 'task']).optional().describe('Task type (default: feature)'),
|
|
332
342
|
status: z.enum(['planned', 'in_progress', 'done']).optional(),
|