@flowdot.ai/mcp-server 1.0.1 → 1.0.2

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.
Files changed (106) hide show
  1. package/bin/flowdot-mcp.js +1 -1
  2. package/dist/api-client.d.ts +2 -557
  3. package/dist/api-client.d.ts.map +1 -1
  4. package/dist/api-client.js +2 -1264
  5. package/dist/api-client.js.map +1 -1
  6. package/dist/resources/index.d.ts +12 -0
  7. package/dist/resources/index.d.ts.map +1 -0
  8. package/dist/resources/index.js +2204 -0
  9. package/dist/resources/index.js.map +1 -0
  10. package/dist/server.d.ts.map +1 -1
  11. package/dist/server.js +11 -1
  12. package/dist/server.js.map +1 -1
  13. package/dist/tools/add-recipe-step.d.ts +23 -0
  14. package/dist/tools/add-recipe-step.d.ts.map +1 -0
  15. package/dist/tools/add-recipe-step.js +196 -0
  16. package/dist/tools/add-recipe-step.js.map +1 -0
  17. package/dist/tools/add-recipe-store.d.ts +19 -0
  18. package/dist/tools/add-recipe-store.d.ts.map +1 -0
  19. package/dist/tools/add-recipe-store.js +116 -0
  20. package/dist/tools/add-recipe-store.js.map +1 -0
  21. package/dist/tools/agent-toolkits.d.ts.map +1 -1
  22. package/dist/tools/agent-toolkits.js +8 -1
  23. package/dist/tools/agent-toolkits.js.map +1 -1
  24. package/dist/tools/browse-recipes.d.ts +16 -0
  25. package/dist/tools/browse-recipes.d.ts.map +1 -0
  26. package/dist/tools/browse-recipes.js +102 -0
  27. package/dist/tools/browse-recipes.js.map +1 -0
  28. package/dist/tools/create-recipe.d.ts +16 -0
  29. package/dist/tools/create-recipe.d.ts.map +1 -0
  30. package/dist/tools/create-recipe.js +92 -0
  31. package/dist/tools/create-recipe.js.map +1 -0
  32. package/dist/tools/delete-recipe-step.d.ts +14 -0
  33. package/dist/tools/delete-recipe-step.d.ts.map +1 -0
  34. package/dist/tools/delete-recipe-step.js +65 -0
  35. package/dist/tools/delete-recipe-step.js.map +1 -0
  36. package/dist/tools/delete-recipe-store.d.ts +14 -0
  37. package/dist/tools/delete-recipe-store.d.ts.map +1 -0
  38. package/dist/tools/delete-recipe-store.js +65 -0
  39. package/dist/tools/delete-recipe-store.js.map +1 -0
  40. package/dist/tools/delete-recipe.d.ts +13 -0
  41. package/dist/tools/delete-recipe.d.ts.map +1 -0
  42. package/dist/tools/delete-recipe.js +59 -0
  43. package/dist/tools/delete-recipe.js.map +1 -0
  44. package/dist/tools/favorite-recipe.d.ts +13 -0
  45. package/dist/tools/favorite-recipe.d.ts.map +1 -0
  46. package/dist/tools/favorite-recipe.js +53 -0
  47. package/dist/tools/favorite-recipe.js.map +1 -0
  48. package/dist/tools/fork-recipe.d.ts +13 -0
  49. package/dist/tools/fork-recipe.d.ts.map +1 -0
  50. package/dist/tools/fork-recipe.js +56 -0
  51. package/dist/tools/fork-recipe.js.map +1 -0
  52. package/dist/tools/get-recipe-definition.d.ts +15 -0
  53. package/dist/tools/get-recipe-definition.d.ts.map +1 -0
  54. package/dist/tools/get-recipe-definition.js +70 -0
  55. package/dist/tools/get-recipe-definition.js.map +1 -0
  56. package/dist/tools/get-recipe.d.ts +12 -0
  57. package/dist/tools/get-recipe.d.ts.map +1 -0
  58. package/dist/tools/get-recipe.js +88 -0
  59. package/dist/tools/get-recipe.js.map +1 -0
  60. package/dist/tools/index.d.ts.map +1 -1
  61. package/dist/tools/index.js +87 -0
  62. package/dist/tools/index.js.map +1 -1
  63. package/dist/tools/link-recipe.d.ts +14 -0
  64. package/dist/tools/link-recipe.d.ts.map +1 -0
  65. package/dist/tools/link-recipe.js +76 -0
  66. package/dist/tools/link-recipe.js.map +1 -0
  67. package/dist/tools/list-recipe-steps.d.ts +12 -0
  68. package/dist/tools/list-recipe-steps.d.ts.map +1 -0
  69. package/dist/tools/list-recipe-steps.js +69 -0
  70. package/dist/tools/list-recipe-steps.js.map +1 -0
  71. package/dist/tools/list-recipe-stores.d.ts +12 -0
  72. package/dist/tools/list-recipe-stores.d.ts.map +1 -0
  73. package/dist/tools/list-recipe-stores.js +87 -0
  74. package/dist/tools/list-recipe-stores.js.map +1 -0
  75. package/dist/tools/list-recipes.d.ts +12 -0
  76. package/dist/tools/list-recipes.d.ts.map +1 -0
  77. package/dist/tools/list-recipes.js +92 -0
  78. package/dist/tools/list-recipes.js.map +1 -0
  79. package/dist/tools/update-recipe-step.d.ts +22 -0
  80. package/dist/tools/update-recipe-step.d.ts.map +1 -0
  81. package/dist/tools/update-recipe-step.js +97 -0
  82. package/dist/tools/update-recipe-step.js.map +1 -0
  83. package/dist/tools/update-recipe-store.d.ts +20 -0
  84. package/dist/tools/update-recipe-store.d.ts.map +1 -0
  85. package/dist/tools/update-recipe-store.js +98 -0
  86. package/dist/tools/update-recipe-store.js.map +1 -0
  87. package/dist/tools/update-recipe.d.ts +18 -0
  88. package/dist/tools/update-recipe.d.ts.map +1 -0
  89. package/dist/tools/update-recipe.js +98 -0
  90. package/dist/tools/update-recipe.js.map +1 -0
  91. package/dist/tools/vote-recipe.d.ts +13 -0
  92. package/dist/tools/vote-recipe.d.ts.map +1 -0
  93. package/dist/tools/vote-recipe.js +54 -0
  94. package/dist/tools/vote-recipe.js.map +1 -0
  95. package/dist/types.d.ts +3 -1092
  96. package/dist/types.d.ts.map +1 -1
  97. package/dist/types.js +3 -1
  98. package/dist/types.js.map +1 -1
  99. package/dist/utils/script-validator.d.ts.map +1 -1
  100. package/dist/utils/script-validator.js +5 -1
  101. package/dist/utils/script-validator.js.map +1 -1
  102. package/package.json +11 -3
  103. package/dist/tools/convert-app-to-multifile.d.ts +0 -11
  104. package/dist/tools/convert-app-to-multifile.d.ts.map +0 -1
  105. package/dist/tools/convert-app-to-multifile.js +0 -69
  106. package/dist/tools/convert-app-to-multifile.js.map +0 -1
@@ -0,0 +1,20 @@
1
+ /**
2
+ * update_recipe_store MCP Tool
3
+ *
4
+ * Updates an existing store in a recipe.
5
+ */
6
+ import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
7
+ import { FlowDotApiClient } from '../api-client.js';
8
+ export declare const updateRecipeStoreTool: Tool;
9
+ export declare function handleUpdateRecipeStore(api: FlowDotApiClient, args: {
10
+ hash: string;
11
+ store_id: string;
12
+ key?: string;
13
+ label?: string;
14
+ schema_type?: 'any' | 'string' | 'number' | 'boolean' | 'array' | 'object';
15
+ default_value?: unknown;
16
+ description?: string;
17
+ is_input?: boolean;
18
+ is_output?: boolean;
19
+ }): Promise<CallToolResult>;
20
+ //# sourceMappingURL=update-recipe-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-recipe-store.d.ts","sourceRoot":"","sources":["../../src/tools/update-recipe-store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,eAAO,MAAM,qBAAqB,EAAE,IA6CnC,CAAC;AAEF,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IACJ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC3E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GACA,OAAO,CAAC,cAAc,CAAC,CAwCzB"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * update_recipe_store MCP Tool
3
+ *
4
+ * Updates an existing store in a recipe.
5
+ */
6
+ export const updateRecipeStoreTool = {
7
+ name: 'update_recipe_store',
8
+ description: "Update a store's key, label, type, default value, or input/output flags.",
9
+ inputSchema: {
10
+ type: 'object',
11
+ properties: {
12
+ hash: {
13
+ type: 'string',
14
+ description: 'The recipe hash/ID',
15
+ },
16
+ store_id: {
17
+ type: 'string',
18
+ description: 'The store ID to update',
19
+ },
20
+ key: {
21
+ type: 'string',
22
+ description: 'New key for the store',
23
+ },
24
+ label: {
25
+ type: 'string',
26
+ description: 'New label',
27
+ },
28
+ schema_type: {
29
+ type: 'string',
30
+ enum: ['any', 'string', 'number', 'boolean', 'array', 'object'],
31
+ description: 'New data type',
32
+ },
33
+ default_value: {
34
+ description: 'New default value',
35
+ },
36
+ description: {
37
+ type: 'string',
38
+ description: 'New description',
39
+ },
40
+ is_input: {
41
+ type: 'boolean',
42
+ description: 'Mark as input store',
43
+ },
44
+ is_output: {
45
+ type: 'boolean',
46
+ description: 'Mark as output store',
47
+ },
48
+ },
49
+ required: ['hash', 'store_id'],
50
+ },
51
+ };
52
+ export async function handleUpdateRecipeStore(api, args) {
53
+ try {
54
+ const input = {};
55
+ if (args.key !== undefined)
56
+ input.key = args.key;
57
+ if (args.label !== undefined)
58
+ input.label = args.label;
59
+ if (args.schema_type !== undefined)
60
+ input.schema_type = args.schema_type;
61
+ if (args.default_value !== undefined)
62
+ input.default_value = args.default_value;
63
+ if (args.description !== undefined)
64
+ input.description = args.description;
65
+ if (args.is_input !== undefined)
66
+ input.is_input = args.is_input;
67
+ if (args.is_output !== undefined)
68
+ input.is_output = args.is_output;
69
+ const store = await api.updateRecipeStore(args.hash, args.store_id, input);
70
+ const storeType = store.is_input ? 'Input' : store.is_output ? 'Output' : 'Internal';
71
+ return {
72
+ content: [
73
+ {
74
+ type: 'text',
75
+ text: `Store updated successfully!
76
+
77
+ **Key:** ${store.key}
78
+ **Type:** ${storeType} (${store.schema_type})
79
+ **ID:** ${store.id}
80
+ **Default Value:** ${store.default_value !== undefined ? JSON.stringify(store.default_value) : 'None'}`,
81
+ },
82
+ ],
83
+ };
84
+ }
85
+ catch (error) {
86
+ const message = error instanceof Error ? error.message : 'Unknown error';
87
+ return {
88
+ content: [
89
+ {
90
+ type: 'text',
91
+ text: `Error updating store: ${message}`,
92
+ },
93
+ ],
94
+ isError: true,
95
+ };
96
+ }
97
+ }
98
+ //# sourceMappingURL=update-recipe-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-recipe-store.js","sourceRoot":"","sources":["../../src/tools/update-recipe-store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,CAAC,MAAM,qBAAqB,GAAS;IACzC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,0EAA0E;IACvF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oBAAoB;aAClC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wBAAwB;aACtC;YACD,GAAG,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uBAAuB;aACrC;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,WAAW;aACzB;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC;gBAC/D,WAAW,EAAE,eAAe;aAC7B;YACD,aAAa,EAAE;gBACb,WAAW,EAAE,mBAAmB;aACjC;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iBAAiB;aAC/B;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,qBAAqB;aACnC;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,sBAAsB;aACpC;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,EAAE,U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AAK,CAAC,WAAW;UACjC,KAAK,CAAC,EAAE;qBACG,KAAK,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE;iBAC9F;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;QACzE,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,yBAAyB,OAAO,EAAE;iBACzC;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * update_recipe MCP Tool
3
+ *
4
+ * Updates an existing agent recipe's metadata.
5
+ */
6
+ import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
7
+ import { FlowDotApiClient } from '../api-client.js';
8
+ export declare const updateRecipeTool: Tool;
9
+ export declare function handleUpdateRecipe(api: FlowDotApiClient, args: {
10
+ hash: string;
11
+ name?: string;
12
+ description?: string;
13
+ category?: string;
14
+ tags?: string[];
15
+ visibility?: 'private' | 'public' | 'unlisted';
16
+ entry_step_id?: string;
17
+ }): Promise<CallToolResult>;
18
+ //# sourceMappingURL=update-recipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-recipe.d.ts","sourceRoot":"","sources":["../../src/tools/update-recipe.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,eAAO,MAAM,gBAAgB,EAAE,IAgD9B,CAAC;AAEF,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IACJ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC/C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GACA,OAAO,CAAC,cAAc,CAAC,CAqCzB"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * update_recipe MCP Tool
3
+ *
4
+ * Updates an existing agent recipe's metadata.
5
+ */
6
+ export const updateRecipeTool = {
7
+ name: 'update_recipe',
8
+ description: `Update an agent recipe's metadata, including the critical entry_step_id.
9
+
10
+ **CRITICAL - entry_step_id:**
11
+ Recipe will NOT run until entry_step_id is set to a valid step ID!
12
+ After adding steps, you MUST call this tool with entry_step_id pointing to the first step.
13
+
14
+ **Example:**
15
+ \`\`\`
16
+ update_recipe({ hash: "abc", entry_step_id: "first-step-uuid" })
17
+ \`\`\``,
18
+ inputSchema: {
19
+ type: 'object',
20
+ properties: {
21
+ hash: {
22
+ type: 'string',
23
+ description: 'The recipe hash/ID to update',
24
+ },
25
+ name: {
26
+ type: 'string',
27
+ description: 'New name for the recipe',
28
+ },
29
+ description: {
30
+ type: 'string',
31
+ description: 'New description',
32
+ },
33
+ category: {
34
+ type: 'string',
35
+ description: 'New category',
36
+ },
37
+ tags: {
38
+ type: 'array',
39
+ items: { type: 'string' },
40
+ description: 'New tags (replaces existing)',
41
+ },
42
+ visibility: {
43
+ type: 'string',
44
+ enum: ['private', 'public', 'unlisted'],
45
+ description: 'New visibility setting',
46
+ },
47
+ entry_step_id: {
48
+ type: 'string',
49
+ description: 'Set the entry step ID',
50
+ },
51
+ },
52
+ required: ['hash'],
53
+ },
54
+ };
55
+ export async function handleUpdateRecipe(api, args) {
56
+ try {
57
+ const input = {};
58
+ if (args.name !== undefined)
59
+ input.name = args.name;
60
+ if (args.description !== undefined)
61
+ input.description = args.description;
62
+ if (args.category !== undefined)
63
+ input.category = args.category;
64
+ if (args.tags !== undefined)
65
+ input.tags = args.tags;
66
+ if (args.visibility !== undefined)
67
+ input.visibility = args.visibility;
68
+ if (args.entry_step_id !== undefined)
69
+ input.entry_step_id = args.entry_step_id;
70
+ const recipe = await api.updateRecipe(args.hash, input);
71
+ return {
72
+ content: [
73
+ {
74
+ type: 'text',
75
+ text: `Recipe updated successfully!
76
+
77
+ **Name:** ${recipe.name}
78
+ **Hash:** ${recipe.hash}
79
+ **Visibility:** ${recipe.visibility}
80
+ **Entry Step:** ${recipe.entry_step_id || 'Not set'}`,
81
+ },
82
+ ],
83
+ };
84
+ }
85
+ catch (error) {
86
+ const message = error instanceof Error ? error.message : 'Unknown error';
87
+ return {
88
+ content: [
89
+ {
90
+ type: 'text',
91
+ text: `Error updating recipe: ${message}`,
92
+ },
93
+ ],
94
+ isError: true,
95
+ };
96
+ }
97
+ }
98
+ //# sourceMappingURL=update-recipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-recipe.js","sourceRoot":"","sources":["../../src/tools/update-recipe.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,CAAC,MAAM,gBAAgB,GAAS;IACpC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE;;;;;;;;;OASR;IACL,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8BAA8B;aAC5C;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yBAAyB;aACvC;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iBAAiB;aAC/B;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,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,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;;YAEJ,MAAM,CAAC,IAAI;YACX,MAAM,CAAC,IAAI;kBACL,MAAM,CAAC,UAAU;kBACjB,MAAM,CAAC,aAAa,IAAI,SAAS,EAAE;iBAC5C;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;QACzE,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,0BAA0B,OAAO,EAAE;iBAC1C;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * vote_recipe MCP Tool
3
+ *
4
+ * Vote on a recipe (upvote, downvote, or remove vote).
5
+ */
6
+ import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
7
+ import { FlowDotApiClient } from '../api-client.js';
8
+ export declare const voteRecipeTool: Tool;
9
+ export declare function handleVoteRecipe(api: FlowDotApiClient, args: {
10
+ hash: string;
11
+ vote: 'up' | 'down' | 'remove';
12
+ }): Promise<CallToolResult>;
13
+ //# sourceMappingURL=vote-recipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vote-recipe.d.ts","sourceRoot":"","sources":["../../src/tools/vote-recipe.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,eAAO,MAAM,cAAc,EAAE,IAkB5B,CAAC;AAEF,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAA;CAAE,GACrD,OAAO,CAAC,cAAc,CAAC,CA6BzB"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * vote_recipe MCP Tool
3
+ *
4
+ * Vote on a recipe (upvote, downvote, or remove vote).
5
+ */
6
+ export const voteRecipeTool = {
7
+ name: 'vote_recipe',
8
+ description: 'Vote on a recipe (upvote, downvote, or remove your vote). Only works on public recipes.',
9
+ inputSchema: {
10
+ type: 'object',
11
+ properties: {
12
+ hash: {
13
+ type: 'string',
14
+ description: 'The recipe hash/ID',
15
+ },
16
+ vote: {
17
+ type: 'string',
18
+ enum: ['up', 'down', 'remove'],
19
+ description: 'Vote action: "up" for upvote, "down" for downvote, "remove" to remove your vote',
20
+ },
21
+ },
22
+ required: ['hash', 'vote'],
23
+ },
24
+ };
25
+ export async function handleVoteRecipe(api, args) {
26
+ try {
27
+ const result = await api.voteRecipe(args.hash, args.vote);
28
+ const voteEmoji = args.vote === 'up' ? '👍' : args.vote === 'down' ? '👎' : '🔄';
29
+ const voteAction = args.vote === 'remove' ? 'removed' : `added ${args.vote}vote`;
30
+ return {
31
+ content: [
32
+ {
33
+ type: 'text',
34
+ text: `${voteEmoji} Vote ${voteAction}!
35
+
36
+ **Recipe Score:** ${result.vote_count}`,
37
+ },
38
+ ],
39
+ };
40
+ }
41
+ catch (error) {
42
+ const message = error instanceof Error ? error.message : 'Unknown error';
43
+ return {
44
+ content: [
45
+ {
46
+ type: 'text',
47
+ text: `Error voting: ${message}`,
48
+ },
49
+ ],
50
+ isError: true,
51
+ };
52
+ }
53
+ }
54
+ //# sourceMappingURL=vote-recipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vote-recipe.js","sourceRoot":"","sources":["../../src/tools/vote-recipe.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,CAAC,MAAM,cAAc,GAAS;IAClC,IAAI,EAAE,aAAa;IACnB,WAAW,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