tripinned-mcp 1.0.17 → 1.0.19
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 +66 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -49,6 +49,7 @@ Tripinned trip planning rules:
|
|
|
49
49
|
- When adding flight segments, group the full route (origin → stopover → destination) as one item if the user is just passing through.
|
|
50
50
|
- To show an item in the route map, set show_on_route to true. For place items, provide either lat/lng for a single location or locations for up to 10 ordered place stops. For flights, provide origin/destination IATA codes in from_place and to_place; no separate coordinates are needed. For non-flight transport, provide from_place/from_lat/from_lng and/or to_place/to_lat/to_lng.
|
|
51
51
|
- Hotel stays must use icon HOTEL with check-in in start_time, check-out in end_time, and end_day_offset for the check-out day. The API creates a check-in/check-out group with one shared groupId; add_item returns the check-in item and get_trip shows both items.
|
|
52
|
+
- To change an existing item to or from HOTEL, or to change any grouped item's icon, use convert_item_type instead of update_item so every group member changes atomically.
|
|
52
53
|
`.trim(),
|
|
53
54
|
});
|
|
54
55
|
// ── Trips ────────────────────────────────────────────────────────────────────
|
|
@@ -109,6 +110,7 @@ server.tool("add_item", `특정 Day에 일정을 추가합니다. Day당 최대
|
|
|
109
110
|
trip_id: z.string().describe("플랜 ID"),
|
|
110
111
|
day_id: z.string().describe("Day ID (get_trip으로 확인 가능)"),
|
|
111
112
|
title: z.string().max(50).describe("일정 제목 (최대 50자)"),
|
|
113
|
+
order: z.coerce.number().int().min(0).optional().describe("Day 안에서의 일정 순서 (0부터 시작)"),
|
|
112
114
|
icon: z.string().optional().describe("아이콘 (FOOD|CAFE|HOTEL|SIGHTSEEING|SHOPPING|ACTIVITY|ETC|TRANSPORT|PLANE|TRAIN|BUS|CAR|BOAT|WALK|TRANSPORT_ETC, 기본값: ETC)"),
|
|
113
115
|
start_time: z.string().optional().describe("시작 시간 (HH:MM)"),
|
|
114
116
|
end_time: z.string().optional().describe("종료 시간 (HH:MM)"),
|
|
@@ -141,8 +143,10 @@ server.tool("add_item", `특정 Day에 일정을 추가합니다. Day당 최대
|
|
|
141
143
|
.optional()
|
|
142
144
|
.describe('경유지 JSON 배열 (항공편 전용). 필드: iata, tz, arrTime(HH:MM), arrOffset, depTime(HH:MM), depOffset, depFlightNo?, airportChange?, depIata?, depTz?'),
|
|
143
145
|
flight_no: z.string().optional().describe("항공편 번호 (예: KE447)"),
|
|
144
|
-
}, async ({ trip_id, day_id, title, icon, start_time, end_time, end_day_offset, place, lat, lng, locations, timezone, show_on_route, memo, from_place, from_lat, from_lng, to_place, to_lat, to_lng, layovers, flight_no, }) => {
|
|
146
|
+
}, async ({ trip_id, day_id, title, order, icon, start_time, end_time, end_day_offset, place, lat, lng, locations, timezone, show_on_route, memo, from_place, from_lat, from_lng, to_place, to_lat, to_lng, layovers, flight_no, }) => {
|
|
145
147
|
const body = { title };
|
|
148
|
+
if (order !== undefined)
|
|
149
|
+
body.order = order;
|
|
146
150
|
if (icon)
|
|
147
151
|
body.icon = icon;
|
|
148
152
|
if (start_time)
|
|
@@ -184,12 +188,13 @@ server.tool("add_item", `특정 Day에 일정을 추가합니다. Day당 최대
|
|
|
184
188
|
const data = await call("POST", `/trips/${trip_id}/days/${day_id}/items`, body);
|
|
185
189
|
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
186
190
|
});
|
|
187
|
-
server.tool("update_item", "일정을 수정합니다. 변경할 필드만 보내면 됩니다.", {
|
|
191
|
+
server.tool("update_item", "일정을 수정합니다. 변경할 필드만 보내면 됩니다. HOTEL 타입 또는 그룹 일정의 icon을 변경할 때는 update_item 대신 convert_item_type을 사용하세요.", {
|
|
188
192
|
trip_id: z.string().describe("플랜 ID"),
|
|
189
193
|
day_id: z.string().describe("Day ID"),
|
|
190
194
|
item_id: z.string().describe("일정 ID"),
|
|
191
195
|
title: z.string().max(50).optional().describe("새 제목"),
|
|
192
|
-
|
|
196
|
+
order: z.coerce.number().int().min(0).optional().describe("Day 안에서의 일정 순서 (0부터 시작)"),
|
|
197
|
+
icon: z.string().optional().describe("아이콘 (HOTEL 타입 또는 그룹 일정의 icon 변경은 convert_item_type 사용)"),
|
|
193
198
|
start_time: z.string().optional().describe("시작 시간 (HH:MM)"),
|
|
194
199
|
end_time: z.string().optional().describe("종료 시간 (HH:MM)"),
|
|
195
200
|
end_day_offset: z.coerce.number().int().min(0).optional().describe("도착일 오프셋 (0=당일, 1=다음날)"),
|
|
@@ -223,10 +228,12 @@ server.tool("update_item", "일정을 수정합니다. 변경할 필드만 보
|
|
|
223
228
|
.optional()
|
|
224
229
|
.describe('경유지 JSON 배열 (항공편 전용). 필드: iata, tz, arrTime(HH:MM), arrOffset, depTime(HH:MM), depOffset, depFlightNo?, airportChange?, depIata?, depTz?. null로 초기화 가능'),
|
|
225
230
|
flight_no: z.string().optional().describe("항공편 번호 (예: KE447)"),
|
|
226
|
-
}, async ({ trip_id, day_id, item_id, title, icon, start_time, end_time, end_day_offset, place, lat, lng, locations, timezone, show_on_route, memo, from_place, from_lat, from_lng, to_place, to_lat, to_lng, layovers, flight_no, }) => {
|
|
231
|
+
}, async ({ trip_id, day_id, item_id, title, order, icon, start_time, end_time, end_day_offset, place, lat, lng, locations, timezone, show_on_route, memo, from_place, from_lat, from_lng, to_place, to_lat, to_lng, layovers, flight_no, }) => {
|
|
227
232
|
const body = {};
|
|
228
233
|
if (title !== undefined)
|
|
229
234
|
body.title = title;
|
|
235
|
+
if (order !== undefined)
|
|
236
|
+
body.order = order;
|
|
230
237
|
if (icon !== undefined)
|
|
231
238
|
body.icon = icon;
|
|
232
239
|
if (start_time !== undefined)
|
|
@@ -268,7 +275,61 @@ server.tool("update_item", "일정을 수정합니다. 변경할 필드만 보
|
|
|
268
275
|
const data = await call("PATCH", `/trips/${trip_id}/days/${day_id}/items/${item_id}`, body);
|
|
269
276
|
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
270
277
|
});
|
|
271
|
-
server.tool("
|
|
278
|
+
server.tool("convert_item_type", "일정 타입을 안전하게 변경합니다. 일반 일정→HOTEL 또는 HOTEL 그룹→다른 타입처럼 그룹 구조가 달라질 수 있는 icon 변경은 이 도구를 사용하세요. icon=HOTEL이면 start_time, end_time, end_day_offset을 모두 반드시 제공해야 합니다.", {
|
|
279
|
+
trip_id: z.string().describe("플랜 ID"),
|
|
280
|
+
day_id: z.string().describe("변경할 일정이 현재 속한 Day ID"),
|
|
281
|
+
item_id: z.string().describe("변경할 일정 ID (HOTEL 그룹은 어느 멤버 ID든 가능)"),
|
|
282
|
+
icon: z
|
|
283
|
+
.enum([
|
|
284
|
+
"FOOD",
|
|
285
|
+
"CAFE",
|
|
286
|
+
"HOTEL",
|
|
287
|
+
"SIGHTSEEING",
|
|
288
|
+
"SHOPPING",
|
|
289
|
+
"ACTIVITY",
|
|
290
|
+
"ETC",
|
|
291
|
+
"TRANSPORT",
|
|
292
|
+
"PLANE",
|
|
293
|
+
"TRAIN",
|
|
294
|
+
"BUS",
|
|
295
|
+
"CAR",
|
|
296
|
+
"BOAT",
|
|
297
|
+
"WALK",
|
|
298
|
+
"TRANSPORT_ETC",
|
|
299
|
+
])
|
|
300
|
+
.describe("변경할 일정 타입"),
|
|
301
|
+
start_time: z
|
|
302
|
+
.string()
|
|
303
|
+
.optional()
|
|
304
|
+
.describe("숙소 체크인 시간 (HH:MM). icon=HOTEL이면 필수"),
|
|
305
|
+
end_time: z
|
|
306
|
+
.string()
|
|
307
|
+
.optional()
|
|
308
|
+
.describe("숙소 체크아웃 시간 (HH:MM). icon=HOTEL이면 필수"),
|
|
309
|
+
end_day_offset: z
|
|
310
|
+
.coerce.number()
|
|
311
|
+
.int()
|
|
312
|
+
.min(0)
|
|
313
|
+
.optional()
|
|
314
|
+
.describe("숙소 체크아웃 날짜 오프셋. icon=HOTEL이면 필수"),
|
|
315
|
+
}, async ({ trip_id, day_id, item_id, icon, start_time, end_time, end_day_offset, }) => {
|
|
316
|
+
if (icon === "HOTEL" &&
|
|
317
|
+
(start_time === undefined ||
|
|
318
|
+
end_time === undefined ||
|
|
319
|
+
end_day_offset === undefined)) {
|
|
320
|
+
throw new Error("HOTEL 타입으로 변경하려면 start_time, end_time, end_day_offset을 모두 제공해야 합니다.");
|
|
321
|
+
}
|
|
322
|
+
const body = { icon };
|
|
323
|
+
if (start_time !== undefined)
|
|
324
|
+
body.startTime = start_time;
|
|
325
|
+
if (end_time !== undefined)
|
|
326
|
+
body.endTime = end_time;
|
|
327
|
+
if (end_day_offset !== undefined)
|
|
328
|
+
body.endDayOffset = end_day_offset;
|
|
329
|
+
const data = await call("PUT", `/trips/${trip_id}/days/${day_id}/items/${item_id}/type`, body);
|
|
330
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
331
|
+
});
|
|
332
|
+
server.tool("delete_item", "일정을 삭제합니다. 그룹 멤버를 지정하면 API가 해당 그룹 전체를 함께 삭제합니다.", {
|
|
272
333
|
trip_id: z.string().describe("플랜 ID"),
|
|
273
334
|
day_id: z.string().describe("Day ID"),
|
|
274
335
|
item_id: z.string().describe("일정 ID"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tripinned-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"description": "MCP server for Tripinned — manage your travel plans with AI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"start": "node dist/index.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
20
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
21
21
|
"zod": "^4.3.6"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|