@flowdot.ai/mcp-server 1.0.1 → 1.0.3
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 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAE5C;;;GAGG;AACH,MAAM,eAAe,GAAG;IACtB,kBAAkB,EAAE;QAClB,IAAI,EAAE,2BAA2B;QACjC,WAAW,EAAE,0EAA0E;QACvF,QAAQ,EAAE,eAAe;QACzB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAo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AAC,CAAC;IAEH,+BAA+B;IAC/B,MAAM,CAAC,iBAAiB,CAAC,yBAAyB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACpE,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC;QAC/B,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAmC,CAAC,CAAC;QAEtE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,uBAAuB,GAAG,EAAE,CAAC,CAAC;QAChD,CAAC;QAED,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG;oBACH,QAAQ,EAAE,QAAQ,CAAC,QAAQ;oBAC3B,IAAI,EAAE,QAAQ,CAAC,OAAO;iBACvB;aACF;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACrE,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC3C,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAQnE;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CA2FpD;AAED;;GAEG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAOjD"}
|
package/dist/server.js
CHANGED
|
@@ -7,6 +7,7 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
|
7
7
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
8
8
|
import { FlowDotApiClient } from './api-client.js';
|
|
9
9
|
import { registerTools } from './tools/index.js';
|
|
10
|
+
import { registerResources } from './resources/index.js';
|
|
10
11
|
const MCP_TOKEN_PREFIX = 'fd_mcp_';
|
|
11
12
|
/**
|
|
12
13
|
* Create and configure the FlowDot MCP server.
|
|
@@ -36,7 +37,8 @@ export async function createServer() {
|
|
|
36
37
|
process.exit(1);
|
|
37
38
|
}
|
|
38
39
|
// Create API client
|
|
39
|
-
const
|
|
40
|
+
const internalSecret = process.env.INTERNAL_API_SECRET;
|
|
41
|
+
const apiClient = new FlowDotApiClient(hubUrl, apiToken, internalSecret);
|
|
40
42
|
// Test connection
|
|
41
43
|
console.error(`FlowDot MCP Server connecting to ${hubUrl}...`);
|
|
42
44
|
const connected = await apiClient.testConnection();
|
|
@@ -66,12 +68,20 @@ export async function createServer() {
|
|
|
66
68
|
}, {
|
|
67
69
|
capabilities: {
|
|
68
70
|
tools: {},
|
|
71
|
+
resources: {},
|
|
69
72
|
},
|
|
70
73
|
});
|
|
71
74
|
// Register tools
|
|
72
75
|
registerTools(server, apiClient);
|
|
76
|
+
// Register learning resources
|
|
77
|
+
registerResources(server);
|
|
73
78
|
console.error('FlowDot MCP Server initialized.');
|
|
74
79
|
console.error('');
|
|
80
|
+
console.error('📚 Learning Resources:');
|
|
81
|
+
console.error(' Use learn:// resources to understand FlowDot concepts before using tools');
|
|
82
|
+
console.error(' Available: learn://overview, learn://workflows, learn://recipes,');
|
|
83
|
+
console.error(' learn://custom-nodes, learn://apps, learn://toolkits, learn://knowledge-base');
|
|
84
|
+
console.error('');
|
|
75
85
|
console.error('Available tool categories:');
|
|
76
86
|
console.error(' • Workflows: Core execution, management, building, validation');
|
|
77
87
|
console.error(' • Custom Nodes: Create, manage, and share custom node types');
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,qCAAqC;IACrC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IAC/C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,oBAAoB,CAAC;IAEnE,iBAAiB;IACjB,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAC5E,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QAC/C,OAAO,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QACxD,OAAO,CAA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AAC;IAElB,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,MAAM,MAAM,GAAG,MAAM,YAAY,EAAE,CAAC;IACpC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAE7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* add_recipe_step MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Adds a new step to a recipe.
|
|
5
|
+
*/
|
|
6
|
+
import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { FlowDotApiClient } from '../api-client.js';
|
|
8
|
+
import { RecipeStepType } from '../types.js';
|
|
9
|
+
export declare const addRecipeStepTool: Tool;
|
|
10
|
+
export declare function handleAddRecipeStep(api: FlowDotApiClient, args: {
|
|
11
|
+
hash: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: RecipeStepType;
|
|
14
|
+
description?: string;
|
|
15
|
+
config?: Record<string, unknown>;
|
|
16
|
+
next?: string;
|
|
17
|
+
on_error?: string;
|
|
18
|
+
position?: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
};
|
|
22
|
+
}): Promise<CallToolResult>;
|
|
23
|
+
//# sourceMappingURL=add-recipe-step.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-recipe-step.d.ts","sourceRoot":"","sources":["../../src/tools/add-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;AACpD,OAAO,EAAyB,cAAc,EAAE,MAAM,aAAa,CAAC;AAEpE,eAAO,MAAM,iBAAiB,EAAE,IAgG/B,CAAC;AAEF,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IACJ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACrC,GACA,OAAO,CAAC,cAAc,CAAC,CA2FzB"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* add_recipe_step MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Adds a new step to a recipe.
|
|
5
|
+
*/
|
|
6
|
+
export const addRecipeStepTool = {
|
|
7
|
+
name: 'add_recipe_step',
|
|
8
|
+
description: `Add a new step to a recipe. **Save the returned step ID** for connections.
|
|
9
|
+
|
|
10
|
+
**Step Types & Config:**
|
|
11
|
+
|
|
12
|
+
**agent** - LLM agent with tools
|
|
13
|
+
\`\`\`json
|
|
14
|
+
{ "user_prompt": "Instructions with {{inputs.request}} and {{store_key}}", "tools": ["read", "search", "web-search"], "output_store": "result_key", "max_iterations": 10 }
|
|
15
|
+
\`\`\`
|
|
16
|
+
**IMPORTANT:** Use \`user_prompt\` (NOT \`prompt\`) - this is the field the runtime expects.
|
|
17
|
+
Tools: read, search, analyze, find-definition, web-search, edit, execute-command, create-file
|
|
18
|
+
|
|
19
|
+
**parallel** - Run steps concurrently
|
|
20
|
+
\`\`\`json
|
|
21
|
+
{ "parallel_step_ids": ["step-id-1", "step-id-2"] }
|
|
22
|
+
\`\`\`
|
|
23
|
+
|
|
24
|
+
**loop** - Iterate over array
|
|
25
|
+
\`\`\`json
|
|
26
|
+
{ "loop_over": "array_store_key", "loop_variable": "current_item_key", "loop_step_id": "step-id-to-run", "parallel": true, "max_concurrent": 5 }
|
|
27
|
+
\`\`\`
|
|
28
|
+
Set \`parallel: true\` to execute iterations concurrently. Use \`max_concurrent\` to limit simultaneous executions.
|
|
29
|
+
|
|
30
|
+
**gate** - Approval, condition check, or user input collection
|
|
31
|
+
\`\`\`json
|
|
32
|
+
{ "requires_approval": true, "approval_prompt": "Review: {{data}}", "condition": "{{status}} === 'ready'", "input_options": { "button_mode": "preset", "preset": "approve_deny" }, "input_output_store": "decision" }
|
|
33
|
+
\`\`\`
|
|
34
|
+
**Gate Input Options** (for rich user input):
|
|
35
|
+
- \`input_options.button_mode\`: "preset" or "custom"
|
|
36
|
+
- \`input_options.preset\`: "approve_deny", "yes_no", or "continue_cancel"
|
|
37
|
+
- \`input_options.buttons\`: Array of { label, value, isApproval, style } for custom buttons
|
|
38
|
+
- \`input_options.allow_comment\`: Enable text input field
|
|
39
|
+
- \`input_options.comment_required\`: Require text input
|
|
40
|
+
- \`input_options.comment_placeholder\`: Placeholder text
|
|
41
|
+
- \`input_output_store\`: Store key to save user response { action, comment, timestamp, timedOut }
|
|
42
|
+
|
|
43
|
+
**branch** - Conditional routing
|
|
44
|
+
\`\`\`json
|
|
45
|
+
{ "conditions": [{"expression": "{{x}} === 'a'", "then": "step-a"}], "default": "step-default" }
|
|
46
|
+
\`\`\`
|
|
47
|
+
|
|
48
|
+
**invoke** - Call another recipe
|
|
49
|
+
\`\`\`json
|
|
50
|
+
{ "recipe_hash": "xyz", "input_mapping": {"target_input": "{{source_store}}"}, "output_mapping": {"target_output": "local_store"} }
|
|
51
|
+
\`\`\`
|
|
52
|
+
|
|
53
|
+
**Interpolation Syntax:**
|
|
54
|
+
- \`{{inputs.request}}\` - Access CLI task argument (user runs: \`flowdot alias "task text"\`)
|
|
55
|
+
- \`{{store_key}}\` - Reference any store value by its key
|
|
56
|
+
- \`{{stores.store_key}}\` - Explicit store access (same as above)
|
|
57
|
+
- \`{{step.step_id}}\` - Access output from a previous step`,
|
|
58
|
+
inputSchema: {
|
|
59
|
+
type: 'object',
|
|
60
|
+
properties: {
|
|
61
|
+
hash: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: 'The recipe hash/ID',
|
|
64
|
+
},
|
|
65
|
+
name: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
description: 'Name for the step',
|
|
68
|
+
},
|
|
69
|
+
type: {
|
|
70
|
+
type: 'string',
|
|
71
|
+
enum: ['agent', 'loop', 'parallel', 'gate', 'branch', 'invoke'],
|
|
72
|
+
description: 'Step type',
|
|
73
|
+
},
|
|
74
|
+
description: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
description: 'Description of what the step does',
|
|
77
|
+
},
|
|
78
|
+
config: {
|
|
79
|
+
type: 'object',
|
|
80
|
+
description: 'Step-specific configuration. Varies by type.',
|
|
81
|
+
additionalProperties: true,
|
|
82
|
+
},
|
|
83
|
+
next: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
description: 'ID of the next step to run on success',
|
|
86
|
+
},
|
|
87
|
+
on_error: {
|
|
88
|
+
type: 'string',
|
|
89
|
+
description: 'ID of the step to run on error',
|
|
90
|
+
},
|
|
91
|
+
position: {
|
|
92
|
+
type: 'object',
|
|
93
|
+
properties: {
|
|
94
|
+
x: { type: 'number' },
|
|
95
|
+
y: { type: 'number' },
|
|
96
|
+
},
|
|
97
|
+
description: 'Position on the visual canvas',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
required: ['hash', 'name', 'type'],
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
export async function handleAddRecipeStep(api, args) {
|
|
104
|
+
try {
|
|
105
|
+
const input = {
|
|
106
|
+
name: args.name,
|
|
107
|
+
type: args.type,
|
|
108
|
+
description: args.description,
|
|
109
|
+
config: args.config || {},
|
|
110
|
+
next: args.next,
|
|
111
|
+
on_error: args.on_error,
|
|
112
|
+
position: args.position,
|
|
113
|
+
};
|
|
114
|
+
const step = await api.addRecipeStep(args.hash, input);
|
|
115
|
+
let configInfo = '';
|
|
116
|
+
if (args.type === 'agent') {
|
|
117
|
+
configInfo = `
|
|
118
|
+
|
|
119
|
+
**Agent Configuration:**
|
|
120
|
+
Set the config object with:
|
|
121
|
+
- \`user_prompt\`: The prompt for the agent (REQUIRED - use this, NOT \`prompt\`)
|
|
122
|
+
- \`system_prompt\`: Optional system-level instructions
|
|
123
|
+
- \`model_tier\`: LLM model tier: "simple", "capable", or "complex" (optional)
|
|
124
|
+
- \`tools\`: Array of tool names to make available
|
|
125
|
+
- \`output_store\`: Store key to write agent output to
|
|
126
|
+
- \`max_iterations\`: Maximum iterations for the agent
|
|
127
|
+
|
|
128
|
+
**Interpolation in prompts:**
|
|
129
|
+
- Use \`{{inputs.request}}\` to access the CLI task argument
|
|
130
|
+
- Use \`{{store_key}}\` to reference store values`;
|
|
131
|
+
}
|
|
132
|
+
else if (args.type === 'loop') {
|
|
133
|
+
configInfo = `
|
|
134
|
+
|
|
135
|
+
**Loop Configuration:**
|
|
136
|
+
Set the config object with:
|
|
137
|
+
- \`loop_over\`: Store key containing the array to iterate over
|
|
138
|
+
- \`loop_variable\`: Store key to put each item in
|
|
139
|
+
- \`loop_step_id\`: Step ID to run for each iteration
|
|
140
|
+
- \`parallel\`: (optional) Execute iterations concurrently (default: false)
|
|
141
|
+
- \`max_concurrent\`: (optional) Limit concurrent executions when parallel=true`;
|
|
142
|
+
}
|
|
143
|
+
else if (args.type === 'branch') {
|
|
144
|
+
configInfo = `
|
|
145
|
+
|
|
146
|
+
**Branch Configuration:**
|
|
147
|
+
Set the config object with:
|
|
148
|
+
- \`conditions\`: Array of { expression, then } objects
|
|
149
|
+
- \`default\`: Step ID if no conditions match`;
|
|
150
|
+
}
|
|
151
|
+
else if (args.type === 'gate') {
|
|
152
|
+
configInfo = `
|
|
153
|
+
|
|
154
|
+
**Gate Configuration:**
|
|
155
|
+
Set the config object with:
|
|
156
|
+
- \`requires_approval\`: Boolean to require user input
|
|
157
|
+
- \`approval_prompt\`: Message to show the user
|
|
158
|
+
- \`condition\`: Optional expression to evaluate
|
|
159
|
+
- \`input_options\`: Rich input configuration object:
|
|
160
|
+
- \`button_mode\`: "preset" or "custom"
|
|
161
|
+
- \`preset\`: "approve_deny", "yes_no", or "continue_cancel"
|
|
162
|
+
- \`buttons\`: Array of { label, value, isApproval, style } for custom options
|
|
163
|
+
- \`allow_comment\`: Enable text input field
|
|
164
|
+
- \`comment_required\`: Require text input
|
|
165
|
+
- \`comment_placeholder\`: Placeholder text
|
|
166
|
+
- \`input_output_store\`: Store key to save { action, comment, timestamp, timedOut }`;
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
content: [
|
|
170
|
+
{
|
|
171
|
+
type: 'text',
|
|
172
|
+
text: `Step added successfully!
|
|
173
|
+
|
|
174
|
+
**Name:** ${step.name}
|
|
175
|
+
**Type:** ${step.type}
|
|
176
|
+
**ID:** ${step.id}
|
|
177
|
+
**Next:** ${step.next || 'None'}
|
|
178
|
+
**On Error:** ${step.on_error || 'None'}${configInfo}`,
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
catch (error) {
|
|
184
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
185
|
+
return {
|
|
186
|
+
content: [
|
|
187
|
+
{
|
|
188
|
+
type: 'text',
|
|
189
|
+
text: `Error adding step: ${message}`,
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
isError: true,
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=add-recipe-step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-recipe-step.js","sourceRoot":"","sources":["../../src/tools/add-recipe-step.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAM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AC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;QACzE,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,sBAAsB,OAAO,EAAE;iBACtC;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* add_recipe_store MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Adds a new store (variable) to a recipe.
|
|
5
|
+
*/
|
|
6
|
+
import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { FlowDotApiClient } from '../api-client.js';
|
|
8
|
+
export declare const addRecipeStoreTool: Tool;
|
|
9
|
+
export declare function handleAddRecipeStore(api: FlowDotApiClient, args: {
|
|
10
|
+
hash: string;
|
|
11
|
+
key: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
schema_type?: 'any' | 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
14
|
+
default_value?: unknown;
|
|
15
|
+
description?: string;
|
|
16
|
+
is_input?: boolean;
|
|
17
|
+
is_output?: boolean;
|
|
18
|
+
}): Promise<CallToolResult>;
|
|
19
|
+
//# sourceMappingURL=add-recipe-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-recipe-store.d.ts","sourceRoot":"","sources":["../../src/tools/add-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,kBAAkB,EAAE,IAmEhC,CAAC;AAEF,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IACJ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,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,CA2CzB"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* add_recipe_store MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Adds a new store (variable) to a recipe.
|
|
5
|
+
*/
|
|
6
|
+
export const addRecipeStoreTool = {
|
|
7
|
+
name: 'add_recipe_store',
|
|
8
|
+
description: `Add a new store (variable) to a recipe. Stores hold data that flows between steps.
|
|
9
|
+
|
|
10
|
+
**Store Types:**
|
|
11
|
+
- **Input stores** (is_input: true): Values user provides when running
|
|
12
|
+
- **Output stores** (is_output: true): Values returned after execution
|
|
13
|
+
- **Internal stores**: Temporary values used during execution
|
|
14
|
+
|
|
15
|
+
**IMPORTANT - The \`request\` Convention:**
|
|
16
|
+
When users run a recipe with a task argument like:
|
|
17
|
+
\`flowdot my-recipe "do something"\`
|
|
18
|
+
|
|
19
|
+
The CLI passes this as \`inputs.request\`. Therefore:
|
|
20
|
+
- **Name your primary input store \`request\`** to receive the task directly
|
|
21
|
+
- In prompts, use \`{{inputs.request}}\` to access the CLI task argument
|
|
22
|
+
- Example: \`add_recipe_store(key: "request", is_input: true)\`
|
|
23
|
+
|
|
24
|
+
**Using Stores in Steps:**
|
|
25
|
+
Reference stores in agent prompts, conditions, and mappings with \`{{store_key}}\` syntax:
|
|
26
|
+
- Agent prompt: \`"Analyze {{topic}} and write to {{output}}"\`
|
|
27
|
+
- Branch condition: \`"{{severity}} === 'high'"\`
|
|
28
|
+
- Gate approval: \`"Review findings:\\n{{findings}}"\`
|
|
29
|
+
|
|
30
|
+
**Agent Output:**
|
|
31
|
+
Set \`output_store\` in agent config to write results to a store.`,
|
|
32
|
+
inputSchema: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
hash: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: 'The recipe hash/ID',
|
|
38
|
+
},
|
|
39
|
+
key: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'Unique key for the store (used in expressions)',
|
|
42
|
+
},
|
|
43
|
+
label: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description: 'Human-readable label',
|
|
46
|
+
},
|
|
47
|
+
schema_type: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
enum: ['any', 'string', 'number', 'boolean', 'array', 'object'],
|
|
50
|
+
default: 'any',
|
|
51
|
+
description: 'Data type of the store',
|
|
52
|
+
},
|
|
53
|
+
default_value: {
|
|
54
|
+
description: 'Default value for the store',
|
|
55
|
+
},
|
|
56
|
+
description: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: "Description of the store's purpose",
|
|
59
|
+
},
|
|
60
|
+
is_input: {
|
|
61
|
+
type: 'boolean',
|
|
62
|
+
default: false,
|
|
63
|
+
description: 'If true, this is a required input when executing',
|
|
64
|
+
},
|
|
65
|
+
is_output: {
|
|
66
|
+
type: 'boolean',
|
|
67
|
+
default: false,
|
|
68
|
+
description: 'If true, this value is returned after execution',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
required: ['hash', 'key'],
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
export async function handleAddRecipeStore(api, args) {
|
|
75
|
+
try {
|
|
76
|
+
const input = {
|
|
77
|
+
key: args.key,
|
|
78
|
+
label: args.label,
|
|
79
|
+
schema_type: args.schema_type || 'any',
|
|
80
|
+
default_value: args.default_value,
|
|
81
|
+
description: args.description,
|
|
82
|
+
is_input: args.is_input || false,
|
|
83
|
+
is_output: args.is_output || false,
|
|
84
|
+
};
|
|
85
|
+
const store = await api.addRecipeStore(args.hash, input);
|
|
86
|
+
const storeType = store.is_input ? 'Input' : store.is_output ? 'Output' : 'Internal';
|
|
87
|
+
return {
|
|
88
|
+
content: [
|
|
89
|
+
{
|
|
90
|
+
type: 'text',
|
|
91
|
+
text: `Store added successfully!
|
|
92
|
+
|
|
93
|
+
**Key:** ${store.key}
|
|
94
|
+
**Type:** ${storeType} (${store.schema_type})
|
|
95
|
+
**ID:** ${store.id}
|
|
96
|
+
**Default Value:** ${store.default_value !== undefined ? JSON.stringify(store.default_value) : 'None'}
|
|
97
|
+
|
|
98
|
+
Use this store in expressions with: \`{{${store.key}}}\``,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
105
|
+
return {
|
|
106
|
+
content: [
|
|
107
|
+
{
|
|
108
|
+
type: 'text',
|
|
109
|
+
text: `Error adding store: ${message}`,
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
isError: true,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=add-recipe-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-recipe-store.js","sourceRoot":"","sources":["../../src/tools/add-recipe-store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,CAAC,MAAM,kBAAkB,GAAS;IACtC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;kEAuBmD;IAChE,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oBAAoB;aAClC;YACD,GAAG,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gDAAgD;aAC9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c,CAAC,CAoDzB;AAED,eAAO,MAAM,qBAAqB,EAAE,IAiEnC,CAAC;AAEF,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,cAAc,CAAC,CA8CzB;AAED,eAAO,MAAM,qBAAqB,EAAE,IAiEnC,CAAC;AAEF,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,cAAc,CAAC,CA0CzB;AAED,eAAO,MAAM,qBAAqB,EAAE,IAmBnC,CAAC;AAEF,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,cAAc,CAAC,CAsBzB"}
|
|
@@ -1258,7 +1258,9 @@ export const invokeToolkitToolTool = {
|
|
|
1258
1258
|
name: 'mcp__flowdot__invoke_toolkit_tool',
|
|
1259
1259
|
description: `Execute a tool from an installed toolkit.
|
|
1260
1260
|
|
|
1261
|
-
Runs the tool with provided inputs using your configured credentials
|
|
1261
|
+
Runs the tool with provided inputs using your configured credentials.
|
|
1262
|
+
|
|
1263
|
+
You can optionally pass credential_overrides to provide dynamic credentials (like tokens from a previous tool call).`,
|
|
1262
1264
|
inputSchema: {
|
|
1263
1265
|
type: 'object',
|
|
1264
1266
|
properties: {
|
|
@@ -1274,6 +1276,10 @@ Runs the tool with provided inputs using your configured credentials.`,
|
|
|
1274
1276
|
type: 'object',
|
|
1275
1277
|
description: 'Tool inputs (as defined by the tool\'s input schema)',
|
|
1276
1278
|
},
|
|
1279
|
+
credential_overrides: {
|
|
1280
|
+
type: 'object',
|
|
1281
|
+
description: 'Optional credential overrides (e.g., {"SCHWAB_ACCESS_TOKEN": "token_value"}). Use this to pass fresh tokens from a previous token refresh call.',
|
|
1282
|
+
},
|
|
1277
1283
|
},
|
|
1278
1284
|
required: ['installation_id', 'tool_name'],
|
|
1279
1285
|
},
|
|
@@ -1284,6 +1290,7 @@ export async function handleInvokeToolkitTool(api, args) {
|
|
|
1284
1290
|
installation_id: String(args.installation_id),
|
|
1285
1291
|
tool_name: String(args.tool_name),
|
|
1286
1292
|
inputs: args.inputs || {},
|
|
1293
|
+
credential_overrides: args.credential_overrides,
|
|
1287
1294
|
};
|
|
1288
1295
|
const result = await api.invokeToolkitTool(input);
|
|
1289
1296
|
if (!result.success) {
|