@funny-booth/langley-video-mcp 0.4.0 → 0.5.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/dist/client.js +3 -2
- package/dist/index.js +5 -3
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -44,11 +44,12 @@ export async function productions(token, f = fetch) {
|
|
|
44
44
|
return (await res.json()).productions;
|
|
45
45
|
}
|
|
46
46
|
/** 制作を依頼する。決まり(訴求軸は必須・訴求要素は CR 1本ずつ必須・合計5本まで)を確かめるのはサーバー側 */
|
|
47
|
-
|
|
47
|
+
/** test: 試験の依頼(知らせに【試験】が付き、答え合わせに使われない)。true のときだけ送る */
|
|
48
|
+
export async function request(token, sku, items, f = fetch, test = false) {
|
|
48
49
|
const res = await call("/request", token, {
|
|
49
50
|
method: "POST",
|
|
50
51
|
headers: { "Content-Type": "application/json" },
|
|
51
|
-
body: JSON.stringify({ sku, items }),
|
|
52
|
+
body: JSON.stringify(test ? { sku, items, test: true } : { sku, items }),
|
|
52
53
|
}, f);
|
|
53
54
|
return (await res.json());
|
|
54
55
|
}
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ const fail = (e) => ({
|
|
|
12
12
|
content: [{ type: "text", text: e instanceof AgentError ? e.message : `動画の受け口につながりません: ${String(e)}` }],
|
|
13
13
|
isError: true,
|
|
14
14
|
});
|
|
15
|
-
const server = new McpServer({ name: "langley-video", version: "0.
|
|
15
|
+
const server = new McpServer({ name: "langley-video", version: "0.5.0" });
|
|
16
16
|
server.registerTool("video_productions", {
|
|
17
17
|
description: "ラングレー動画の制作の一覧(新しい順)。どの動画がどの段階か(絵コンテ承認待ち・最終確認待ち・納品できる)と、承認画面のリンクを返す",
|
|
18
18
|
inputSchema: {},
|
|
@@ -53,10 +53,12 @@ server.registerTool("video_request", {
|
|
|
53
53
|
elements: z.array(z.string().min(1).max(200)).optional().describe("CR 1本ずつの訴求要素(例: 洗濯しても伸びにくい)。数が本数になる。おまかせ以外は必須"),
|
|
54
54
|
count: z.number().int().min(1).max(5).optional().describe("「おまかせ」のときの本数"),
|
|
55
55
|
})).min(1).describe("訴求軸ごとの依頼(同じ訴求軸は1つにまとめる)"),
|
|
56
|
+
test: z.boolean().optional().describe("動作確認の試験の依頼のときだけ true(依頼した人が「試験」「動作確認」と言ったとき)。" +
|
|
57
|
+
"知らせに【試験】が付き、成績の答え合わせに使われない。ふだんの依頼では渡さない"),
|
|
56
58
|
},
|
|
57
|
-
}, async ({ sku, items }) => {
|
|
59
|
+
}, async ({ sku, items, test }) => {
|
|
58
60
|
try {
|
|
59
|
-
const r = await request(token(), sku, items);
|
|
61
|
+
const r = await request(token(), sku, items, fetch, test === true);
|
|
60
62
|
return text(`${r.message}\n制作名: ${r.productions.join("、")}`);
|
|
61
63
|
}
|
|
62
64
|
catch (e) {
|