@flowdot.ai/mcp-server 1.0.0 → 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 (231) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +162 -162
  3. package/bin/flowdot-mcp.js +15 -15
  4. package/dist/api-client.d.ts +2 -344
  5. package/dist/api-client.d.ts.map +1 -1
  6. package/dist/api-client.js +2 -784
  7. package/dist/api-client.js.map +1 -1
  8. package/dist/resources/index.d.ts +12 -0
  9. package/dist/resources/index.d.ts.map +1 -0
  10. package/dist/resources/index.js +2204 -0
  11. package/dist/resources/index.js.map +1 -0
  12. package/dist/server.d.ts.map +1 -1
  13. package/dist/server.js +19 -10
  14. package/dist/server.js.map +1 -1
  15. package/dist/tools/add-recipe-step.d.ts +23 -0
  16. package/dist/tools/add-recipe-step.d.ts.map +1 -0
  17. package/dist/tools/add-recipe-step.js +196 -0
  18. package/dist/tools/add-recipe-step.js.map +1 -0
  19. package/dist/tools/add-recipe-store.d.ts +19 -0
  20. package/dist/tools/add-recipe-store.d.ts.map +1 -0
  21. package/dist/tools/add-recipe-store.js +116 -0
  22. package/dist/tools/add-recipe-store.js.map +1 -0
  23. package/dist/tools/agent-toolkits.d.ts +57 -0
  24. package/dist/tools/agent-toolkits.d.ts.map +1 -0
  25. package/dist/tools/agent-toolkits.js +1712 -0
  26. package/dist/tools/agent-toolkits.js.map +1 -0
  27. package/dist/tools/append-app-code.d.ts +12 -0
  28. package/dist/tools/append-app-code.d.ts.map +1 -0
  29. package/dist/tools/append-app-code.js +83 -0
  30. package/dist/tools/append-app-code.js.map +1 -0
  31. package/dist/tools/browse-recipes.d.ts +16 -0
  32. package/dist/tools/browse-recipes.d.ts.map +1 -0
  33. package/dist/tools/browse-recipes.js +102 -0
  34. package/dist/tools/browse-recipes.js.map +1 -0
  35. package/dist/tools/clone-app.js +20 -20
  36. package/dist/tools/create-app-file.d.ts +11 -0
  37. package/dist/tools/create-app-file.d.ts.map +1 -0
  38. package/dist/tools/create-app-file.js +83 -0
  39. package/dist/tools/create-app-file.js.map +1 -0
  40. package/dist/tools/create-app.d.ts.map +1 -1
  41. package/dist/tools/create-app.js +47 -29
  42. package/dist/tools/create-app.js.map +1 -1
  43. package/dist/tools/create-knowledge-category.d.ts +16 -0
  44. package/dist/tools/create-knowledge-category.d.ts.map +1 -0
  45. package/dist/tools/create-knowledge-category.js +71 -0
  46. package/dist/tools/create-knowledge-category.js.map +1 -0
  47. package/dist/tools/create-recipe.d.ts +16 -0
  48. package/dist/tools/create-recipe.d.ts.map +1 -0
  49. package/dist/tools/create-recipe.js +92 -0
  50. package/dist/tools/create-recipe.js.map +1 -0
  51. package/dist/tools/delete-app-file.d.ts +11 -0
  52. package/dist/tools/delete-app-file.d.ts.map +1 -0
  53. package/dist/tools/delete-app-file.js +52 -0
  54. package/dist/tools/delete-app-file.js.map +1 -0
  55. package/dist/tools/delete-app.js +3 -3
  56. package/dist/tools/delete-knowledge-category.d.ts +12 -0
  57. package/dist/tools/delete-knowledge-category.d.ts.map +1 -0
  58. package/dist/tools/delete-knowledge-category.js +40 -0
  59. package/dist/tools/delete-knowledge-category.js.map +1 -0
  60. package/dist/tools/delete-knowledge-document.d.ts +12 -0
  61. package/dist/tools/delete-knowledge-document.d.ts.map +1 -0
  62. package/dist/tools/delete-knowledge-document.js +40 -0
  63. package/dist/tools/delete-knowledge-document.js.map +1 -0
  64. package/dist/tools/delete-recipe-step.d.ts +14 -0
  65. package/dist/tools/delete-recipe-step.d.ts.map +1 -0
  66. package/dist/tools/delete-recipe-step.js +65 -0
  67. package/dist/tools/delete-recipe-step.js.map +1 -0
  68. package/dist/tools/delete-recipe-store.d.ts +14 -0
  69. package/dist/tools/delete-recipe-store.d.ts.map +1 -0
  70. package/dist/tools/delete-recipe-store.js +65 -0
  71. package/dist/tools/delete-recipe-store.js.map +1 -0
  72. package/dist/tools/delete-recipe.d.ts +13 -0
  73. package/dist/tools/delete-recipe.d.ts.map +1 -0
  74. package/dist/tools/delete-recipe.js +59 -0
  75. package/dist/tools/delete-recipe.js.map +1 -0
  76. package/dist/tools/edit-app-code.d.ts +12 -0
  77. package/dist/tools/edit-app-code.d.ts.map +1 -0
  78. package/dist/tools/edit-app-code.js +110 -0
  79. package/dist/tools/edit-app-code.js.map +1 -0
  80. package/dist/tools/favorite-recipe.d.ts +13 -0
  81. package/dist/tools/favorite-recipe.d.ts.map +1 -0
  82. package/dist/tools/favorite-recipe.js +53 -0
  83. package/dist/tools/favorite-recipe.js.map +1 -0
  84. package/dist/tools/fork-recipe.d.ts +13 -0
  85. package/dist/tools/fork-recipe.d.ts.map +1 -0
  86. package/dist/tools/fork-recipe.js +56 -0
  87. package/dist/tools/fork-recipe.js.map +1 -0
  88. package/dist/tools/get-app-file.d.ts +11 -0
  89. package/dist/tools/get-app-file.d.ts.map +1 -0
  90. package/dist/tools/get-app-file.js +76 -0
  91. package/dist/tools/get-app-file.js.map +1 -0
  92. package/dist/tools/get-app-template.d.ts.map +1 -1
  93. package/dist/tools/get-app-template.js +65 -21
  94. package/dist/tools/get-app-template.js.map +1 -1
  95. package/dist/tools/get-app.js +54 -54
  96. package/dist/tools/get-knowledge-document.d.ts +12 -0
  97. package/dist/tools/get-knowledge-document.d.ts.map +1 -0
  98. package/dist/tools/get-knowledge-document.js +71 -0
  99. package/dist/tools/get-knowledge-document.js.map +1 -0
  100. package/dist/tools/get-knowledge-storage.d.ts +10 -0
  101. package/dist/tools/get-knowledge-storage.d.ts.map +1 -0
  102. package/dist/tools/get-knowledge-storage.js +54 -0
  103. package/dist/tools/get-knowledge-storage.js.map +1 -0
  104. package/dist/tools/get-recipe-definition.d.ts +15 -0
  105. package/dist/tools/get-recipe-definition.d.ts.map +1 -0
  106. package/dist/tools/get-recipe-definition.js +70 -0
  107. package/dist/tools/get-recipe-definition.js.map +1 -0
  108. package/dist/tools/get-recipe.d.ts +12 -0
  109. package/dist/tools/get-recipe.d.ts.map +1 -0
  110. package/dist/tools/get-recipe.js +88 -0
  111. package/dist/tools/get-recipe.js.map +1 -0
  112. package/dist/tools/index.d.ts.map +1 -1
  113. package/dist/tools/index.js +301 -1
  114. package/dist/tools/index.js.map +1 -1
  115. package/dist/tools/insert-app-code.d.ts +12 -0
  116. package/dist/tools/insert-app-code.d.ts.map +1 -0
  117. package/dist/tools/insert-app-code.js +97 -0
  118. package/dist/tools/insert-app-code.js.map +1 -0
  119. package/dist/tools/link-app-workflow.js +21 -21
  120. package/dist/tools/link-recipe.d.ts +14 -0
  121. package/dist/tools/link-recipe.d.ts.map +1 -0
  122. package/dist/tools/link-recipe.js +76 -0
  123. package/dist/tools/link-recipe.js.map +1 -0
  124. package/dist/tools/list-app-files.d.ts +11 -0
  125. package/dist/tools/list-app-files.d.ts.map +1 -0
  126. package/dist/tools/list-app-files.js +84 -0
  127. package/dist/tools/list-app-files.js.map +1 -0
  128. package/dist/tools/list-apps.js +8 -8
  129. package/dist/tools/list-knowledge-categories.d.ts +14 -0
  130. package/dist/tools/list-knowledge-categories.d.ts.map +1 -0
  131. package/dist/tools/list-knowledge-categories.js +107 -0
  132. package/dist/tools/list-knowledge-categories.js.map +1 -0
  133. package/dist/tools/list-knowledge-documents.d.ts +15 -0
  134. package/dist/tools/list-knowledge-documents.d.ts.map +1 -0
  135. package/dist/tools/list-knowledge-documents.js +129 -0
  136. package/dist/tools/list-knowledge-documents.js.map +1 -0
  137. package/dist/tools/list-recipe-steps.d.ts +12 -0
  138. package/dist/tools/list-recipe-steps.d.ts.map +1 -0
  139. package/dist/tools/list-recipe-steps.js +69 -0
  140. package/dist/tools/list-recipe-steps.js.map +1 -0
  141. package/dist/tools/list-recipe-stores.d.ts +12 -0
  142. package/dist/tools/list-recipe-stores.d.ts.map +1 -0
  143. package/dist/tools/list-recipe-stores.js +87 -0
  144. package/dist/tools/list-recipe-stores.js.map +1 -0
  145. package/dist/tools/list-recipes.d.ts +12 -0
  146. package/dist/tools/list-recipes.d.ts.map +1 -0
  147. package/dist/tools/list-recipes.js +92 -0
  148. package/dist/tools/list-recipes.js.map +1 -0
  149. package/dist/tools/list-user-teams.d.ts +11 -0
  150. package/dist/tools/list-user-teams.d.ts.map +1 -0
  151. package/dist/tools/list-user-teams.js +56 -0
  152. package/dist/tools/list-user-teams.js.map +1 -0
  153. package/dist/tools/move-document-to-category.d.ts +13 -0
  154. package/dist/tools/move-document-to-category.d.ts.map +1 -0
  155. package/dist/tools/move-document-to-category.js +42 -0
  156. package/dist/tools/move-document-to-category.js.map +1 -0
  157. package/dist/tools/prepend-app-code.d.ts +12 -0
  158. package/dist/tools/prepend-app-code.d.ts.map +1 -0
  159. package/dist/tools/prepend-app-code.js +79 -0
  160. package/dist/tools/prepend-app-code.js.map +1 -0
  161. package/dist/tools/publish-app.js +7 -7
  162. package/dist/tools/query-knowledge-base.d.ts +18 -0
  163. package/dist/tools/query-knowledge-base.d.ts.map +1 -0
  164. package/dist/tools/query-knowledge-base.js +144 -0
  165. package/dist/tools/query-knowledge-base.js.map +1 -0
  166. package/dist/tools/rename-app-file.d.ts +11 -0
  167. package/dist/tools/rename-app-file.d.ts.map +1 -0
  168. package/dist/tools/rename-app-file.js +64 -0
  169. package/dist/tools/rename-app-file.js.map +1 -0
  170. package/dist/tools/reprocess-document.d.ts +12 -0
  171. package/dist/tools/reprocess-document.d.ts.map +1 -0
  172. package/dist/tools/reprocess-document.js +40 -0
  173. package/dist/tools/reprocess-document.js.map +1 -0
  174. package/dist/tools/search-apps.js +13 -13
  175. package/dist/tools/search.d.ts +14 -0
  176. package/dist/tools/search.d.ts.map +1 -0
  177. package/dist/tools/search.js +86 -0
  178. package/dist/tools/search.js.map +1 -0
  179. package/dist/tools/set-app-entry-file.d.ts +11 -0
  180. package/dist/tools/set-app-entry-file.d.ts.map +1 -0
  181. package/dist/tools/set-app-entry-file.js +56 -0
  182. package/dist/tools/set-app-entry-file.js.map +1 -0
  183. package/dist/tools/transfer-document-ownership.d.ts +15 -0
  184. package/dist/tools/transfer-document-ownership.d.ts.map +1 -0
  185. package/dist/tools/transfer-document-ownership.js +66 -0
  186. package/dist/tools/transfer-document-ownership.js.map +1 -0
  187. package/dist/tools/unlink-app-workflow.js +2 -2
  188. package/dist/tools/unpublish-app.js +2 -2
  189. package/dist/tools/update-app-file.d.ts +11 -0
  190. package/dist/tools/update-app-file.d.ts.map +1 -0
  191. package/dist/tools/update-app-file.js +73 -0
  192. package/dist/tools/update-app-file.js.map +1 -0
  193. package/dist/tools/update-app.d.ts.map +1 -1
  194. package/dist/tools/update-app.js +8 -1
  195. package/dist/tools/update-app.js.map +1 -1
  196. package/dist/tools/update-knowledge-category.d.ts +15 -0
  197. package/dist/tools/update-knowledge-category.d.ts.map +1 -0
  198. package/dist/tools/update-knowledge-category.js +74 -0
  199. package/dist/tools/update-knowledge-category.js.map +1 -0
  200. package/dist/tools/update-recipe-step.d.ts +22 -0
  201. package/dist/tools/update-recipe-step.d.ts.map +1 -0
  202. package/dist/tools/update-recipe-step.js +97 -0
  203. package/dist/tools/update-recipe-step.js.map +1 -0
  204. package/dist/tools/update-recipe-store.d.ts +20 -0
  205. package/dist/tools/update-recipe-store.d.ts.map +1 -0
  206. package/dist/tools/update-recipe-store.js +98 -0
  207. package/dist/tools/update-recipe-store.js.map +1 -0
  208. package/dist/tools/update-recipe.d.ts +18 -0
  209. package/dist/tools/update-recipe.d.ts.map +1 -0
  210. package/dist/tools/update-recipe.js +98 -0
  211. package/dist/tools/update-recipe.js.map +1 -0
  212. package/dist/tools/upload-document-from-url.d.ts +16 -0
  213. package/dist/tools/upload-document-from-url.d.ts.map +1 -0
  214. package/dist/tools/upload-document-from-url.js +73 -0
  215. package/dist/tools/upload-document-from-url.js.map +1 -0
  216. package/dist/tools/upload-text-document.d.ts +17 -0
  217. package/dist/tools/upload-text-document.d.ts.map +1 -0
  218. package/dist/tools/upload-text-document.js +77 -0
  219. package/dist/tools/upload-text-document.js.map +1 -0
  220. package/dist/tools/vote-recipe.d.ts +13 -0
  221. package/dist/tools/vote-recipe.d.ts.map +1 -0
  222. package/dist/tools/vote-recipe.js +54 -0
  223. package/dist/tools/vote-recipe.js.map +1 -0
  224. package/dist/types.d.ts +3 -666
  225. package/dist/types.d.ts.map +1 -1
  226. package/dist/types.js +3 -1
  227. package/dist/types.js.map +1 -1
  228. package/dist/utils/script-validator.d.ts.map +1 -1
  229. package/dist/utils/script-validator.js +5 -1
  230. package/dist/utils/script-validator.js.map +1 -1
  231. package/package.json +62 -54
@@ -0,0 +1,56 @@
1
+ /**
2
+ * set_app_entry_file Tool
3
+ *
4
+ * Set a file as the entry point for a multi-file FlowDot app.
5
+ * Required scope: apps:manage
6
+ */
7
+ export const setAppEntryFileTool = {
8
+ name: 'set_app_entry_file',
9
+ description: `Set a file as the entry point for a multi-file FlowDot app.
10
+
11
+ The entry point is the main file that gets rendered when the app loads. Only one file can be the entry point at a time.
12
+
13
+ When you set a new entry point:
14
+ - The specified file becomes the entry point
15
+ - Any previous entry point is automatically unset
16
+
17
+ Use list_app_files to see which file is currently the entry point.`,
18
+ inputSchema: {
19
+ type: 'object',
20
+ properties: {
21
+ app_id: {
22
+ type: 'string',
23
+ description: 'The app ID (hash)',
24
+ },
25
+ file_path: {
26
+ type: 'string',
27
+ description: 'The file path to set as entry point (e.g., "App.jsx")',
28
+ },
29
+ },
30
+ required: ['app_id', 'file_path'],
31
+ },
32
+ };
33
+ export async function handleSetAppEntryFile(client, args) {
34
+ try {
35
+ const appId = String(args.app_id);
36
+ const filePath = String(args.file_path);
37
+ const result = await client.setAppEntryFile(appId, filePath);
38
+ const text = `# Entry Point Set Successfully
39
+
40
+ **File:** ${result.path}
41
+ **App:** ${appId}
42
+
43
+ This file is now the entry point for the app. When the app loads, this file's main component will be rendered.`;
44
+ return {
45
+ content: [{ type: 'text', text }],
46
+ };
47
+ }
48
+ catch (error) {
49
+ const message = error instanceof Error ? error.message : 'Unknown error';
50
+ return {
51
+ content: [{ type: 'text', text: `Error setting entry point: ${message}` }],
52
+ isError: true,
53
+ };
54
+ }
55
+ }
56
+ //# sourceMappingURL=set-app-entry-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-app-entry-file.js","sourceRoot":"","sources":["../../src/tools/set-app-entry-file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,CAAC,MAAM,mBAAmB,GAAS;IACvC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE;;;;;;;;mEAQoD;IACjE,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mBAAmB;aACjC;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uDAAuD;aACrE;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC;KAClC;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,MAAwB,EACxB,IAA6B;IAE7B,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAExC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAE7D,MAAM,IAAI,GAAG;;YAEL,MAAM,CAAC,IAAI;WACZ,KAAK;;+GAE+F,CAAC;QAE5G,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;SAClC,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,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,8BAA8B,OAAO,EAAE,EAAE,CAAC;YAC1E,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Transfer Document Ownership Tool
3
+ *
4
+ * Transfers a document between personal and team knowledge bases.
5
+ * Can also optionally change the category during transfer.
6
+ */
7
+ import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
8
+ import { FlowDotApiClient } from '../api-client.js';
9
+ export declare const transferDocumentOwnershipToolDef: Tool;
10
+ export declare function handleTransferDocumentOwnership(api: FlowDotApiClient, args: {
11
+ document_id: number;
12
+ team_id?: number | null;
13
+ category_id?: number | null;
14
+ }): Promise<CallToolResult>;
15
+ //# sourceMappingURL=transfer-document-ownership.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer-document-ownership.d.ts","sourceRoot":"","sources":["../../src/tools/transfer-document-ownership.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,eAAO,MAAM,gCAAgC,EAAE,IAwB9C,CAAC;AAEF,wBAAsB,+BAA+B,CACnD,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IACJ,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,GACA,OAAO,CAAC,cAAc,CAAC,CAqCzB"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Transfer Document Ownership Tool
3
+ *
4
+ * Transfers a document between personal and team knowledge bases.
5
+ * Can also optionally change the category during transfer.
6
+ */
7
+ export const transferDocumentOwnershipToolDef = {
8
+ name: 'transfer_document_ownership',
9
+ description: 'Transfer a document between your personal knowledge base and a team knowledge base. You can also optionally assign a category in the target scope during transfer.',
10
+ inputSchema: {
11
+ type: 'object',
12
+ properties: {
13
+ document_id: {
14
+ type: 'number',
15
+ description: 'The document ID to transfer',
16
+ },
17
+ team_id: {
18
+ type: ['number', 'null'],
19
+ description: 'Target team ID to transfer to, or null/omit to transfer to personal. Use list_user_teams to see available teams.',
20
+ },
21
+ category_id: {
22
+ type: ['number', 'null'],
23
+ description: 'Optional category ID in the target scope. Must belong to the target team (or personal if transferring to personal). Set to null to remove category.',
24
+ },
25
+ },
26
+ required: ['document_id'],
27
+ },
28
+ };
29
+ export async function handleTransferDocumentOwnership(api, args) {
30
+ try {
31
+ const result = await api.transferDocumentOwnership(args.document_id, {
32
+ team_id: args.team_id,
33
+ category_id: args.category_id,
34
+ });
35
+ const lines = ['## Document Transferred Successfully', ''];
36
+ lines.push(result.message);
37
+ lines.push('');
38
+ lines.push('### Document Details');
39
+ lines.push(`- **ID:** ${result.document.id}`);
40
+ lines.push(`- **Hash:** ${result.document.hash}`);
41
+ lines.push(`- **Title:** ${result.document.title}`);
42
+ if (result.document.team_id) {
43
+ lines.push(`- **Team:** ${result.document.team_name} (ID: ${result.document.team_id})`);
44
+ }
45
+ else {
46
+ lines.push(`- **Location:** Personal knowledge base`);
47
+ }
48
+ if (result.document.category_id) {
49
+ lines.push(`- **Category ID:** ${result.document.category_id}`);
50
+ }
51
+ else {
52
+ lines.push(`- **Category:** Uncategorized`);
53
+ }
54
+ return {
55
+ content: [{ type: 'text', text: lines.join('\n') }],
56
+ };
57
+ }
58
+ catch (error) {
59
+ const message = error instanceof Error ? error.message : 'Unknown error';
60
+ return {
61
+ content: [{ type: 'text', text: `Error transferring document: ${message}` }],
62
+ isError: true,
63
+ };
64
+ }
65
+ }
66
+ //# sourceMappingURL=transfer-document-ownership.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer-document-ownership.js","sourceRoot":"","sources":["../../src/tools/transfer-document-ownership.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MA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C,QAAQ,CAAC,OAAO,EAAE,CAAC;YAC5B,KAAK,CAAC,IAAI,CAAC,eAAe,MAAM,CAAC,QAAQ,CAAC,SAAS,SAAS,MAAM,CAAC,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC;QAC1F,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;QACxD,CAAC;QAED,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,sBAAsB,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;QAClE,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QAC9C,CAAC;QAED,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;SACpD,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,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gCAAgC,OAAO,EAAE,EAAE,CAAC;YAC5E,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -6,8 +6,8 @@
6
6
  */
7
7
  export const unlinkAppWorkflowTool = {
8
8
  name: 'unlink_app_workflow',
9
- description: `Unlink a workflow from an app. After unlinking, the app will no longer be able to invoke that workflow.
10
-
9
+ description: `Unlink a workflow from an app. After unlinking, the app will no longer be able to invoke that workflow.
10
+
11
11
  Make sure to update your app code to remove any references to the unlinked workflow.`,
12
12
  inputSchema: {
13
13
  type: 'object',
@@ -6,8 +6,8 @@
6
6
  */
7
7
  export const unpublishAppTool = {
8
8
  name: 'unpublish_app',
9
- description: `Unpublish an app to make it private. The app will no longer be visible in the public marketplace.
10
-
9
+ description: `Unpublish an app to make it private. The app will no longer be visible in the public marketplace.
10
+
11
11
  Existing clones of your app will continue to work for their owners, but new users won't be able to discover or clone it.`,
12
12
  inputSchema: {
13
13
  type: 'object',
@@ -0,0 +1,11 @@
1
+ /**
2
+ * update_app_file Tool
3
+ *
4
+ * Update an existing file in a multi-file FlowDot app.
5
+ * Required scope: apps:manage
6
+ */
7
+ import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
8
+ import { FlowDotApiClient } from '../api-client.js';
9
+ export declare const updateAppFileTool: Tool;
10
+ export declare function handleUpdateAppFile(client: FlowDotApiClient, args: Record<string, unknown>): Promise<CallToolResult>;
11
+ //# sourceMappingURL=update-app-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-app-file.d.ts","sourceRoot":"","sources":["../../src/tools/update-app-file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,eAAO,MAAM,iBAAiB,EAAE,IAkC/B,CAAC;AAEF,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,cAAc,CAAC,CAiCzB"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * update_app_file Tool
3
+ *
4
+ * Update an existing file in a multi-file FlowDot app.
5
+ * Required scope: apps:manage
6
+ */
7
+ export const updateAppFileTool = {
8
+ name: 'update_app_file',
9
+ description: `Update the content of an existing file in a FlowDot app.
10
+
11
+ Updates the file's content and optionally its type. Use this for making changes to existing files.
12
+
13
+ For surgical edits (find/replace), consider using edit_app_code instead.
14
+
15
+ File constraints:
16
+ - Max file size: 100KB per file
17
+ - Max total app size: 512KB across all files`,
18
+ inputSchema: {
19
+ type: 'object',
20
+ properties: {
21
+ app_id: {
22
+ type: 'string',
23
+ description: 'The app ID (hash)',
24
+ },
25
+ file_path: {
26
+ type: 'string',
27
+ description: 'The file path to update (e.g., "App.jsx", "components/Button.jsx")',
28
+ },
29
+ content: {
30
+ type: 'string',
31
+ description: 'The new file content',
32
+ },
33
+ type: {
34
+ type: 'string',
35
+ enum: ['component', 'hook', 'utility', 'page', 'context', 'style'],
36
+ description: 'The file type (optional)',
37
+ },
38
+ },
39
+ required: ['app_id', 'file_path', 'content'],
40
+ },
41
+ };
42
+ export async function handleUpdateAppFile(client, args) {
43
+ try {
44
+ const appId = String(args.app_id);
45
+ const filePath = String(args.file_path);
46
+ const input = {
47
+ content: String(args.content),
48
+ };
49
+ if (args.type) {
50
+ input.type = args.type;
51
+ }
52
+ const result = await client.updateAppFile(appId, filePath, input);
53
+ const text = `# File Updated Successfully
54
+
55
+ **Path:** ${result.path}
56
+ **Type:** ${result.type}
57
+ **Entry Point:** ${result.is_entry ? 'Yes' : 'No'}
58
+ **Updated:** ${result.updated_at}
59
+
60
+ The file has been updated in app ${appId}.`;
61
+ return {
62
+ content: [{ type: 'text', text }],
63
+ };
64
+ }
65
+ catch (error) {
66
+ const message = error instanceof Error ? error.message : 'Unknown error';
67
+ return {
68
+ content: [{ type: 'text', text: `Error updating app file: ${message}` }],
69
+ isError: true,
70
+ };
71
+ }
72
+ }
73
+ //# sourceMappingURL=update-app-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-app-file.js","sourceRoot":"","sources":["../../src/tools/update-app-file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,CAAC,MAAM,iBAAiB,GAAS;IACrC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE;;;;;;;;6CAQ8B;IAC3C,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,MAAM,EAAE;gB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EAAE,IAAI,EAAE,CAAC;SAClC,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,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,4BAA4B,OAAO,EAAE,EAAE,CAAC;YACxE,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"update-app.d.ts","sourceRoot":"","sources":["../../src/tools/update-app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,eAAO,MAAM,aAAa,EAAE,IAqD3B,CAAC;AAEF,wBAAsB,eAAe,CACnC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,cAAc,CAAC,CAmCzB"}
1
+ {"version":3,"file":"update-app.d.ts","sourceRoot":"","sources":["../../src/tools/update-app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,eAAO,MAAM,aAAa,EAAE,IA4D3B,CAAC;AAEF,wBAAsB,eAAe,CACnC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,cAAc,CAAC,CAmCzB"}
@@ -8,8 +8,15 @@ export const updateAppTool = {
8
8
  name: 'update_app',
9
9
  description: `Update an existing FlowDot app. You can update any combination of fields.
10
10
 
11
+ CRITICAL: Remember these rules when updating code:
12
+ - NO IMPORTS - React is global (use React.useState, etc.)
13
+ - MUST include export default at the end: export default MyAppName;
14
+ - NO FORM ELEMENTS - Never use <form> tags (sandbox blocks them)
15
+ - ALL BUTTONS need type="button" attribute
16
+ - Use getNodeOutput() helper to extract workflow results safely
17
+
11
18
  Use this to:
12
- - Update the React code (remember: NO imports, NO exports, use React.useState, etc.)
19
+ - Update the React code
13
20
  - Change the name or description
14
21
  - Add/update mobile-specific code
15
22
  - Set display mode via config: { displayMode: "windowed" | "fullscreen" | "embedded" }
@@ -1 +1 @@
1
- {"version":3,"file":"update-app.js","sourceRoot":"","sources":["../../src/tools/update-app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,CAAC,MAAM,aAAa,GAAS;IACjC,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE;;;;;;;2BAOY;IACzB,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sBAAsB;aACpC;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iBAAiB;aAC/B;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8BAA8B;aAC5C;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oCAAoC;aAClD;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8BAA8B;aAC5C;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,cAAc;aAC5B;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAA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CAAC;YACnE,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Update Knowledge Category Tool
3
+ *
4
+ * Updates an existing document category.
5
+ */
6
+ import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
7
+ import { FlowDotApiClient } from '../api-client.js';
8
+ export declare const updateKnowledgeCategoryToolDef: Tool;
9
+ export declare function handleUpdateKnowledgeCategory(api: FlowDotApiClient, args: {
10
+ category_id: number;
11
+ name?: string;
12
+ description?: string;
13
+ color?: string;
14
+ }): Promise<CallToolResult>;
15
+ //# sourceMappingURL=update-knowledge-category.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-knowledge-category.d.ts","sourceRoot":"","sources":["../../src/tools/update-knowledge-category.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,8BAA8B,EAAE,IA0B5C,CAAC;AAEF,wBAAsB,6BAA6B,CACjD,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACjF,OAAO,CAAC,cAAc,CAAC,CAuCzB"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Update Knowledge Category Tool
3
+ *
4
+ * Updates an existing document category.
5
+ */
6
+ export const updateKnowledgeCategoryToolDef = {
7
+ name: 'update_knowledge_category',
8
+ description: 'Update an existing knowledge base category name, description, or color.',
9
+ inputSchema: {
10
+ type: 'object',
11
+ properties: {
12
+ category_id: {
13
+ type: 'number',
14
+ description: 'The ID of the category to update',
15
+ },
16
+ name: {
17
+ type: 'string',
18
+ description: 'New name for the category (max 100 characters)',
19
+ },
20
+ description: {
21
+ type: 'string',
22
+ description: 'New description (max 500 characters)',
23
+ },
24
+ color: {
25
+ type: 'string',
26
+ description: 'New hex color code (e.g., #3B82F6)',
27
+ pattern: '^#[0-9A-Fa-f]{6}$',
28
+ },
29
+ },
30
+ required: ['category_id'],
31
+ },
32
+ };
33
+ export async function handleUpdateKnowledgeCategory(api, args) {
34
+ try {
35
+ const updates = {};
36
+ if (args.name !== undefined)
37
+ updates.name = args.name;
38
+ if (args.description !== undefined)
39
+ updates.description = args.description;
40
+ if (args.color !== undefined)
41
+ updates.color = args.color;
42
+ if (Object.keys(updates).length === 0) {
43
+ return {
44
+ content: [
45
+ {
46
+ type: 'text',
47
+ text: 'No updates provided. Specify at least one of: name, description, or color.',
48
+ },
49
+ ],
50
+ isError: true,
51
+ };
52
+ }
53
+ const category = await api.updateKnowledgeCategory(args.category_id, updates);
54
+ return {
55
+ content: [
56
+ {
57
+ type: 'text',
58
+ text: `Category "${category.name}" (ID: ${category.id}) updated successfully.\n\n` +
59
+ `**Name:** ${category.name}\n` +
60
+ `**Description:** ${category.description || 'None'}\n` +
61
+ `**Color:** ${category.color}`,
62
+ },
63
+ ],
64
+ };
65
+ }
66
+ catch (error) {
67
+ const message = error instanceof Error ? error.message : 'Unknown error';
68
+ return {
69
+ content: [{ type: 'text', text: `Error updating category: ${message}` }],
70
+ isError: true,
71
+ };
72
+ }
73
+ }
74
+ //# sourceMappingURL=update-knowledge-category.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-knowledge-category.js","sourceRoot":"","sources":["../../src/tools/update-knowledge-category.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,CAAC,MAAM,8BAA8B,GAAS;IAClD,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,yEAAyE;IACtF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI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,6BAA6B;wBAChF,aAAa,QAAQ,CAAC,IAAI,IAAI;wBAC9B,oBAAoB,QAAQ,CAAC,WAAW,IAAI,MAAM,IAAI;wBACtD,cAAc,QAAQ,CAAC,KAAK,EAAE;iBACjC;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,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,4BAA4B,OAAO,EAAE,EAAE,CAAC;YACxE,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * update_recipe_step MCP Tool
3
+ *
4
+ * Updates an existing step in a recipe.
5
+ */
6
+ import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
7
+ import { FlowDotApiClient } from '../api-client.js';
8
+ export declare const updateRecipeStepTool: Tool;
9
+ export declare function handleUpdateRecipeStep(api: FlowDotApiClient, args: {
10
+ hash: string;
11
+ step_id: string;
12
+ name?: string;
13
+ description?: string;
14
+ config?: Record<string, unknown>;
15
+ next?: string | null;
16
+ on_error?: string | null;
17
+ position?: {
18
+ x: number;
19
+ y: number;
20
+ };
21
+ }): Promise<CallToolResult>;
22
+ //# sourceMappingURL=update-recipe-step.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-recipe-step.d.ts","sourceRoot":"","sources":["../../src/tools/update-recipe-step.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,oBAAoB,EAAE,IA8ClC,CAAC;AAEF,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IACJ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACrC,GACA,OAAO,CAAC,cAAc,CAAC,CAsCzB"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * update_recipe_step MCP Tool
3
+ *
4
+ * Updates an existing step in a recipe.
5
+ */
6
+ export const updateRecipeStepTool = {
7
+ name: 'update_recipe_step',
8
+ description: "Update a step's name, description, config, or connections.",
9
+ inputSchema: {
10
+ type: 'object',
11
+ properties: {
12
+ hash: {
13
+ type: 'string',
14
+ description: 'The recipe hash/ID',
15
+ },
16
+ step_id: {
17
+ type: 'string',
18
+ description: 'The step ID to update',
19
+ },
20
+ name: {
21
+ type: 'string',
22
+ description: 'New name for the step',
23
+ },
24
+ description: {
25
+ type: 'string',
26
+ description: 'New description',
27
+ },
28
+ config: {
29
+ type: 'object',
30
+ description: 'New configuration (merges with existing)',
31
+ additionalProperties: true,
32
+ },
33
+ next: {
34
+ type: 'string',
35
+ description: 'New next step ID (use null to remove)',
36
+ },
37
+ on_error: {
38
+ type: 'string',
39
+ description: 'New error step ID (use null to remove)',
40
+ },
41
+ position: {
42
+ type: 'object',
43
+ properties: {
44
+ x: { type: 'number' },
45
+ y: { type: 'number' },
46
+ },
47
+ description: 'New position on the visual canvas',
48
+ },
49
+ },
50
+ required: ['hash', 'step_id'],
51
+ },
52
+ };
53
+ export async function handleUpdateRecipeStep(api, args) {
54
+ try {
55
+ const input = {};
56
+ if (args.name !== undefined)
57
+ input.name = args.name;
58
+ if (args.description !== undefined)
59
+ input.description = args.description;
60
+ if (args.config !== undefined)
61
+ input.config = args.config;
62
+ if (args.next !== undefined)
63
+ input.next = args.next;
64
+ if (args.on_error !== undefined)
65
+ input.on_error = args.on_error;
66
+ if (args.position !== undefined)
67
+ input.position = args.position;
68
+ const step = await api.updateRecipeStep(args.hash, args.step_id, input);
69
+ return {
70
+ content: [
71
+ {
72
+ type: 'text',
73
+ text: `Step updated successfully!
74
+
75
+ **Name:** ${step.name}
76
+ **Type:** ${step.type}
77
+ **ID:** ${step.id}
78
+ **Next:** ${step.next || 'None'}
79
+ **On Error:** ${step.on_error || 'None'}`,
80
+ },
81
+ ],
82
+ };
83
+ }
84
+ catch (error) {
85
+ const message = error instanceof Error ? error.message : 'Unknown error';
86
+ return {
87
+ content: [
88
+ {
89
+ type: 'text',
90
+ text: `Error updating step: ${message}`,
91
+ },
92
+ ],
93
+ isError: true,
94
+ };
95
+ }
96
+ }
97
+ //# sourceMappingURL=update-recipe-step.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-recipe-step.js","sourceRoot":"","sources":["../../src/tools/update-recipe-step.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,CAAC,MAAM,oBAAoB,GAAS;IACxC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,4DAA4D;IACzE,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oBAAoB;aAClC;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uBAAuB;aACrC;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uBAAuB;aACrC;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAA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I,CAAC,QAAQ,CAAC;QAEhE,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAExE,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;;YAEJ,IAAI,CAAC,IAAI;YACT,IAAI,CAAC,IAAI;UACX,IAAI,CAAC,EAAE;YACL,IAAI,CAAC,IAAI,IAAI,MAAM;gBACf,IAAI,CAAC,QAAQ,IAAI,MAAM,EAAE;iBAChC;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,wBAAwB,OAAO,EAAE;iBACxC;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -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"}