tripinned-mcp 1.0.8 → 1.0.10
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 +10 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { TRIP_LIMIT, ITEM_PER_DAY_LIMIT } from "./limits.js";
|
|
6
|
+
import { version } from "../package.json";
|
|
6
7
|
const API_KEY = process.env.TRIPINNED_API_KEY;
|
|
7
8
|
const BASE_URL = process.env.TRIPINNED_API_URL ?? "https://api.tripinned.com/v1";
|
|
8
9
|
if (!API_KEY) {
|
|
@@ -32,9 +33,14 @@ async function call(method, path, body) {
|
|
|
32
33
|
}
|
|
33
34
|
return data;
|
|
34
35
|
}
|
|
35
|
-
const server = new McpServer({
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
const server = new McpServer({ name: "tripinned", version }, {
|
|
37
|
+
instructions: `
|
|
38
|
+
Tripinned trip planning rules:
|
|
39
|
+
- Stopovers and layovers (transit stops between flights) must be created as a SINGLE item, not separate items. Combine them into one item with a clear title (e.g. "Layover at Dubai Airport").
|
|
40
|
+
- Each item belongs to exactly one day; do not split a single event across multiple days.
|
|
41
|
+
- When adding flight segments, group the full route (origin → stopover → destination) as one item if the user is just passing through.
|
|
42
|
+
- Hotel stays (check-in and check-out) must be created as a SINGLE item. Do not create separate items for check-in and check-out. Place the item on the check-in day and include both dates in the description (e.g. "Hotel ABC — Check-in Mar 5, Check-out Mar 8").
|
|
43
|
+
`.trim(),
|
|
38
44
|
});
|
|
39
45
|
// ── Trips ────────────────────────────────────────────────────────────────────
|
|
40
46
|
server.tool("list_trips", "내 여행 플랜 목록을 가져옵니다.", {}, async () => {
|
|
@@ -49,7 +55,7 @@ server.tool("create_trip", `새 여행 플랜을 만듭니다. 날짜 범위에
|
|
|
49
55
|
title: z.string().max(30).describe("플랜 제목 (최대 30자)"),
|
|
50
56
|
start_date: z.string().describe("시작일 (YYYY-MM-DD)"),
|
|
51
57
|
end_date: z.string().describe("종료일 (YYYY-MM-DD), 시작일 포함 최대 30일"),
|
|
52
|
-
cover_icon: z.string().optional().describe("커버 이모지 (기본값: ✈️)"),
|
|
58
|
+
cover_icon: z.string().optional().describe("커버 이모지 (기본값: ✈️). 예: ✈️ 🌏 🏖️ 🏔️ 🗼 🎒 — 반드시 단일 이모지 문자를 사용하세요"),
|
|
53
59
|
}, async ({ title, start_date, end_date, cover_icon }) => {
|
|
54
60
|
const data = await call("POST", "/trips", {
|
|
55
61
|
title,
|