@funny-booth/langley-video-mcp 0.5.0 → 0.6.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 +5 -4
- package/dist/index.js +9 -6
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -43,13 +43,14 @@ export async function productions(token, f = fetch) {
|
|
|
43
43
|
const res = await call("/productions", token, {}, f);
|
|
44
44
|
return (await res.json()).productions;
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
/** test: 試験の依頼(知らせに【試験】が付き、答え合わせに使われない)。true のときだけ送る */
|
|
48
|
-
export async function request(token, sku, items, f = fetch, test = false) {
|
|
46
|
+
export async function request(token, sku, items, f = fetch, test = false, free = {}) {
|
|
49
47
|
const res = await call("/request", token, {
|
|
50
48
|
method: "POST",
|
|
51
49
|
headers: { "Content-Type": "application/json" },
|
|
52
|
-
body: JSON.stringify(
|
|
50
|
+
body: JSON.stringify({
|
|
51
|
+
sku, items, ...(test ? { test: true } : {}),
|
|
52
|
+
...(free.wish ? { wish: free.wish } : {}), ...(free.references?.length ? { references: free.references } : {}),
|
|
53
|
+
}),
|
|
53
54
|
}, f);
|
|
54
55
|
return (await res.json());
|
|
55
56
|
}
|
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.6.0" });
|
|
16
16
|
server.registerTool("video_productions", {
|
|
17
17
|
description: "ラングレー動画の制作の一覧(新しい順)。どの動画がどの段階か(絵コンテ承認待ち・最終確認待ち・納品できる)と、承認画面のリンクを返す",
|
|
18
18
|
inputSchema: {},
|
|
@@ -42,9 +42,10 @@ server.registerTool("video_appeals", {
|
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
server.registerTool("video_request", {
|
|
45
|
-
description: "
|
|
46
|
-
"
|
|
47
|
-
"
|
|
45
|
+
description: "ラングレー動画の制作を依頼する。依頼した人が自由に書いた依頼の文章(wish)をそのまま渡すのが基本。" +
|
|
46
|
+
"商品は必須(文章から読み取り、復唱で確かめる)。訴求軸が文章からはっきり決まらなければ「おまかせ」と本数(count)でよく、" +
|
|
47
|
+
"台本の AI は依頼の文章を優先する。訴求軸を決めて頼まれたときは、video_appeals の区分名と、CR 1本ずつの訴求要素" +
|
|
48
|
+
"(依頼した人の言葉のまま・作らない)を渡す。1回で複数の訴求軸を渡せる(合計5本まで)。" +
|
|
48
49
|
"制作は VPS で1本ずつ順番に始まり、絵コンテ(ゲート①)ができたら Slack で知らせる。ここではクレジットを使わない",
|
|
49
50
|
inputSchema: {
|
|
50
51
|
sku: z.string().describe("商品の名前(ブレインの商品の一覧にあるもの)"),
|
|
@@ -53,12 +54,14 @@ server.registerTool("video_request", {
|
|
|
53
54
|
elements: z.array(z.string().min(1).max(200)).optional().describe("CR 1本ずつの訴求要素(例: 洗濯しても伸びにくい)。数が本数になる。おまかせ以外は必須"),
|
|
54
55
|
count: z.number().int().min(1).max(5).optional().describe("「おまかせ」のときの本数"),
|
|
55
56
|
})).min(1).describe("訴求軸ごとの依頼(同じ訴求軸は1つにまとめる)"),
|
|
57
|
+
wish: z.string().min(1).max(2000).optional().describe("依頼した人が書いた依頼の文章(そのまま・要約や言い換えをしない)。どの CR にも渡る"),
|
|
58
|
+
references: z.array(z.string().url()).max(5).optional().describe("参考の動画の URL(依頼した人が持ってきたもの・5本まで)"),
|
|
56
59
|
test: z.boolean().optional().describe("動作確認の試験の依頼のときだけ true(依頼した人が「試験」「動作確認」と言ったとき)。" +
|
|
57
60
|
"知らせに【試験】が付き、成績の答え合わせに使われない。ふだんの依頼では渡さない"),
|
|
58
61
|
},
|
|
59
|
-
}, async ({ sku, items, test }) => {
|
|
62
|
+
}, async ({ sku, items, test, wish, references }) => {
|
|
60
63
|
try {
|
|
61
|
-
const r = await request(token(), sku, items, fetch, test === true);
|
|
64
|
+
const r = await request(token(), sku, items, fetch, test === true, { wish, references });
|
|
62
65
|
return text(`${r.message}\n制作名: ${r.productions.join("、")}`);
|
|
63
66
|
}
|
|
64
67
|
catch (e) {
|