@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.
- package/bin/flowdot-mcp.js +1 -1
- package/dist/api-client.d.ts +2 -557
- package/dist/api-client.d.ts.map +1 -1
- package/dist/api-client.js +2 -1264
- package/dist/api-client.js.map +1 -1
- package/dist/resources/index.d.ts +12 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +2204 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +11 -1
- package/dist/server.js.map +1 -1
- package/dist/tools/add-recipe-step.d.ts +23 -0
- package/dist/tools/add-recipe-step.d.ts.map +1 -0
- package/dist/tools/add-recipe-step.js +196 -0
- package/dist/tools/add-recipe-step.js.map +1 -0
- package/dist/tools/add-recipe-store.d.ts +19 -0
- package/dist/tools/add-recipe-store.d.ts.map +1 -0
- package/dist/tools/add-recipe-store.js +116 -0
- package/dist/tools/add-recipe-store.js.map +1 -0
- package/dist/tools/agent-toolkits.d.ts.map +1 -1
- package/dist/tools/agent-toolkits.js +8 -1
- package/dist/tools/agent-toolkits.js.map +1 -1
- package/dist/tools/browse-recipes.d.ts +16 -0
- package/dist/tools/browse-recipes.d.ts.map +1 -0
- package/dist/tools/browse-recipes.js +102 -0
- package/dist/tools/browse-recipes.js.map +1 -0
- package/dist/tools/create-recipe.d.ts +16 -0
- package/dist/tools/create-recipe.d.ts.map +1 -0
- package/dist/tools/create-recipe.js +92 -0
- package/dist/tools/create-recipe.js.map +1 -0
- package/dist/tools/delete-recipe-step.d.ts +14 -0
- package/dist/tools/delete-recipe-step.d.ts.map +1 -0
- package/dist/tools/delete-recipe-step.js +65 -0
- package/dist/tools/delete-recipe-step.js.map +1 -0
- package/dist/tools/delete-recipe-store.d.ts +14 -0
- package/dist/tools/delete-recipe-store.d.ts.map +1 -0
- package/dist/tools/delete-recipe-store.js +65 -0
- package/dist/tools/delete-recipe-store.js.map +1 -0
- package/dist/tools/delete-recipe.d.ts +13 -0
- package/dist/tools/delete-recipe.d.ts.map +1 -0
- package/dist/tools/delete-recipe.js +59 -0
- package/dist/tools/delete-recipe.js.map +1 -0
- package/dist/tools/favorite-recipe.d.ts +13 -0
- package/dist/tools/favorite-recipe.d.ts.map +1 -0
- package/dist/tools/favorite-recipe.js +53 -0
- package/dist/tools/favorite-recipe.js.map +1 -0
- package/dist/tools/fork-recipe.d.ts +13 -0
- package/dist/tools/fork-recipe.d.ts.map +1 -0
- package/dist/tools/fork-recipe.js +56 -0
- package/dist/tools/fork-recipe.js.map +1 -0
- package/dist/tools/get-recipe-definition.d.ts +15 -0
- package/dist/tools/get-recipe-definition.d.ts.map +1 -0
- package/dist/tools/get-recipe-definition.js +70 -0
- package/dist/tools/get-recipe-definition.js.map +1 -0
- package/dist/tools/get-recipe.d.ts +12 -0
- package/dist/tools/get-recipe.d.ts.map +1 -0
- package/dist/tools/get-recipe.js +88 -0
- package/dist/tools/get-recipe.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +87 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/link-recipe.d.ts +14 -0
- package/dist/tools/link-recipe.d.ts.map +1 -0
- package/dist/tools/link-recipe.js +76 -0
- package/dist/tools/link-recipe.js.map +1 -0
- package/dist/tools/list-recipe-steps.d.ts +12 -0
- package/dist/tools/list-recipe-steps.d.ts.map +1 -0
- package/dist/tools/list-recipe-steps.js +69 -0
- package/dist/tools/list-recipe-steps.js.map +1 -0
- package/dist/tools/list-recipe-stores.d.ts +12 -0
- package/dist/tools/list-recipe-stores.d.ts.map +1 -0
- package/dist/tools/list-recipe-stores.js +87 -0
- package/dist/tools/list-recipe-stores.js.map +1 -0
- package/dist/tools/list-recipes.d.ts +12 -0
- package/dist/tools/list-recipes.d.ts.map +1 -0
- package/dist/tools/list-recipes.js +92 -0
- package/dist/tools/list-recipes.js.map +1 -0
- package/dist/tools/update-recipe-step.d.ts +22 -0
- package/dist/tools/update-recipe-step.d.ts.map +1 -0
- package/dist/tools/update-recipe-step.js +97 -0
- package/dist/tools/update-recipe-step.js.map +1 -0
- package/dist/tools/update-recipe-store.d.ts +20 -0
- package/dist/tools/update-recipe-store.d.ts.map +1 -0
- package/dist/tools/update-recipe-store.js +98 -0
- package/dist/tools/update-recipe-store.js.map +1 -0
- package/dist/tools/update-recipe.d.ts +18 -0
- package/dist/tools/update-recipe.d.ts.map +1 -0
- package/dist/tools/update-recipe.js +98 -0
- package/dist/tools/update-recipe.js.map +1 -0
- package/dist/tools/vote-recipe.d.ts +13 -0
- package/dist/tools/vote-recipe.d.ts.map +1 -0
- package/dist/tools/vote-recipe.js +54 -0
- package/dist/tools/vote-recipe.js.map +1 -0
- package/dist/types.d.ts +3 -1092
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +3 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/script-validator.d.ts.map +1 -1
- package/dist/utils/script-validator.js +5 -1
- package/dist/utils/script-validator.js.map +1 -1
- package/package.json +11 -3
- package/dist/tools/convert-app-to-multifile.d.ts +0 -11
- package/dist/tools/convert-app-to-multifile.d.ts.map +0 -1
- package/dist/tools/convert-app-to-multifile.js +0 -69
- package/dist/tools/convert-app-to-multifile.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* delete_recipe MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Permanently deletes an agent recipe.
|
|
5
|
+
*/
|
|
6
|
+
import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { FlowDotApiClient } from '../api-client.js';
|
|
8
|
+
export declare const deleteRecipeTool: Tool;
|
|
9
|
+
export declare function handleDeleteRecipe(api: FlowDotApiClient, args: {
|
|
10
|
+
hash: string;
|
|
11
|
+
confirm: boolean;
|
|
12
|
+
}): Promise<CallToolResult>;
|
|
13
|
+
//# sourceMappingURL=delete-recipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-recipe.d.ts","sourceRoot":"","sources":["../../src/tools/delete-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,gBAAgB,EAAE,IAiB9B,CAAC;AAEF,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GACvC,OAAO,CAAC,cAAc,CAAC,CAmCzB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* delete_recipe MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Permanently deletes an agent recipe.
|
|
5
|
+
*/
|
|
6
|
+
export const deleteRecipeTool = {
|
|
7
|
+
name: 'delete_recipe',
|
|
8
|
+
description: 'Permanently delete an agent recipe. This action cannot be undone.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
hash: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'The recipe hash/ID to delete',
|
|
15
|
+
},
|
|
16
|
+
confirm: {
|
|
17
|
+
type: 'boolean',
|
|
18
|
+
description: 'Must be true to confirm deletion',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
required: ['hash', 'confirm'],
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
export async function handleDeleteRecipe(api, args) {
|
|
25
|
+
try {
|
|
26
|
+
if (!args.confirm) {
|
|
27
|
+
return {
|
|
28
|
+
content: [
|
|
29
|
+
{
|
|
30
|
+
type: 'text',
|
|
31
|
+
text: 'Deletion cancelled. Set confirm to true to delete the recipe.',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
await api.deleteRecipe(args.hash);
|
|
37
|
+
return {
|
|
38
|
+
content: [
|
|
39
|
+
{
|
|
40
|
+
type: 'text',
|
|
41
|
+
text: `Recipe ${args.hash} has been permanently deleted.`,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
48
|
+
return {
|
|
49
|
+
content: [
|
|
50
|
+
{
|
|
51
|
+
type: 'text',
|
|
52
|
+
text: `Error deleting recipe: ${message}`,
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
isError: true,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=delete-recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-recipe.js","sourceRoot":"","sources":["../../src/tools/delete-recipe.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,CAAC,MAAM,gBAAgB,GAAS;IACpC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,mEAAmE;IAChF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8BAA8B;aAC5C;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,kCAAkC;aAChD;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;KAC9B;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,GAAqB,EACrB,IAAwC;IAExC,IAAI,CAAC;QACH,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,+DAA+D;qBACtE;iBACF;aACF,CAAC;QACJ,CAAC;QAED,MAAM,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAElC,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,UAAU,IAAI,CAAC,IAAI,gCAAgC;iBAC1D;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
|
+
* favorite_recipe MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Add or remove a recipe from favorites.
|
|
5
|
+
*/
|
|
6
|
+
import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { FlowDotApiClient } from '../api-client.js';
|
|
8
|
+
export declare const favoriteRecipeTool: Tool;
|
|
9
|
+
export declare function handleFavoriteRecipe(api: FlowDotApiClient, args: {
|
|
10
|
+
hash: string;
|
|
11
|
+
favorite: boolean;
|
|
12
|
+
}): Promise<CallToolResult>;
|
|
13
|
+
//# sourceMappingURL=favorite-recipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"favorite-recipe.d.ts","sourceRoot":"","sources":["../../src/tools/favorite-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,kBAAkB,EAAE,IAiBhC,CAAC;AAEF,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,GACxC,OAAO,CAAC,cAAc,CAAC,CA6BzB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* favorite_recipe MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Add or remove a recipe from favorites.
|
|
5
|
+
*/
|
|
6
|
+
export const favoriteRecipeTool = {
|
|
7
|
+
name: 'favorite_recipe',
|
|
8
|
+
description: 'Add or remove a recipe from your favorites. Favorited recipes can be filtered in list_recipes.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
hash: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'The recipe hash/ID',
|
|
15
|
+
},
|
|
16
|
+
favorite: {
|
|
17
|
+
type: 'boolean',
|
|
18
|
+
description: 'Set to true to add to favorites, false to remove',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
required: ['hash', 'favorite'],
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
export async function handleFavoriteRecipe(api, args) {
|
|
25
|
+
try {
|
|
26
|
+
const result = await api.favoriteRecipe(args.hash, args.favorite);
|
|
27
|
+
const emoji = args.favorite ? '⭐' : '✓';
|
|
28
|
+
const action = args.favorite ? 'added to' : 'removed from';
|
|
29
|
+
return {
|
|
30
|
+
content: [
|
|
31
|
+
{
|
|
32
|
+
type: 'text',
|
|
33
|
+
text: `${emoji} Recipe ${action} favorites!
|
|
34
|
+
|
|
35
|
+
**Favorited:** ${result.is_favorited ? 'Yes' : 'No'}`,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
42
|
+
return {
|
|
43
|
+
content: [
|
|
44
|
+
{
|
|
45
|
+
type: 'text',
|
|
46
|
+
text: `Error updating favorite: ${message}`,
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
isError: true,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=favorite-recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"favorite-recipe.js","sourceRoot":"","sources":["../../src/tools/favorite-recipe.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,CAAC,MAAM,kBAAkB,GAAS;IACtC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,gGAAgG;IAC7G,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,SAAS;gBACf,WAAW,EAAE,kDAAkD;aAChE;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;KAC/B;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,GAAqB,EACrB,IAAyC;IAEzC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAElE,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;QACxC,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC;QAE3D,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,GAAG,KAAK,WAAW,MAAM;;iBAExB,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,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,4BAA4B,OAAO,EAAE;iBAC5C;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* fork_recipe MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Creates a copy of a public recipe.
|
|
5
|
+
*/
|
|
6
|
+
import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { FlowDotApiClient } from '../api-client.js';
|
|
8
|
+
export declare const forkRecipeTool: Tool;
|
|
9
|
+
export declare function handleForkRecipe(api: FlowDotApiClient, args: {
|
|
10
|
+
hash: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
}): Promise<CallToolResult>;
|
|
13
|
+
//# sourceMappingURL=fork-recipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fork-recipe.d.ts","sourceRoot":"","sources":["../../src/tools/fork-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,IAiB5B,CAAC;AAEF,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC,OAAO,CAAC,cAAc,CAAC,CA+BzB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* fork_recipe MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Creates a copy of a public recipe.
|
|
5
|
+
*/
|
|
6
|
+
export const forkRecipeTool = {
|
|
7
|
+
name: 'fork_recipe',
|
|
8
|
+
description: 'Create a copy of a public recipe into your account. The copy will be private and editable.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
hash: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'The recipe hash/ID to fork',
|
|
15
|
+
},
|
|
16
|
+
name: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'Optional new name for the forked recipe',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
required: ['hash'],
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
export async function handleForkRecipe(api, args) {
|
|
25
|
+
try {
|
|
26
|
+
const result = await api.forkRecipe(args.hash, args.name);
|
|
27
|
+
return {
|
|
28
|
+
content: [
|
|
29
|
+
{
|
|
30
|
+
type: 'text',
|
|
31
|
+
text: `Recipe forked successfully!
|
|
32
|
+
|
|
33
|
+
**New Name:** ${result.name}
|
|
34
|
+
**New Hash:** ${result.hash}
|
|
35
|
+
**Forked From:** ${result.forked_from.name} by ${result.forked_from.user_name}
|
|
36
|
+
**Visibility:** Private
|
|
37
|
+
|
|
38
|
+
You can now edit this recipe and customize it for your needs.`,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
45
|
+
return {
|
|
46
|
+
content: [
|
|
47
|
+
{
|
|
48
|
+
type: 'text',
|
|
49
|
+
text: `Error forking recipe: ${message}`,
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
isError: true,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=fork-recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fork-recipe.js","sourceRoot":"","sources":["../../src/tools/fork-recipe.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,CAAC,MAAM,cAAc,GAAS;IAClC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,4FAA4F;IACzG,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4BAA4B;aAC1C;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;aACvD;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,GAAqB,EACrB,IAAqC;IAErC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAE1D,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;;gBAEA,MAAM,CAAC,IAAI;gBACX,MAAM,CAAC,IAAI;mBACR,MAAM,CAAC,WAAW,CAAC,IAAI,OAAO,MAAM,CAAC,WAAW,CAAC,SAAS;;;8DAGf;iBACrD;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,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* get_recipe_definition MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Gets the complete recipe definition in YAML format for export or inspection.
|
|
5
|
+
* This is the canonical format for recipe definitions - both MCP and CLI
|
|
6
|
+
* should return identical YAML output for validation purposes.
|
|
7
|
+
*/
|
|
8
|
+
import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
9
|
+
import { FlowDotApiClient } from '../api-client.js';
|
|
10
|
+
export declare const getRecipeDefinitionTool: Tool;
|
|
11
|
+
export declare function handleGetRecipeDefinition(api: FlowDotApiClient, args: {
|
|
12
|
+
hash: string;
|
|
13
|
+
format?: 'yaml' | 'json';
|
|
14
|
+
}): Promise<CallToolResult>;
|
|
15
|
+
//# sourceMappingURL=get-recipe-definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-recipe-definition.d.ts","sourceRoot":"","sources":["../../src/tools/get-recipe-definition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,eAAO,MAAM,uBAAuB,EAAE,IAmBrC,CAAC;AAEF,wBAAsB,yBAAyB,CAC7C,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAC/C,OAAO,CAAC,cAAc,CAAC,CA0CzB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* get_recipe_definition MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Gets the complete recipe definition in YAML format for export or inspection.
|
|
5
|
+
* This is the canonical format for recipe definitions - both MCP and CLI
|
|
6
|
+
* should return identical YAML output for validation purposes.
|
|
7
|
+
*/
|
|
8
|
+
import yaml from 'js-yaml';
|
|
9
|
+
export const getRecipeDefinitionTool = {
|
|
10
|
+
name: 'get_recipe_definition',
|
|
11
|
+
description: 'Get the complete recipe definition in YAML format. Returns all steps, stores, entry_step_id, and configuration details. Use this to inspect or validate recipe definitions.',
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
properties: {
|
|
15
|
+
hash: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
description: 'The recipe hash/ID',
|
|
18
|
+
},
|
|
19
|
+
format: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
enum: ['yaml', 'json'],
|
|
22
|
+
description: 'Output format: yaml (default) or json',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
required: ['hash'],
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
export async function handleGetRecipeDefinition(api, args) {
|
|
29
|
+
try {
|
|
30
|
+
const definition = await api.getRecipeDefinition(args.hash);
|
|
31
|
+
const format = args.format || 'yaml';
|
|
32
|
+
let text;
|
|
33
|
+
let codeBlock;
|
|
34
|
+
if (format === 'json') {
|
|
35
|
+
text = JSON.stringify(definition, null, 2);
|
|
36
|
+
codeBlock = 'json';
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
// YAML output - canonical format for recipe definitions
|
|
40
|
+
text = yaml.dump(definition, {
|
|
41
|
+
indent: 2,
|
|
42
|
+
lineWidth: 120,
|
|
43
|
+
noRefs: true,
|
|
44
|
+
sortKeys: false, // Preserve field order
|
|
45
|
+
});
|
|
46
|
+
codeBlock = 'yaml';
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
content: [
|
|
50
|
+
{
|
|
51
|
+
type: 'text',
|
|
52
|
+
text: `Recipe Definition for ${args.hash}:\n\n\`\`\`${codeBlock}\n${text}\`\`\``,
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
59
|
+
return {
|
|
60
|
+
content: [
|
|
61
|
+
{
|
|
62
|
+
type: 'text',
|
|
63
|
+
text: `Error getting recipe definition: ${message}`,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
isError: true,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=get-recipe-definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-recipe-definition.js","sourceRoot":"","sources":["../../src/tools/get-recipe-definition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,MAAM,CAAC,MAAM,uBAAuB,GAAS;IAC3C,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,6KAA6K;IAC/K,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oBAAoB;aAClC;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;gBACtB,WAAW,EAAE,uCAAuC;aACrD;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,GAAqB,EACrB,IAAgD;IAEhD,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5D,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC;QAErC,IAAI,IAAY,CAAC;QACjB,IAAI,SAAiB,CAAC;QAEtB,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;YACtB,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YAC3C,SAAS,GAAG,MAAM,CAAC;QACrB,CAAC;aAAM,CAAC;YACN,wDAAwD;YACxD,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBAC3B,MAAM,EAAE,CAAC;gBACT,SAAS,EAAE,GAAG;gBACd,MAAM,EAAE,IAAI;gBACZ,QAAQ,EAAE,KAAK,EAAE,uBAAuB;aACzC,CAAC,CAAC;YACH,SAAS,GAAG,MAAM,CAAC;QACrB,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,yBAAyB,IAAI,CAAC,IAAI,cAAc,SAAS,KAAK,IAAI,QAAQ;iBACjF;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,oCAAoC,OAAO,EAAE;iBACpD;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* get_recipe MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Gets detailed information about a specific agent recipe.
|
|
5
|
+
*/
|
|
6
|
+
import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { FlowDotApiClient } from '../api-client.js';
|
|
8
|
+
export declare const getRecipeTool: Tool;
|
|
9
|
+
export declare function handleGetRecipe(api: FlowDotApiClient, args: {
|
|
10
|
+
hash: string;
|
|
11
|
+
}): Promise<CallToolResult>;
|
|
12
|
+
//# sourceMappingURL=get-recipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-recipe.d.ts","sourceRoot":"","sources":["../../src/tools/get-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,aAAa,EAAE,IAc3B,CAAC;AAEF,wBAAsB,eAAe,CACnC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GACrB,OAAO,CAAC,cAAc,CAAC,CA0EzB"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* get_recipe MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Gets detailed information about a specific agent recipe.
|
|
5
|
+
*/
|
|
6
|
+
export const getRecipeTool = {
|
|
7
|
+
name: 'get_recipe',
|
|
8
|
+
description: 'Get detailed information about a specific agent recipe including its steps, stores, and metadata.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
hash: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'The recipe hash/ID',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
required: ['hash'],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export async function handleGetRecipe(api, args) {
|
|
21
|
+
try {
|
|
22
|
+
const recipe = await api.getRecipe(args.hash);
|
|
23
|
+
// Format step types count
|
|
24
|
+
const stepTypes = {};
|
|
25
|
+
if (recipe.steps) {
|
|
26
|
+
recipe.steps.forEach((s) => {
|
|
27
|
+
stepTypes[s.type] = (stepTypes[s.type] || 0) + 1;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
const stepTypesStr = Object.entries(stepTypes)
|
|
31
|
+
.map(([type, count]) => `${type}: ${count}`)
|
|
32
|
+
.join(', ');
|
|
33
|
+
// Format stores
|
|
34
|
+
const inputStores = recipe.stores?.filter((s) => s.is_input) || [];
|
|
35
|
+
const outputStores = recipe.stores?.filter((s) => s.is_output) || [];
|
|
36
|
+
let storeInfo = '';
|
|
37
|
+
if (inputStores.length > 0) {
|
|
38
|
+
storeInfo += `\n\n**Input Stores (${inputStores.length}):**\n`;
|
|
39
|
+
storeInfo += inputStores.map((s) => `- ${s.key}: ${s.schema_type}${s.description ? ` - ${s.description}` : ''}`).join('\n');
|
|
40
|
+
}
|
|
41
|
+
if (outputStores.length > 0) {
|
|
42
|
+
storeInfo += `\n\n**Output Stores (${outputStores.length}):**\n`;
|
|
43
|
+
storeInfo += outputStores.map((s) => `- ${s.key}: ${s.schema_type}${s.description ? ` - ${s.description}` : ''}`).join('\n');
|
|
44
|
+
}
|
|
45
|
+
// Format steps summary
|
|
46
|
+
let stepsInfo = '';
|
|
47
|
+
if (recipe.steps && recipe.steps.length > 0) {
|
|
48
|
+
stepsInfo = `\n\n**Steps (${recipe.steps.length}):**\n`;
|
|
49
|
+
stepsInfo += recipe.steps.map((s) => {
|
|
50
|
+
const entryMark = s.id === recipe.entry_step_id ? ' [ENTRY]' : '';
|
|
51
|
+
return `- ${s.name} (${s.type})${entryMark}${s.description ? `: ${s.description}` : ''}`;
|
|
52
|
+
}).join('\n');
|
|
53
|
+
}
|
|
54
|
+
const visibility = recipe.visibility === 'public' ? 'Public' : recipe.visibility === 'unlisted' ? 'Unlisted' : 'Private';
|
|
55
|
+
const text = `# ${recipe.name}
|
|
56
|
+
|
|
57
|
+
**Hash:** ${recipe.hash}
|
|
58
|
+
**Version:** ${recipe.version}
|
|
59
|
+
**Visibility:** ${visibility}
|
|
60
|
+
**Category:** ${recipe.category || 'None'}
|
|
61
|
+
**Tags:** ${recipe.tags?.length ? recipe.tags.join(', ') : 'None'}
|
|
62
|
+
|
|
63
|
+
**Description:** ${recipe.description || 'No description'}
|
|
64
|
+
|
|
65
|
+
**Step Types:** ${stepTypesStr || 'No steps'}${storeInfo}${stepsInfo}`;
|
|
66
|
+
return {
|
|
67
|
+
content: [
|
|
68
|
+
{
|
|
69
|
+
type: 'text',
|
|
70
|
+
text,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
77
|
+
return {
|
|
78
|
+
content: [
|
|
79
|
+
{
|
|
80
|
+
type: 'text',
|
|
81
|
+
text: `Error getting recipe: ${message}`,
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
isError: true,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=get-recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-recipe.js","sourceRoot":"","sources":["../../src/tools/get-recipe.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAKnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAKnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAmZpD;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB,GAAG,IAAI,CA4xBzE"}
|
package/dist/tools/index.js
CHANGED
|
@@ -152,6 +152,29 @@ import { getKnowledgeStorageToolDef, handleGetKnowledgeStorage } from './get-kno
|
|
|
152
152
|
// Agent Toolkit Tools (agent_toolkits:read / agent_toolkits:manage)
|
|
153
153
|
// ============================================
|
|
154
154
|
import { listAgentToolkitsTool, handleListAgentToolkits, searchAgentToolkitsTool, handleSearchAgentToolkits, getAgentToolkitTool, handleGetAgentToolkit, getToolkitCommentsTool, handleGetToolkitComments, createAgentToolkitTool, handleCreateAgentToolkit, updateAgentToolkitTool, handleUpdateAgentToolkit, deleteAgentToolkitTool, handleDeleteAgentToolkit, copyAgentToolkitTool, handleCopyAgentToolkit, toggleToolkitVisibilityTool, handleToggleToolkitVisibility, voteToolkitTool, handleVoteToolkit, favoriteToolkitTool, handleFavoriteToolkit, addToolkitCommentTool, handleAddToolkitComment, installToolkitTool, handleInstallToolkit, uninstallToolkitTool, handleUninstallToolkit, listInstalledToolkitsTool, handleListInstalledToolkits, toggleToolkitActiveTool, handleToggleToolkitActive, checkToolkitCredentialsTool, handleCheckToolkitCredentials, updateToolkitInstallationTool, handleUpdateToolkitInstallation, invokeToolkitToolTool, handleInvokeToolkitTool, listToolkitToolsTool, handleListToolkitTools, getToolkitToolTool, handleGetToolkitTool, createToolkitToolTool, handleCreateToolkitTool, updateToolkitToolTool, handleUpdateToolkitTool, deleteToolkitToolTool, handleDeleteToolkitTool, } from './agent-toolkits.js';
|
|
155
|
+
// ============================================
|
|
156
|
+
// Agent Recipe Tools (recipes:read / recipes:manage)
|
|
157
|
+
// ============================================
|
|
158
|
+
import { listRecipesTool, handleListRecipes } from './list-recipes.js';
|
|
159
|
+
import { getRecipeTool, handleGetRecipe } from './get-recipe.js';
|
|
160
|
+
import { getRecipeDefinitionTool, handleGetRecipeDefinition } from './get-recipe-definition.js';
|
|
161
|
+
import { browseRecipesTool, handleBrowseRecipes } from './browse-recipes.js';
|
|
162
|
+
import { createRecipeTool, handleCreateRecipe } from './create-recipe.js';
|
|
163
|
+
import { updateRecipeTool, handleUpdateRecipe } from './update-recipe.js';
|
|
164
|
+
import { deleteRecipeTool, handleDeleteRecipe } from './delete-recipe.js';
|
|
165
|
+
import { forkRecipeTool, handleForkRecipe } from './fork-recipe.js';
|
|
166
|
+
// REMOVED: execute_recipe and get_recipe_execution - MCP CANNOT run recipes, only CLI can
|
|
167
|
+
import { listRecipeStepsTool, handleListRecipeSteps } from './list-recipe-steps.js';
|
|
168
|
+
import { addRecipeStepTool, handleAddRecipeStep } from './add-recipe-step.js';
|
|
169
|
+
import { updateRecipeStepTool, handleUpdateRecipeStep } from './update-recipe-step.js';
|
|
170
|
+
import { deleteRecipeStepTool, handleDeleteRecipeStep } from './delete-recipe-step.js';
|
|
171
|
+
import { listRecipeStoresTool, handleListRecipeStores } from './list-recipe-stores.js';
|
|
172
|
+
import { addRecipeStoreTool, handleAddRecipeStore } from './add-recipe-store.js';
|
|
173
|
+
import { updateRecipeStoreTool, handleUpdateRecipeStore } from './update-recipe-store.js';
|
|
174
|
+
import { deleteRecipeStoreTool, handleDeleteRecipeStore } from './delete-recipe-store.js';
|
|
175
|
+
import { voteRecipeTool, handleVoteRecipe } from './vote-recipe.js';
|
|
176
|
+
import { favoriteRecipeTool, handleFavoriteRecipe } from './favorite-recipe.js';
|
|
177
|
+
import { linkRecipeTool, handleLinkRecipe } from './link-recipe.js';
|
|
155
178
|
// All available tools
|
|
156
179
|
const tools = [
|
|
157
180
|
// Core (4)
|
|
@@ -294,6 +317,27 @@ const tools = [
|
|
|
294
317
|
createToolkitToolTool,
|
|
295
318
|
updateToolkitToolTool,
|
|
296
319
|
deleteToolkitToolTool,
|
|
320
|
+
// Agent Recipes (21)
|
|
321
|
+
listRecipesTool,
|
|
322
|
+
getRecipeTool,
|
|
323
|
+
getRecipeDefinitionTool,
|
|
324
|
+
browseRecipesTool,
|
|
325
|
+
createRecipeTool,
|
|
326
|
+
updateRecipeTool,
|
|
327
|
+
deleteRecipeTool,
|
|
328
|
+
forkRecipeTool,
|
|
329
|
+
// REMOVED: executeRecipeTool, getRecipeExecutionTool - MCP CANNOT run recipes
|
|
330
|
+
listRecipeStepsTool,
|
|
331
|
+
addRecipeStepTool,
|
|
332
|
+
updateRecipeStepTool,
|
|
333
|
+
deleteRecipeStepTool,
|
|
334
|
+
listRecipeStoresTool,
|
|
335
|
+
addRecipeStoreTool,
|
|
336
|
+
updateRecipeStoreTool,
|
|
337
|
+
deleteRecipeStoreTool,
|
|
338
|
+
voteRecipeTool,
|
|
339
|
+
favoriteRecipeTool,
|
|
340
|
+
linkRecipeTool,
|
|
297
341
|
];
|
|
298
342
|
/**
|
|
299
343
|
* Register all tools with the MCP server.
|
|
@@ -604,6 +648,49 @@ export function registerTools(server, api) {
|
|
|
604
648
|
return handleUpdateToolkitTool(api, args);
|
|
605
649
|
case 'mcp__flowdot__delete_toolkit_tool':
|
|
606
650
|
return handleDeleteToolkitTool(api, args);
|
|
651
|
+
// ============================================
|
|
652
|
+
// Agent Recipe Tools
|
|
653
|
+
// ============================================
|
|
654
|
+
case 'list_recipes':
|
|
655
|
+
return handleListRecipes(api, args);
|
|
656
|
+
case 'get_recipe':
|
|
657
|
+
return handleGetRecipe(api, args);
|
|
658
|
+
case 'get_recipe_definition':
|
|
659
|
+
return handleGetRecipeDefinition(api, args);
|
|
660
|
+
case 'browse_recipes':
|
|
661
|
+
return handleBrowseRecipes(api, args);
|
|
662
|
+
case 'create_recipe':
|
|
663
|
+
return handleCreateRecipe(api, args);
|
|
664
|
+
case 'update_recipe':
|
|
665
|
+
return handleUpdateRecipe(api, args);
|
|
666
|
+
case 'delete_recipe':
|
|
667
|
+
return handleDeleteRecipe(api, args);
|
|
668
|
+
case 'fork_recipe':
|
|
669
|
+
return handleForkRecipe(api, args);
|
|
670
|
+
// REMOVED: execute_recipe and get_recipe_execution cases
|
|
671
|
+
// MCP CANNOT run recipes - only the CLI can enter recipe modes
|
|
672
|
+
case 'list_recipe_steps':
|
|
673
|
+
return handleListRecipeSteps(api, args);
|
|
674
|
+
case 'add_recipe_step':
|
|
675
|
+
return handleAddRecipeStep(api, args);
|
|
676
|
+
case 'update_recipe_step':
|
|
677
|
+
return handleUpdateRecipeStep(api, args);
|
|
678
|
+
case 'delete_recipe_step':
|
|
679
|
+
return handleDeleteRecipeStep(api, args);
|
|
680
|
+
case 'list_recipe_stores':
|
|
681
|
+
return handleListRecipeStores(api, args);
|
|
682
|
+
case 'add_recipe_store':
|
|
683
|
+
return handleAddRecipeStore(api, args);
|
|
684
|
+
case 'update_recipe_store':
|
|
685
|
+
return handleUpdateRecipeStore(api, args);
|
|
686
|
+
case 'delete_recipe_store':
|
|
687
|
+
return handleDeleteRecipeStore(api, args);
|
|
688
|
+
case 'vote_recipe':
|
|
689
|
+
return handleVoteRecipe(api, args);
|
|
690
|
+
case 'favorite_recipe':
|
|
691
|
+
return handleFavoriteRecipe(api, args);
|
|
692
|
+
case 'link_recipe':
|
|
693
|
+
return handleLinkRecipe(api, args);
|
|
607
694
|
default:
|
|
608
695
|
return {
|
|
609
696
|
content: [
|