@orchyn/mcp 1.7.3 → 1.8.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/shared/tools-def.js +1 -1
- package/dist/shared/tools.js +12 -2
- package/package.json +1 -1
package/dist/shared/tools-def.js
CHANGED
|
@@ -57,7 +57,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
57
57
|
{
|
|
58
58
|
name: "understand_social_post",
|
|
59
59
|
title: "Understand Social Post",
|
|
60
|
-
description: "Import a social post URL AND understand it with multimodal AI over the actual video/images: summary, hook strength, viral triggers, format breakdown and variation ideas. Includes the thumbnail. Supports TikTok, Instagram, YouTube, X/Twitter, Douyin, Xiaohongshu and Bilibili. Consumes
|
|
60
|
+
description: "Import a social post URL AND understand it with multimodal AI over the actual video/images: summary, hook strength, viral triggers, format breakdown and variation ideas. Includes the thumbnail. Supports TikTok, Instagram, YouTube, X/Twitter, Douyin, Xiaohongshu and Bilibili. Consumes 6 orchyn credits. First use free per user.",
|
|
61
61
|
inputSchema: z.object({ url: z.string().describe("Full public post URL (TikTok/Instagram/YouTube/X/Douyin/Xiaohongshu/Bilibili)."), focus: z.string().optional().describe("Extra instruction, e.g. 'focus on the CTA'.") }).strict(),
|
|
62
62
|
},
|
|
63
63
|
{
|
package/dist/shared/tools.js
CHANGED
|
@@ -17,7 +17,17 @@ function toToolResult(proxy) {
|
|
|
17
17
|
data: String(c.data ?? ""),
|
|
18
18
|
mimeType: String(c.mimeType ?? "image/jpeg"),
|
|
19
19
|
}));
|
|
20
|
-
|
|
20
|
+
// The Rust backend embeds HTML cards directly in the text block
|
|
21
|
+
// (type:"text", text:"<div>...</div>\n\n{json}"). We extract the HTML
|
|
22
|
+
// prefix from the first text contentBlock and prepend it.
|
|
23
|
+
const textBlock = proxy.contentBlocks.find((c) => c.type === "text");
|
|
24
|
+
const rawText = textBlock ? String(textBlock.text ?? "") : "";
|
|
25
|
+
const htmlPrefix = rawText.startsWith("<")
|
|
26
|
+
? rawText.substring(0, rawText.indexOf("\n\n{")).trimEnd()
|
|
27
|
+
: "";
|
|
28
|
+
const structured = proxy.structured;
|
|
29
|
+
const textJson = JSON.stringify(structured ?? {}, null, 2);
|
|
30
|
+
const text = htmlPrefix ? `${htmlPrefix}\n\n${textJson}` : textJson;
|
|
21
31
|
return { content: [...images, { type: "text", text }] };
|
|
22
32
|
}
|
|
23
33
|
function toolError(prefix, err) {
|
|
@@ -277,7 +287,7 @@ export function createMcpServer(makeClient) {
|
|
|
277
287
|
title: "Understand Social Post",
|
|
278
288
|
description: "Import a social post URL AND understand it with multimodal AI over the actual video/images: " +
|
|
279
289
|
"summary, hook strength, viral triggers, format breakdown and variation ideas. Includes the thumbnail. " +
|
|
280
|
-
"Supports TikTok, Instagram, YouTube, X/Twitter, Douyin, Xiaohongshu and Bilibili. Consumes
|
|
290
|
+
"Supports TikTok, Instagram, YouTube, X/Twitter, Douyin, Xiaohongshu and Bilibili. Consumes 6 orchyn credits. First use free per user.",
|
|
281
291
|
inputSchema: z
|
|
282
292
|
.object({
|
|
283
293
|
url: z.string().describe("Full public post URL (TikTok/Instagram/YouTube/X/Douyin/Xiaohongshu/Bilibili)."),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchyn/mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "MCP server for orchyn - fetch, discover and understand TikTok/Instagram/YouTube/X posts with AI (media metadata, niche discovery, hook & viral analysis)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|