@ourroadmaps/mcp 0.18.1 → 0.20.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.
Files changed (2) hide show
  1. package/dist/index.js +339 -98
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -22,10 +22,28 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
22
22
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
23
23
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
24
24
  // ../../packages/shared/src/schemas/audience.ts
25
- import { z as z2 } from "zod";
26
-
27
- // ../../packages/shared/src/schemas/constants.ts
28
25
  import { z } from "zod";
26
+ var audienceSchema = z.object({
27
+ id: z.string().uuid(),
28
+ organizationId: z.string(),
29
+ name: z.string(),
30
+ description: z.string().nullable(),
31
+ order: z.number().int(),
32
+ createdAt: z.string(),
33
+ updatedAt: z.string().nullable()
34
+ });
35
+ var createAudienceSchema = z.object({
36
+ name: z.string().min(1),
37
+ description: z.string().nullable().optional()
38
+ });
39
+ var updateAudienceSchema = z.object({
40
+ name: z.string().min(1).optional(),
41
+ description: z.string().nullable().optional(),
42
+ order: z.number().int().optional()
43
+ });
44
+ var audienceListSchema = z.array(audienceSchema);
45
+ // ../../packages/shared/src/schemas/constants.ts
46
+ import { z as z2 } from "zod";
29
47
  var HORIZONS = [
30
48
  "inbox",
31
49
  "now",
@@ -36,7 +54,7 @@ var HORIZONS = [
36
54
  "done",
37
55
  "cancelled"
38
56
  ];
39
- var horizonSchema = z.enum(HORIZONS);
57
+ var horizonSchema = z2.enum(HORIZONS);
40
58
  var ROADMAP_STATUSES = [
41
59
  "not_started",
42
60
  "planning",
@@ -46,17 +64,17 @@ var ROADMAP_STATUSES = [
46
64
  "done",
47
65
  "cancelled"
48
66
  ];
49
- var roadmapStatusSchema = z.enum(ROADMAP_STATUSES);
67
+ var roadmapStatusSchema = z2.enum(ROADMAP_STATUSES);
50
68
  var EFFORT_SIZES = ["xs", "s", "m", "l", "xl"];
51
- var effortSchema = z.enum(EFFORT_SIZES);
69
+ var effortSchema = z2.enum(EFFORT_SIZES);
52
70
  var DATE_GRANULARITIES = ["day", "month", "quarter", "half-year", "year"];
53
- var dateGranularitySchema = z.enum(DATE_GRANULARITIES);
71
+ var dateGranularitySchema = z2.enum(DATE_GRANULARITIES);
54
72
  var PRD_STATUSES = ["draft", "completed"];
55
- var prdStatusSchema = z.enum(PRD_STATUSES);
73
+ var prdStatusSchema = z2.enum(PRD_STATUSES);
56
74
  var IDEA_STATUSES = ["new", "under-review", "planned", "declined", "done"];
57
- var ideaStatusSchema = z.enum(IDEA_STATUSES);
75
+ var ideaStatusSchema = z2.enum(IDEA_STATUSES);
58
76
  var FEATURE_TYPES = ["area", "feature"];
59
- var featureTypeSchema = z.enum(FEATURE_TYPES);
77
+ var featureTypeSchema = z2.enum(FEATURE_TYPES);
60
78
  var PRODUCT_TYPES = [
61
79
  "brand",
62
80
  "product",
@@ -65,41 +83,11 @@ var PRODUCT_TYPES = [
65
83
  "landing_page",
66
84
  "service"
67
85
  ];
68
- var productTypeSchema = z.enum(PRODUCT_TYPES);
86
+ var productTypeSchema = z2.enum(PRODUCT_TYPES);
69
87
  var AUDIENCE_TYPES = ["stakeholder", "user_persona"];
70
- var audienceTypeSchema = z.enum(AUDIENCE_TYPES);
88
+ var audienceTypeSchema = z2.enum(AUDIENCE_TYPES);
71
89
  var BRAINSTORM_MEDIA_TYPES = ["image", "video"];
72
- var brainstormMediaTypeSchema = z.enum(BRAINSTORM_MEDIA_TYPES);
73
-
74
- // ../../packages/shared/src/schemas/audience.ts
75
- var audienceSchema = z2.object({
76
- id: z2.string().uuid(),
77
- organizationId: z2.string(),
78
- type: audienceTypeSchema,
79
- role: z2.string().nullable(),
80
- likes: z2.string().nullable(),
81
- dislikes: z2.string().nullable(),
82
- priorities: z2.string().nullable(),
83
- order: z2.number().int(),
84
- deletedAt: z2.string().nullable(),
85
- createdAt: z2.string()
86
- });
87
- var createAudienceSchema = z2.object({
88
- type: audienceTypeSchema,
89
- role: z2.string().min(1),
90
- likes: z2.string().nullable().optional(),
91
- dislikes: z2.string().nullable().optional(),
92
- priorities: z2.string().nullable().optional()
93
- });
94
- var updateAudienceSchema = z2.object({
95
- type: audienceTypeSchema.optional(),
96
- role: z2.string().min(1).optional(),
97
- likes: z2.string().nullable().optional(),
98
- dislikes: z2.string().nullable().optional(),
99
- priorities: z2.string().nullable().optional(),
100
- order: z2.number().int().optional()
101
- });
102
- var audienceListSchema = z2.array(audienceSchema);
90
+ var brainstormMediaTypeSchema = z2.enum(BRAINSTORM_MEDIA_TYPES);
103
91
  // ../../packages/shared/src/schemas/context.ts
104
92
  import { z as z3 } from "zod";
105
93
  var domainContextSchema = z3.object({
@@ -899,6 +887,36 @@ class ApiClient {
899
887
  method: "DELETE"
900
888
  });
901
889
  }
890
+ async listInitiatives() {
891
+ const response = await this.request("/v1/initiatives");
892
+ return response.data;
893
+ }
894
+ async getInitiative(id) {
895
+ return await this.request(`/v1/initiatives/${id}`);
896
+ }
897
+ async createInitiative(data) {
898
+ return await this.request("/v1/initiatives", {
899
+ method: "POST",
900
+ body: JSON.stringify(data)
901
+ });
902
+ }
903
+ async updateInitiative(id, data) {
904
+ return await this.request(`/v1/initiatives/${id}`, {
905
+ method: "PATCH",
906
+ body: JSON.stringify(data)
907
+ });
908
+ }
909
+ async deleteInitiative(id) {
910
+ await this.request(`/v1/initiatives/${id}`, {
911
+ method: "DELETE"
912
+ });
913
+ }
914
+ async reorderInitiatives(items) {
915
+ return await this.request("/v1/initiatives/reorder", {
916
+ method: "POST",
917
+ body: JSON.stringify({ items })
918
+ });
919
+ }
902
920
  async updateDesignDescription(roadmapId, description) {
903
921
  const response = await this.request(`/v1/designs/roadmaps/${roadmapId}/design`, {
904
922
  method: "PATCH",
@@ -1018,6 +1036,12 @@ function registerAllTools(server) {
1018
1036
  registerGetHistorySummary(server);
1019
1037
  registerCreateStatusUpdate(server);
1020
1038
  registerSaveStories(server);
1039
+ registerSearchInitiatives(server);
1040
+ registerGetInitiative(server);
1041
+ registerCreateInitiative(server);
1042
+ registerUpdateInitiative(server);
1043
+ registerDeleteInitiative(server);
1044
+ registerReorderInitiatives(server);
1021
1045
  registerUploadWireframe(server);
1022
1046
  registerUpdateWireframe(server);
1023
1047
  registerDeleteWireframe(server);
@@ -1345,19 +1369,25 @@ function registerCreateRoadmapItem(server) {
1345
1369
  inputSchema: {
1346
1370
  title: z11.string().describe("Title of the roadmap item"),
1347
1371
  status: roadmapStatusSchema.optional().describe('Status (defaults to "not_started")'),
1348
- horizon: horizonSchema.optional().describe('Planning horizon (defaults to "inbox")')
1372
+ horizon: horizonSchema.optional().describe('Planning horizon (defaults to "inbox")'),
1373
+ initiativeId: z11.string().optional().describe("UUID of initiative to link this item to on creation")
1349
1374
  }
1350
1375
  }, async ({
1351
1376
  title,
1352
1377
  status,
1353
- horizon
1378
+ horizon,
1379
+ initiativeId
1354
1380
  }) => {
1355
1381
  const client2 = getApiClient();
1356
- const roadmap2 = await client2.createRoadmap({
1382
+ const createData = {
1357
1383
  title,
1358
1384
  status: status ?? "not_started",
1359
1385
  horizon: horizon ?? "inbox"
1360
- });
1386
+ };
1387
+ if (initiativeId) {
1388
+ createData.initiativeId = initiativeId;
1389
+ }
1390
+ const roadmap2 = await client2.createRoadmap(createData);
1361
1391
  return {
1362
1392
  content: [
1363
1393
  {
@@ -1379,7 +1409,7 @@ function registerCreateRoadmapItem(server) {
1379
1409
  var effortSizeSchema = z11.enum(["xs", "s", "m", "l", "xl"]);
1380
1410
  function registerUpdateRoadmapItem(server) {
1381
1411
  server.registerTool("update_roadmap_item", {
1382
- description: "Update an existing roadmap item. Can update title, status, horizon, value, effort, order, prompt, or brainstorm notes.",
1412
+ description: "Update an existing roadmap item. Can update title, status, horizon, value, effort, order, prompt, initiative link, target date, or brainstorm notes.",
1383
1413
  inputSchema: {
1384
1414
  id: z11.string().describe("The UUID of the roadmap item to update"),
1385
1415
  title: z11.string().optional().describe("New title"),
@@ -1388,11 +1418,14 @@ function registerUpdateRoadmapItem(server) {
1388
1418
  value: z11.number().int().min(1).max(3).nullable().optional().describe("Value rating (1-3 stars, where 3 is highest value)"),
1389
1419
  effort: effortSizeSchema.nullable().optional().describe("Effort estimate (xs=extra small, s=small, m=medium, l=large, xl=extra large)"),
1390
1420
  order: z11.number().int().min(0).optional().describe("Sort order for prioritization (lower numbers appear first)"),
1421
+ initiativeId: z11.string().nullable().optional().describe("UUID to link item to initiative, or null to unlink from any initiative"),
1391
1422
  designDescription: z11.string().nullable().optional().describe("Description for the Design phase"),
1392
1423
  planDescription: z11.string().nullable().optional().describe("Description for the Planning phase"),
1393
1424
  buildDescription: z11.string().nullable().optional().describe("Description for the Build phase"),
1394
1425
  releaseDescription: z11.string().nullable().optional().describe("Description for the Release phase"),
1395
- prompt: z11.string().nullable().optional().describe("Build prompt for the roadmap item")
1426
+ prompt: z11.string().nullable().optional().describe("Build prompt for the roadmap item"),
1427
+ dateGranularity: dateGranularitySchema2.nullable().optional().describe("Target date granularity: day, month, quarter, half_year, or year"),
1428
+ dateValue: z11.string().nullable().optional().describe('Target date value matching granularity (e.g., "2024-03-15" for day, "2024-Q1" for quarter)')
1396
1429
  }
1397
1430
  }, async ({
1398
1431
  id,
@@ -1402,11 +1435,14 @@ function registerUpdateRoadmapItem(server) {
1402
1435
  value,
1403
1436
  effort,
1404
1437
  order,
1438
+ initiativeId,
1405
1439
  designDescription,
1406
1440
  planDescription,
1407
1441
  buildDescription,
1408
1442
  releaseDescription,
1409
- prompt
1443
+ prompt,
1444
+ dateGranularity,
1445
+ dateValue
1410
1446
  }) => {
1411
1447
  const client2 = getApiClient();
1412
1448
  const updates = {};
@@ -1422,6 +1458,12 @@ function registerUpdateRoadmapItem(server) {
1422
1458
  updates.effort = effort;
1423
1459
  if (order !== undefined)
1424
1460
  updates.order = order;
1461
+ if (initiativeId !== undefined)
1462
+ updates.initiativeId = initiativeId;
1463
+ if (dateGranularity !== undefined)
1464
+ updates.dateGranularity = dateGranularity;
1465
+ if (dateValue !== undefined)
1466
+ updates.dateValue = dateValue;
1425
1467
  const roadmap2 = Object.keys(updates).length > 0 ? await client2.updateRoadmap(id, updates) : await client2.getRoadmap(id);
1426
1468
  const phaseUpdates = {};
1427
1469
  if (designDescription !== undefined) {
@@ -1461,7 +1503,9 @@ function registerUpdateRoadmapItem(server) {
1461
1503
  horizon: roadmap2.horizon,
1462
1504
  value: roadmap2.value,
1463
1505
  effort: roadmap2.effort,
1464
- order: roadmap2.order
1506
+ order: roadmap2.order,
1507
+ dateGranularity: roadmap2.dateGranularity,
1508
+ dateValue: roadmap2.dateValue
1465
1509
  },
1466
1510
  phaseDescriptionsUpdated: phaseUpdates
1467
1511
  }, null, 2)
@@ -2201,31 +2245,21 @@ function registerUpdateProductDocumentation(server) {
2201
2245
  };
2202
2246
  });
2203
2247
  }
2204
- var audienceTypeSchema2 = z11.enum(["stakeholder", "user_persona"]);
2205
2248
  function registerCreateAudience(server) {
2206
2249
  server.registerTool("create_audience", {
2207
- description: "Create a new audience member - either a stakeholder or user persona. Audiences represent who the product serves.",
2250
+ description: "Create a new audience member. Audiences represent who the product serves.",
2208
2251
  inputSchema: {
2209
- type: audienceTypeSchema2.describe("Type of audience - stakeholder or user_persona"),
2210
- role: z11.string().describe('Role or title of the audience (e.g., "Product Manager", "End User")'),
2211
- likes: z11.string().nullable().optional().describe("What this audience likes or values"),
2212
- dislikes: z11.string().nullable().optional().describe("What this audience dislikes or avoids"),
2213
- priorities: z11.string().nullable().optional().describe("Key priorities for this audience")
2252
+ name: z11.string().describe('Name of the audience (e.g., "Product Manager", "End User")'),
2253
+ description: z11.string().nullable().optional().describe("Description of the audience")
2214
2254
  }
2215
2255
  }, async ({
2216
- type,
2217
- role,
2218
- likes,
2219
- dislikes,
2220
- priorities
2256
+ name,
2257
+ description
2221
2258
  }) => {
2222
2259
  const client2 = getApiClient();
2223
2260
  const audience2 = await client2.createAudience({
2224
- type,
2225
- role,
2226
- likes: likes ?? null,
2227
- dislikes: dislikes ?? null,
2228
- priorities: priorities ?? null
2261
+ name,
2262
+ description: description ?? null
2229
2263
  });
2230
2264
  return {
2231
2265
  content: [
@@ -2235,11 +2269,8 @@ function registerCreateAudience(server) {
2235
2269
  success: true,
2236
2270
  audience: {
2237
2271
  id: audience2.id,
2238
- type: audience2.type,
2239
- role: audience2.role,
2240
- likes: audience2.likes,
2241
- dislikes: audience2.dislikes,
2242
- priorities: audience2.priorities
2272
+ name: audience2.name,
2273
+ description: audience2.description
2243
2274
  }
2244
2275
  }, null, 2)
2245
2276
  }
@@ -2252,32 +2283,20 @@ function registerUpdateAudience(server) {
2252
2283
  description: "Update an existing audience member.",
2253
2284
  inputSchema: {
2254
2285
  id: z11.string().describe("The UUID of the audience to update"),
2255
- type: audienceTypeSchema2.optional().describe("New type"),
2256
- role: z11.string().optional().describe("New role"),
2257
- likes: z11.string().nullable().optional().describe("New likes"),
2258
- dislikes: z11.string().nullable().optional().describe("New dislikes"),
2259
- priorities: z11.string().nullable().optional().describe("New priorities")
2286
+ name: z11.string().optional().describe("New name"),
2287
+ description: z11.string().nullable().optional().describe("New description")
2260
2288
  }
2261
2289
  }, async ({
2262
2290
  id,
2263
- type,
2264
- role,
2265
- likes,
2266
- dislikes,
2267
- priorities
2291
+ name,
2292
+ description
2268
2293
  }) => {
2269
2294
  const client2 = getApiClient();
2270
2295
  const updates = {};
2271
- if (type !== undefined)
2272
- updates.type = type;
2273
- if (role !== undefined)
2274
- updates.role = role;
2275
- if (likes !== undefined)
2276
- updates.likes = likes;
2277
- if (dislikes !== undefined)
2278
- updates.dislikes = dislikes;
2279
- if (priorities !== undefined)
2280
- updates.priorities = priorities;
2296
+ if (name !== undefined)
2297
+ updates.name = name;
2298
+ if (description !== undefined)
2299
+ updates.description = description;
2281
2300
  const audience2 = await client2.updateAudience(id, updates);
2282
2301
  return {
2283
2302
  content: [
@@ -2287,11 +2306,8 @@ function registerUpdateAudience(server) {
2287
2306
  success: true,
2288
2307
  audience: {
2289
2308
  id: audience2.id,
2290
- type: audience2.type,
2291
- role: audience2.role,
2292
- likes: audience2.likes,
2293
- dislikes: audience2.dislikes,
2294
- priorities: audience2.priorities
2309
+ name: audience2.name,
2310
+ description: audience2.description
2295
2311
  }
2296
2312
  }, null, 2)
2297
2313
  }
@@ -3068,6 +3084,231 @@ Expires: ${expiryDate}`
3068
3084
  };
3069
3085
  });
3070
3086
  }
3087
+ var dateGranularitySchema2 = z11.enum(["day", "month", "quarter", "half_year", "year"]);
3088
+ function registerSearchInitiatives(server) {
3089
+ server.registerTool("search_initiatives", {
3090
+ description: "Search for initiatives by title or filter by horizon. Returns a list of matching initiatives with item counts.",
3091
+ inputSchema: {
3092
+ query: z11.string().optional().describe("Search query to match against title or description"),
3093
+ horizon: horizonSchema.optional().describe("Filter by planning horizon"),
3094
+ limit: z11.number().int().min(1).max(100).optional().describe("Max items to return (default 10)"),
3095
+ offset: z11.number().int().min(0).optional().describe("Number of items to skip (default 0)")
3096
+ }
3097
+ }, async ({
3098
+ query,
3099
+ horizon,
3100
+ limit = 10,
3101
+ offset = 0
3102
+ }) => {
3103
+ const client2 = getApiClient();
3104
+ let initiatives = await client2.listInitiatives();
3105
+ if (query) {
3106
+ const lowerQuery = query.toLowerCase();
3107
+ initiatives = initiatives.filter((i) => i.title.toLowerCase().includes(lowerQuery) || i.description?.toLowerCase().includes(lowerQuery));
3108
+ }
3109
+ if (horizon) {
3110
+ initiatives = initiatives.filter((i) => i.horizon === horizon);
3111
+ }
3112
+ const total = initiatives.length;
3113
+ const paginatedInitiatives = initiatives.slice(offset, offset + limit);
3114
+ return {
3115
+ content: [
3116
+ {
3117
+ type: "text",
3118
+ text: JSON.stringify({
3119
+ items: paginatedInitiatives.map((i) => ({
3120
+ id: i.id,
3121
+ title: i.title,
3122
+ description: i.description,
3123
+ horizon: i.horizon,
3124
+ targetDate: i.targetDate,
3125
+ itemCount: i.itemCount,
3126
+ doneCount: i.doneCount,
3127
+ order: i.order
3128
+ })),
3129
+ pagination: {
3130
+ limit,
3131
+ offset,
3132
+ total,
3133
+ hasMore: offset + limit < total
3134
+ }
3135
+ }, null, 2)
3136
+ }
3137
+ ]
3138
+ };
3139
+ });
3140
+ }
3141
+ function registerGetInitiative(server) {
3142
+ server.registerTool("get_initiative", {
3143
+ description: "Get full details of an initiative including all linked roadmap items.",
3144
+ inputSchema: {
3145
+ id: z11.string().describe("The UUID of the initiative")
3146
+ }
3147
+ }, async ({ id }) => {
3148
+ const client2 = getApiClient();
3149
+ const result = await client2.getInitiative(id);
3150
+ return {
3151
+ content: [
3152
+ {
3153
+ type: "text",
3154
+ text: JSON.stringify(result, null, 2)
3155
+ }
3156
+ ]
3157
+ };
3158
+ });
3159
+ }
3160
+ function registerCreateInitiative(server) {
3161
+ server.registerTool("create_initiative", {
3162
+ description: "Create a new initiative. Initiatives group related roadmap items for cross-functional coordination.",
3163
+ inputSchema: {
3164
+ title: z11.string().describe("Title of the initiative"),
3165
+ description: z11.string().optional().describe("Description of the initiative (markdown)"),
3166
+ horizon: horizonSchema.optional().describe('Planning horizon (defaults to "inbox")'),
3167
+ dateGranularity: dateGranularitySchema2.optional().describe("Target date granularity: day, month, quarter, half_year, or year"),
3168
+ dateValue: z11.string().optional().describe('Target date value matching granularity (e.g., "2024-Q1", "2024-03")'),
3169
+ targetDate: z11.string().optional().describe("Target date in YYYY-MM-DD format")
3170
+ }
3171
+ }, async ({
3172
+ title,
3173
+ description,
3174
+ horizon,
3175
+ dateGranularity,
3176
+ dateValue,
3177
+ targetDate
3178
+ }) => {
3179
+ const client2 = getApiClient();
3180
+ const initiative = await client2.createInitiative({
3181
+ title,
3182
+ description: description ?? null,
3183
+ horizon: horizon ?? "inbox",
3184
+ dateGranularity: dateGranularity ?? null,
3185
+ dateValue: dateValue ?? null,
3186
+ targetDate: targetDate ?? null
3187
+ });
3188
+ return {
3189
+ content: [
3190
+ {
3191
+ type: "text",
3192
+ text: JSON.stringify({
3193
+ success: true,
3194
+ initiative: {
3195
+ id: initiative.id,
3196
+ title: initiative.title,
3197
+ description: initiative.description,
3198
+ horizon: initiative.horizon,
3199
+ targetDate: initiative.targetDate,
3200
+ itemCount: initiative.itemCount,
3201
+ doneCount: initiative.doneCount
3202
+ }
3203
+ }, null, 2)
3204
+ }
3205
+ ]
3206
+ };
3207
+ });
3208
+ }
3209
+ function registerUpdateInitiative(server) {
3210
+ server.registerTool("update_initiative", {
3211
+ description: "Update an existing initiative.",
3212
+ inputSchema: {
3213
+ id: z11.string().describe("The UUID of the initiative to update"),
3214
+ title: z11.string().optional().describe("New title"),
3215
+ description: z11.string().nullable().optional().describe("New description (null to clear)"),
3216
+ horizon: horizonSchema.optional().describe("New planning horizon"),
3217
+ dateGranularity: dateGranularitySchema2.nullable().optional().describe("New target date granularity (null to clear)"),
3218
+ dateValue: z11.string().nullable().optional().describe("New target date value (null to clear)"),
3219
+ targetDate: z11.string().nullable().optional().describe("New target date in YYYY-MM-DD format (null to clear)"),
3220
+ order: z11.number().int().min(0).optional().describe("Sort order for prioritization (lower numbers appear first)")
3221
+ }
3222
+ }, async ({
3223
+ id,
3224
+ title,
3225
+ description,
3226
+ horizon,
3227
+ dateGranularity,
3228
+ dateValue,
3229
+ targetDate,
3230
+ order
3231
+ }) => {
3232
+ const client2 = getApiClient();
3233
+ const updates = {};
3234
+ if (title !== undefined)
3235
+ updates.title = title;
3236
+ if (description !== undefined)
3237
+ updates.description = description;
3238
+ if (horizon !== undefined)
3239
+ updates.horizon = horizon;
3240
+ if (dateGranularity !== undefined)
3241
+ updates.dateGranularity = dateGranularity;
3242
+ if (dateValue !== undefined)
3243
+ updates.dateValue = dateValue;
3244
+ if (targetDate !== undefined)
3245
+ updates.targetDate = targetDate;
3246
+ if (order !== undefined)
3247
+ updates.order = order;
3248
+ const initiative = await client2.updateInitiative(id, updates);
3249
+ return {
3250
+ content: [
3251
+ {
3252
+ type: "text",
3253
+ text: JSON.stringify({
3254
+ success: true,
3255
+ initiative: {
3256
+ id: initiative.id,
3257
+ title: initiative.title,
3258
+ description: initiative.description,
3259
+ horizon: initiative.horizon,
3260
+ targetDate: initiative.targetDate,
3261
+ itemCount: initiative.itemCount,
3262
+ doneCount: initiative.doneCount,
3263
+ order: initiative.order
3264
+ }
3265
+ }, null, 2)
3266
+ }
3267
+ ]
3268
+ };
3269
+ });
3270
+ }
3271
+ function registerDeleteInitiative(server) {
3272
+ server.registerTool("delete_initiative", {
3273
+ description: "Delete an initiative. This is a soft delete that also unlinks all roadmap items from the initiative.",
3274
+ inputSchema: {
3275
+ id: z11.string().describe("The UUID of the initiative to delete")
3276
+ }
3277
+ }, async ({ id }) => {
3278
+ const client2 = getApiClient();
3279
+ await client2.deleteInitiative(id);
3280
+ return {
3281
+ content: [
3282
+ {
3283
+ type: "text",
3284
+ text: JSON.stringify({ success: true, deleted: id }, null, 2)
3285
+ }
3286
+ ]
3287
+ };
3288
+ });
3289
+ }
3290
+ function registerReorderInitiatives(server) {
3291
+ server.registerTool("reorder_initiatives", {
3292
+ description: "Bulk reorder initiatives by setting their order values. Lower order values appear first.",
3293
+ inputSchema: {
3294
+ items: z11.array(z11.object({
3295
+ id: z11.string().describe("The UUID of the initiative"),
3296
+ order: z11.number().int().min(0).describe("The new order value (0-based)")
3297
+ })).describe("Array of initiatives with their new order values")
3298
+ }
3299
+ }, async ({ items }) => {
3300
+ const client2 = getApiClient();
3301
+ await client2.reorderInitiatives(items);
3302
+ return {
3303
+ content: [
3304
+ {
3305
+ type: "text",
3306
+ text: JSON.stringify({ success: true, reordered: items.length }, null, 2)
3307
+ }
3308
+ ]
3309
+ };
3310
+ });
3311
+ }
3071
3312
 
3072
3313
  // src/index.ts
3073
3314
  async function main() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ourroadmaps/mcp",
3
- "version": "0.18.1",
3
+ "version": "0.20.0",
4
4
  "description": "MCP server for OurRoadmaps - manage roadmaps, features, and ideas from Claude Code",
5
5
  "type": "module",
6
6
  "bin": {