@flowdot.ai/mcp-server 1.0.0 → 1.0.1
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/LICENSE +21 -0
- package/README.md +162 -162
- package/bin/flowdot-mcp.js +15 -15
- package/dist/api-client.d.ts +214 -1
- package/dist/api-client.d.ts.map +1 -1
- package/dist/api-client.js +481 -1
- package/dist/api-client.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +8 -9
- package/dist/server.js.map +1 -1
- package/dist/tools/agent-toolkits.d.ts +57 -0
- package/dist/tools/agent-toolkits.d.ts.map +1 -0
- package/dist/tools/agent-toolkits.js +1705 -0
- package/dist/tools/agent-toolkits.js.map +1 -0
- package/dist/tools/append-app-code.d.ts +12 -0
- package/dist/tools/append-app-code.d.ts.map +1 -0
- package/dist/tools/append-app-code.js +83 -0
- package/dist/tools/append-app-code.js.map +1 -0
- package/dist/tools/clone-app.js +20 -20
- package/dist/tools/convert-app-to-multifile.d.ts +11 -0
- package/dist/tools/convert-app-to-multifile.d.ts.map +1 -0
- package/dist/tools/convert-app-to-multifile.js +69 -0
- package/dist/tools/convert-app-to-multifile.js.map +1 -0
- package/dist/tools/create-app-file.d.ts +11 -0
- package/dist/tools/create-app-file.d.ts.map +1 -0
- package/dist/tools/create-app-file.js +83 -0
- package/dist/tools/create-app-file.js.map +1 -0
- package/dist/tools/create-app.d.ts.map +1 -1
- package/dist/tools/create-app.js +47 -29
- package/dist/tools/create-app.js.map +1 -1
- package/dist/tools/create-knowledge-category.d.ts +16 -0
- package/dist/tools/create-knowledge-category.d.ts.map +1 -0
- package/dist/tools/create-knowledge-category.js +71 -0
- package/dist/tools/create-knowledge-category.js.map +1 -0
- package/dist/tools/delete-app-file.d.ts +11 -0
- package/dist/tools/delete-app-file.d.ts.map +1 -0
- package/dist/tools/delete-app-file.js +52 -0
- package/dist/tools/delete-app-file.js.map +1 -0
- package/dist/tools/delete-app.js +3 -3
- package/dist/tools/delete-knowledge-category.d.ts +12 -0
- package/dist/tools/delete-knowledge-category.d.ts.map +1 -0
- package/dist/tools/delete-knowledge-category.js +40 -0
- package/dist/tools/delete-knowledge-category.js.map +1 -0
- package/dist/tools/delete-knowledge-document.d.ts +12 -0
- package/dist/tools/delete-knowledge-document.d.ts.map +1 -0
- package/dist/tools/delete-knowledge-document.js +40 -0
- package/dist/tools/delete-knowledge-document.js.map +1 -0
- package/dist/tools/edit-app-code.d.ts +12 -0
- package/dist/tools/edit-app-code.d.ts.map +1 -0
- package/dist/tools/edit-app-code.js +110 -0
- package/dist/tools/edit-app-code.js.map +1 -0
- package/dist/tools/get-app-file.d.ts +11 -0
- package/dist/tools/get-app-file.d.ts.map +1 -0
- package/dist/tools/get-app-file.js +76 -0
- package/dist/tools/get-app-file.js.map +1 -0
- package/dist/tools/get-app-template.d.ts.map +1 -1
- package/dist/tools/get-app-template.js +65 -21
- package/dist/tools/get-app-template.js.map +1 -1
- package/dist/tools/get-app.js +54 -54
- package/dist/tools/get-knowledge-document.d.ts +12 -0
- package/dist/tools/get-knowledge-document.d.ts.map +1 -0
- package/dist/tools/get-knowledge-document.js +71 -0
- package/dist/tools/get-knowledge-document.js.map +1 -0
- package/dist/tools/get-knowledge-storage.d.ts +10 -0
- package/dist/tools/get-knowledge-storage.d.ts.map +1 -0
- package/dist/tools/get-knowledge-storage.js +54 -0
- package/dist/tools/get-knowledge-storage.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +214 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/insert-app-code.d.ts +12 -0
- package/dist/tools/insert-app-code.d.ts.map +1 -0
- package/dist/tools/insert-app-code.js +97 -0
- package/dist/tools/insert-app-code.js.map +1 -0
- package/dist/tools/link-app-workflow.js +21 -21
- package/dist/tools/list-app-files.d.ts +11 -0
- package/dist/tools/list-app-files.d.ts.map +1 -0
- package/dist/tools/list-app-files.js +84 -0
- package/dist/tools/list-app-files.js.map +1 -0
- package/dist/tools/list-apps.js +8 -8
- package/dist/tools/list-knowledge-categories.d.ts +14 -0
- package/dist/tools/list-knowledge-categories.d.ts.map +1 -0
- package/dist/tools/list-knowledge-categories.js +107 -0
- package/dist/tools/list-knowledge-categories.js.map +1 -0
- package/dist/tools/list-knowledge-documents.d.ts +15 -0
- package/dist/tools/list-knowledge-documents.d.ts.map +1 -0
- package/dist/tools/list-knowledge-documents.js +129 -0
- package/dist/tools/list-knowledge-documents.js.map +1 -0
- package/dist/tools/list-user-teams.d.ts +11 -0
- package/dist/tools/list-user-teams.d.ts.map +1 -0
- package/dist/tools/list-user-teams.js +56 -0
- package/dist/tools/list-user-teams.js.map +1 -0
- package/dist/tools/move-document-to-category.d.ts +13 -0
- package/dist/tools/move-document-to-category.d.ts.map +1 -0
- package/dist/tools/move-document-to-category.js +42 -0
- package/dist/tools/move-document-to-category.js.map +1 -0
- package/dist/tools/prepend-app-code.d.ts +12 -0
- package/dist/tools/prepend-app-code.d.ts.map +1 -0
- package/dist/tools/prepend-app-code.js +79 -0
- package/dist/tools/prepend-app-code.js.map +1 -0
- package/dist/tools/publish-app.js +7 -7
- package/dist/tools/query-knowledge-base.d.ts +18 -0
- package/dist/tools/query-knowledge-base.d.ts.map +1 -0
- package/dist/tools/query-knowledge-base.js +144 -0
- package/dist/tools/query-knowledge-base.js.map +1 -0
- package/dist/tools/rename-app-file.d.ts +11 -0
- package/dist/tools/rename-app-file.d.ts.map +1 -0
- package/dist/tools/rename-app-file.js +64 -0
- package/dist/tools/rename-app-file.js.map +1 -0
- package/dist/tools/reprocess-document.d.ts +12 -0
- package/dist/tools/reprocess-document.d.ts.map +1 -0
- package/dist/tools/reprocess-document.js +40 -0
- package/dist/tools/reprocess-document.js.map +1 -0
- package/dist/tools/search-apps.js +13 -13
- package/dist/tools/search.d.ts +14 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +86 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/set-app-entry-file.d.ts +11 -0
- package/dist/tools/set-app-entry-file.d.ts.map +1 -0
- package/dist/tools/set-app-entry-file.js +56 -0
- package/dist/tools/set-app-entry-file.js.map +1 -0
- package/dist/tools/transfer-document-ownership.d.ts +15 -0
- package/dist/tools/transfer-document-ownership.d.ts.map +1 -0
- package/dist/tools/transfer-document-ownership.js +66 -0
- package/dist/tools/transfer-document-ownership.js.map +1 -0
- package/dist/tools/unlink-app-workflow.js +2 -2
- package/dist/tools/unpublish-app.js +2 -2
- package/dist/tools/update-app-file.d.ts +11 -0
- package/dist/tools/update-app-file.d.ts.map +1 -0
- package/dist/tools/update-app-file.js +73 -0
- package/dist/tools/update-app-file.js.map +1 -0
- package/dist/tools/update-app.d.ts.map +1 -1
- package/dist/tools/update-app.js +8 -1
- package/dist/tools/update-app.js.map +1 -1
- package/dist/tools/update-knowledge-category.d.ts +15 -0
- package/dist/tools/update-knowledge-category.d.ts.map +1 -0
- package/dist/tools/update-knowledge-category.js +74 -0
- package/dist/tools/update-knowledge-category.js.map +1 -0
- package/dist/tools/upload-document-from-url.d.ts +16 -0
- package/dist/tools/upload-document-from-url.d.ts.map +1 -0
- package/dist/tools/upload-document-from-url.js +73 -0
- package/dist/tools/upload-document-from-url.js.map +1 -0
- package/dist/tools/upload-text-document.d.ts +17 -0
- package/dist/tools/upload-text-document.d.ts.map +1 -0
- package/dist/tools/upload-text-document.js +77 -0
- package/dist/tools/upload-text-document.js.map +1 -0
- package/dist/types.d.ts +426 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +54 -54
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query Knowledge Base Tool
|
|
3
|
+
*
|
|
4
|
+
* Performs RAG queries against the knowledge base to retrieve relevant document chunks.
|
|
5
|
+
* Supports filtering by team and controlling which document sources to include.
|
|
6
|
+
*/
|
|
7
|
+
export const queryKnowledgeBaseToolDef = {
|
|
8
|
+
name: 'query_knowledge_base',
|
|
9
|
+
description: 'Search your knowledge base using semantic and keyword search. Returns relevant document chunks with source attribution. Use this to find information from your uploaded documents. By default searches both personal and team documents.',
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
query: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'The search query - what information are you looking for?',
|
|
16
|
+
},
|
|
17
|
+
category_id: {
|
|
18
|
+
type: 'number',
|
|
19
|
+
description: 'Optional: Limit search to a specific category by ID',
|
|
20
|
+
},
|
|
21
|
+
team_id: {
|
|
22
|
+
type: 'number',
|
|
23
|
+
description: 'Optional: Limit search to a specific team\'s documents only. Use list_user_teams to see available teams.',
|
|
24
|
+
},
|
|
25
|
+
include_personal: {
|
|
26
|
+
type: 'boolean',
|
|
27
|
+
description: 'Optional: Include personal documents in the search. Default: true',
|
|
28
|
+
},
|
|
29
|
+
include_team: {
|
|
30
|
+
type: 'boolean',
|
|
31
|
+
description: 'Optional: Include team documents in the search. Default: true',
|
|
32
|
+
},
|
|
33
|
+
top_k: {
|
|
34
|
+
type: 'number',
|
|
35
|
+
description: 'Number of results to return (1-50, default: 5)',
|
|
36
|
+
minimum: 1,
|
|
37
|
+
maximum: 50,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
required: ['query'],
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
export async function handleQueryKnowledgeBase(api, args) {
|
|
44
|
+
try {
|
|
45
|
+
const response = await api.queryKnowledgeBase({
|
|
46
|
+
query: args.query,
|
|
47
|
+
category_id: args.category_id,
|
|
48
|
+
team_id: args.team_id,
|
|
49
|
+
include_personal: args.include_personal,
|
|
50
|
+
include_team: args.include_team,
|
|
51
|
+
top_k: args.top_k || 5,
|
|
52
|
+
});
|
|
53
|
+
if (response.result_count === 0) {
|
|
54
|
+
let tips = [
|
|
55
|
+
'Using different keywords',
|
|
56
|
+
'Checking if documents are fully processed (status: ready)',
|
|
57
|
+
'Removing category filters',
|
|
58
|
+
];
|
|
59
|
+
if (args.include_personal === false || args.include_team === false) {
|
|
60
|
+
tips.push('Including both personal and team documents');
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
content: [
|
|
64
|
+
{
|
|
65
|
+
type: 'text',
|
|
66
|
+
text: `No results found for query: "${args.query}"\n\nTry:\n${tips.map(t => `- ${t}`).join('\n')}`,
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
const lines = [
|
|
72
|
+
`## Knowledge Base Results (${response.result_count} matches)`,
|
|
73
|
+
'',
|
|
74
|
+
`**Query:** "${args.query}"`,
|
|
75
|
+
];
|
|
76
|
+
// Add filter info if any filters applied
|
|
77
|
+
const filters = [];
|
|
78
|
+
if (args.team_id)
|
|
79
|
+
filters.push(`Team ID: ${args.team_id}`);
|
|
80
|
+
if (args.category_id)
|
|
81
|
+
filters.push(`Category ID: ${args.category_id}`);
|
|
82
|
+
if (args.include_personal === false)
|
|
83
|
+
filters.push('Personal: excluded');
|
|
84
|
+
if (args.include_team === false)
|
|
85
|
+
filters.push('Team: excluded');
|
|
86
|
+
if (filters.length > 0) {
|
|
87
|
+
lines.push(`**Filters:** ${filters.join(', ')}`);
|
|
88
|
+
}
|
|
89
|
+
lines.push('');
|
|
90
|
+
// Track unique sources for citation
|
|
91
|
+
const sources = new Map();
|
|
92
|
+
for (let i = 0; i < response.results.length; i++) {
|
|
93
|
+
const result = response.results[i];
|
|
94
|
+
// Track source
|
|
95
|
+
sources.set(result.document_hash || result.document_title, {
|
|
96
|
+
title: result.document_title,
|
|
97
|
+
isTeam: result.is_team_document,
|
|
98
|
+
teamId: result.team_id ?? undefined,
|
|
99
|
+
});
|
|
100
|
+
// Calculate relevance indicator
|
|
101
|
+
let relevanceStr = '';
|
|
102
|
+
if (result.similarity !== null) {
|
|
103
|
+
const similarity = (result.similarity * 100).toFixed(0);
|
|
104
|
+
relevanceStr = ` (${similarity}% match)`;
|
|
105
|
+
}
|
|
106
|
+
else if (result.relevance !== null) {
|
|
107
|
+
relevanceStr = ` (relevance: ${result.relevance.toFixed(2)})`;
|
|
108
|
+
}
|
|
109
|
+
// Add team indicator if from team
|
|
110
|
+
const sourceLabel = result.is_team_document
|
|
111
|
+
? `"${result.document_title}" [Team]`
|
|
112
|
+
: `"${result.document_title}"`;
|
|
113
|
+
lines.push(`### Result ${i + 1} from ${sourceLabel}${relevanceStr}`);
|
|
114
|
+
lines.push('');
|
|
115
|
+
// Show the content (truncate if very long)
|
|
116
|
+
const content = result.content.length > 2000
|
|
117
|
+
? result.content.substring(0, 2000) + '... (truncated)'
|
|
118
|
+
: result.content;
|
|
119
|
+
lines.push(content);
|
|
120
|
+
lines.push('');
|
|
121
|
+
}
|
|
122
|
+
// Add sources footer
|
|
123
|
+
lines.push('---');
|
|
124
|
+
const personalSources = Array.from(sources.values()).filter(s => !s.isTeam);
|
|
125
|
+
const teamSources = Array.from(sources.values()).filter(s => s.isTeam);
|
|
126
|
+
if (personalSources.length > 0) {
|
|
127
|
+
lines.push(`**Personal Sources:** ${personalSources.map(s => s.title).join(', ')}`);
|
|
128
|
+
}
|
|
129
|
+
if (teamSources.length > 0) {
|
|
130
|
+
lines.push(`**Team Sources:** ${teamSources.map(s => s.title).join(', ')}`);
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
content: [{ type: 'text', text: lines.join('\n') }],
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
138
|
+
return {
|
|
139
|
+
content: [{ type: 'text', text: `Error querying knowledge base: ${message}` }],
|
|
140
|
+
isError: true,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=query-knowledge-base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-knowledge-base.js","sourceRoot":"","sources":["../../src/tools/query-knowledge-base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,CAA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,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,kCAAkC,OAAO,EAAE,EAAE,CAAC;YAC9E,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rename_app_file Tool
|
|
3
|
+
*
|
|
4
|
+
* Rename or move a 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 renameAppFileTool: Tool;
|
|
10
|
+
export declare function handleRenameAppFile(client: FlowDotApiClient, args: Record<string, unknown>): Promise<CallToolResult>;
|
|
11
|
+
//# sourceMappingURL=rename-app-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rename-app-file.d.ts","sourceRoot":"","sources":["../../src/tools/rename-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;AAEpD,eAAO,MAAM,iBAAiB,EAAE,IA+B/B,CAAC;AAEF,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,cAAc,CAAC,CA0BzB"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rename_app_file Tool
|
|
3
|
+
*
|
|
4
|
+
* Rename or move a file in a multi-file FlowDot app.
|
|
5
|
+
* Required scope: apps:manage
|
|
6
|
+
*/
|
|
7
|
+
export const renameAppFileTool = {
|
|
8
|
+
name: 'rename_app_file',
|
|
9
|
+
description: `Rename or move a file within a multi-file FlowDot app.
|
|
10
|
+
|
|
11
|
+
Changes the file's path while preserving its content. Can be used to:
|
|
12
|
+
- Rename a file (e.g., "Button.jsx" -> "PrimaryButton.jsx")
|
|
13
|
+
- Move to a different directory (e.g., "Button.jsx" -> "components/Button.jsx")
|
|
14
|
+
- Both rename and move at once
|
|
15
|
+
|
|
16
|
+
File constraints:
|
|
17
|
+
- Allowed extensions: jsx, js, tsx, ts, css, json, md
|
|
18
|
+
- No path traversal (../) allowed
|
|
19
|
+
- No hidden files (starting with .)`,
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: 'object',
|
|
22
|
+
properties: {
|
|
23
|
+
app_id: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'The app ID (hash)',
|
|
26
|
+
},
|
|
27
|
+
file_path: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'The current file path',
|
|
30
|
+
},
|
|
31
|
+
new_path: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'The new file path',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
required: ['app_id', 'file_path', 'new_path'],
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
export async function handleRenameAppFile(client, args) {
|
|
40
|
+
try {
|
|
41
|
+
const appId = String(args.app_id);
|
|
42
|
+
const filePath = String(args.file_path);
|
|
43
|
+
const newPath = String(args.new_path);
|
|
44
|
+
const result = await client.renameAppFile(appId, filePath, { new_path: newPath });
|
|
45
|
+
const text = `# File Renamed Successfully
|
|
46
|
+
|
|
47
|
+
**Old Path:** ${filePath}
|
|
48
|
+
**New Path:** ${result.path}
|
|
49
|
+
**App:** ${appId}
|
|
50
|
+
|
|
51
|
+
The file has been renamed/moved successfully.`;
|
|
52
|
+
return {
|
|
53
|
+
content: [{ type: 'text', text }],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
58
|
+
return {
|
|
59
|
+
content: [{ type: 'text', text: `Error renaming app file: ${message}` }],
|
|
60
|
+
isError: true,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=rename-app-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rename-app-file.js","sourceRoot":"","sources":["../../src/tools/rename-app-file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,CAAC,MAAM,iBAAiB,GAAS;IACrC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE;;;;;;;;;;oCAUqB;IAClC,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,uBAAuB;aACrC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mBAAmB;aACjC;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC;KAC9C;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,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;QACxC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEtC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;QAElF,MAAM,IAAI,GAAG;;gBAED,QAAQ;gBACR,MAAM,CAAC,IAAI;WAChB,KAAK;;8CAE8B,CAAC;QAE3C,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,4BAA4B,OAAO,EAAE,EAAE,CAAC;YACxE,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reprocess Document Tool
|
|
3
|
+
*
|
|
4
|
+
* Reprocesses a failed or pending document.
|
|
5
|
+
*/
|
|
6
|
+
import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { FlowDotApiClient } from '../api-client.js';
|
|
8
|
+
export declare const reprocessDocumentToolDef: Tool;
|
|
9
|
+
export declare function handleReprocessDocument(api: FlowDotApiClient, args: {
|
|
10
|
+
document_id: number;
|
|
11
|
+
}): Promise<CallToolResult>;
|
|
12
|
+
//# sourceMappingURL=reprocess-document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reprocess-document.d.ts","sourceRoot":"","sources":["../../src/tools/reprocess-document.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,wBAAwB,EAAE,IActC,CAAC;AAEF,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAC5B,OAAO,CAAC,cAAc,CAAC,CAmBzB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reprocess Document Tool
|
|
3
|
+
*
|
|
4
|
+
* Reprocesses a failed or pending document.
|
|
5
|
+
*/
|
|
6
|
+
export const reprocessDocumentToolDef = {
|
|
7
|
+
name: 'reprocess_document',
|
|
8
|
+
description: 'Reprocess a document that failed processing or is stuck in pending/processing status. Clears existing chunks and requeues for processing.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
document_id: {
|
|
13
|
+
type: 'number',
|
|
14
|
+
description: 'The ID of the document to reprocess',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
required: ['document_id'],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export async function handleReprocessDocument(api, args) {
|
|
21
|
+
try {
|
|
22
|
+
await api.reprocessDocument(args.document_id);
|
|
23
|
+
return {
|
|
24
|
+
content: [
|
|
25
|
+
{
|
|
26
|
+
type: 'text',
|
|
27
|
+
text: `Document ${args.document_id} queued for reprocessing.\n\nUse list_knowledge_documents or get_knowledge_document to check the status.`,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
34
|
+
return {
|
|
35
|
+
content: [{ type: 'text', text: `Error reprocessing document: ${message}` }],
|
|
36
|
+
isError: true,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=reprocess-document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reprocess-document.js","sourceRoot":"","sources":["../../src/tools/reprocess-document.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,CAAC,MAAM,wBAAwB,GAAS;IAC5C,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EACT,2IAA2I;IAC7I,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qCAAqC;aACnD;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,GAAqB,EACrB,IAA6B;IAE7B,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAE9C,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,YAAY,IAAI,CAAC,WAAW,0GAA0G;iBAC7I;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,gCAAgC,OAAO,EAAE,EAAE,CAAC;YAC5E,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export const searchAppsTool = {
|
|
8
8
|
name: 'search_apps',
|
|
9
|
-
description: `Search the FlowDot app marketplace for public apps created by other users.
|
|
10
|
-
|
|
11
|
-
Apps are React frontend applications that can optionally use workflows as backends. You can search by keywords, filter by category/tag, and sort results.
|
|
12
|
-
|
|
9
|
+
description: `Search the FlowDot app marketplace for public apps created by other users.
|
|
10
|
+
|
|
11
|
+
Apps are React frontend applications that can optionally use workflows as backends. You can search by keywords, filter by category/tag, and sort results.
|
|
12
|
+
|
|
13
13
|
Use this to discover reusable apps that can be cloned and customized.`,
|
|
14
14
|
inputSchema: {
|
|
15
15
|
type: 'object',
|
|
@@ -77,17 +77,17 @@ export async function handleSearchApps(client, args) {
|
|
|
77
77
|
if (app.is_featured)
|
|
78
78
|
badges.push('Featured');
|
|
79
79
|
const badgeStr = badges.length ? ` (${badges.join(', ')})` : '';
|
|
80
|
-
return `- **${app.name}** (${app.id})${badgeStr}
|
|
81
|
-
By: ${app.user_name || 'Unknown'}
|
|
82
|
-
${app.description || 'No description'}
|
|
83
|
-
Category: ${app.category || 'Uncategorized'} | Mobile: ${app.mobile_compatible ? 'Yes' : 'No'}
|
|
84
|
-
Upvotes: ${app.upvotes} | Executions: ${app.execution_count} | Clones: ${app.clone_count}
|
|
80
|
+
return `- **${app.name}** (${app.id})${badgeStr}
|
|
81
|
+
By: ${app.user_name || 'Unknown'}
|
|
82
|
+
${app.description || 'No description'}
|
|
83
|
+
Category: ${app.category || 'Uncategorized'} | Mobile: ${app.mobile_compatible ? 'Yes' : 'No'}
|
|
84
|
+
Upvotes: ${app.upvotes} | Executions: ${app.execution_count} | Clones: ${app.clone_count}
|
|
85
85
|
${tags ? `Tags: ${tags}` : ''}`;
|
|
86
86
|
});
|
|
87
|
-
const text = `Found ${result.total} public app(s) (page ${result.current_page}/${result.last_page}):
|
|
88
|
-
|
|
89
|
-
${appsInfo.join('\n\n')}
|
|
90
|
-
|
|
87
|
+
const text = `Found ${result.total} public app(s) (page ${result.current_page}/${result.last_page}):
|
|
88
|
+
|
|
89
|
+
${appsInfo.join('\n\n')}
|
|
90
|
+
|
|
91
91
|
Tip: Use get_app to see full details and code, or clone_app to copy to your library.`;
|
|
92
92
|
return {
|
|
93
93
|
content: [{ type: 'text', text }],
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* search MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* A general-purpose search tool for FlowDot resources.
|
|
5
|
+
*/
|
|
6
|
+
import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { FlowDotApiClient } from '../api-client.js';
|
|
8
|
+
export declare const searchTool: Tool;
|
|
9
|
+
export declare function handleSearch(api: FlowDotApiClient, args: {
|
|
10
|
+
query: string;
|
|
11
|
+
type?: 'workflow' | 'app' | 'custom_node';
|
|
12
|
+
page?: number;
|
|
13
|
+
}): Promise<CallToolResult>;
|
|
14
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAQpD,eAAO,MAAM,UAAU,EAAE,IAuBxB,CAAC;AAEF,wBAAsB,YAAY,CAChC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,aAAa,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAChF,OAAO,CAAC,cAAc,CAAC,CA+DzB"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* search MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* A general-purpose search tool for FlowDot resources.
|
|
5
|
+
*/
|
|
6
|
+
export const searchTool = {
|
|
7
|
+
name: 'search',
|
|
8
|
+
description: 'Search for resources like workflows, apps, and custom nodes within the FlowDot platform.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
query: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'Search query to match against resource name, description, or tags.',
|
|
15
|
+
},
|
|
16
|
+
type: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: "Optional: The type of resource to search for. Can be 'workflow', 'app', or 'custom_node'. If omitted, all types are searched.",
|
|
19
|
+
enum: ['workflow', 'app', 'custom_node'],
|
|
20
|
+
},
|
|
21
|
+
page: {
|
|
22
|
+
type: 'number',
|
|
23
|
+
description: 'Page number for pagination.',
|
|
24
|
+
default: 1,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: ['query'],
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
export async function handleSearch(api, args) {
|
|
31
|
+
const { query, type, page = 1 } = args;
|
|
32
|
+
try {
|
|
33
|
+
const searchPromises = [];
|
|
34
|
+
const typesToSearch = [];
|
|
35
|
+
if (!type || type === 'workflow') {
|
|
36
|
+
searchPromises.push(api.searchWorkflows(query, undefined, page));
|
|
37
|
+
typesToSearch.push('workflow');
|
|
38
|
+
}
|
|
39
|
+
if (!type || type === 'app') {
|
|
40
|
+
searchPromises.push(api.searchPublicApps({ q: query, page }));
|
|
41
|
+
typesToSearch.push('app');
|
|
42
|
+
}
|
|
43
|
+
if (!type || type === 'custom_node') {
|
|
44
|
+
searchPromises.push(api.searchPublicCustomNodes({ q: query, page }));
|
|
45
|
+
typesToSearch.push('custom_node');
|
|
46
|
+
}
|
|
47
|
+
const results = await Promise.allSettled(searchPromises);
|
|
48
|
+
let lines = [];
|
|
49
|
+
let totalResults = 0;
|
|
50
|
+
results.forEach((result, index) => {
|
|
51
|
+
if (result.status === 'fulfilled') {
|
|
52
|
+
const paginatedResult = result.value;
|
|
53
|
+
const items = Array.isArray(paginatedResult?.data) ? paginatedResult.data : [];
|
|
54
|
+
if (items.length > 0) {
|
|
55
|
+
const resourceType = typesToSearch[index];
|
|
56
|
+
lines.push(`### ${resourceType.charAt(0).toUpperCase() + resourceType.slice(1)}s`);
|
|
57
|
+
items.forEach(item => {
|
|
58
|
+
const visibility = ('is_public' in item && item.is_public) ? ' (public)' : '';
|
|
59
|
+
const desc = item.description ? ` - ${item.description}` : '';
|
|
60
|
+
lines.push(`- **${item.name}** (${item.id})${visibility}${desc}`);
|
|
61
|
+
});
|
|
62
|
+
lines.push('');
|
|
63
|
+
totalResults += items.length;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
if (totalResults === 0) {
|
|
68
|
+
return {
|
|
69
|
+
content: [{ type: 'text', text: `No results found for "${query}".` }],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
const header = `## Search Results for "${query}" (Page ${page})`;
|
|
73
|
+
lines.unshift(header, '');
|
|
74
|
+
return {
|
|
75
|
+
content: [{ type: 'text', text: lines.join('\n') }],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
80
|
+
return {
|
|
81
|
+
content: [{ type: 'text', text: `Error during search: ${message}` }],
|
|
82
|
+
isError: true,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,MAAM,CAAC,MAAM,UAAU,GAAS;IAC9B,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,0FAA0F;IACvG,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oEAAoE;aAClF;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+HAA+H;gBAC5I,IAAI,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE,aAAa,CAAC;aACzC;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ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MAAM,EAAE,IAAI,EAAE,yBAAyB,KAAK,IAAI,EAAE,CAAC;aACtE,CAAC;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,0BAA0B,KAAK,WAAW,IAAI,GAAG,CAAC;QACjE,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAE1B,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;SACpD,CAAC;IAEJ,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,wBAAwB,OAAO,EAAE,EAAE,CAAC;YACpE,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
8
|
+
import { FlowDotApiClient } from '../api-client.js';
|
|
9
|
+
export declare const setAppEntryFileTool: Tool;
|
|
10
|
+
export declare function handleSetAppEntryFile(client: FlowDotApiClient, args: Record<string, unknown>): Promise<CallToolResult>;
|
|
11
|
+
//# sourceMappingURL=set-app-entry-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-app-entry-file.d.ts","sourceRoot":"","sources":["../../src/tools/set-app-entry-file.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,mBAAmB,EAAE,IAyBjC,CAAC;AAEF,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,cAAc,CAAC,CAwBzB"}
|
|
@@ -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,MAAM,CAAC,MAAM,gCAAgC,GAAS;IACpD,IAAI,EAAE,6BAA6B;IACnC,WAAW,EACT,oKAAoK;IACtK,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,I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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',
|