nlook-mcp 1.0.62 → 1.0.63
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/dist/api-client.d.ts +134 -0
- package/dist/api-client.d.ts.map +1 -1
- package/dist/api-client.js +92 -0
- package/dist/index.js +655 -2
- package/package.json +2 -2
package/dist/api-client.d.ts
CHANGED
|
@@ -201,5 +201,139 @@ export declare class NLookAPIClient {
|
|
|
201
201
|
data?: TemplateConfig;
|
|
202
202
|
error?: string;
|
|
203
203
|
}>;
|
|
204
|
+
listWorkflows(): Promise<APIResponse<{
|
|
205
|
+
workflows: Array<{
|
|
206
|
+
id: number;
|
|
207
|
+
title: string;
|
|
208
|
+
description: string;
|
|
209
|
+
node_count: number;
|
|
210
|
+
created_at: string;
|
|
211
|
+
updated_at: string;
|
|
212
|
+
}>;
|
|
213
|
+
}>>;
|
|
214
|
+
getWorkflow(id: number): Promise<APIResponse<{
|
|
215
|
+
workflow: {
|
|
216
|
+
id: number;
|
|
217
|
+
title: string;
|
|
218
|
+
description: string;
|
|
219
|
+
viewport?: Record<string, number>;
|
|
220
|
+
nodes: Array<{
|
|
221
|
+
node_id: string;
|
|
222
|
+
node_type: string;
|
|
223
|
+
ref_id: number;
|
|
224
|
+
position_x: number;
|
|
225
|
+
position_y: number;
|
|
226
|
+
data?: Record<string, unknown>;
|
|
227
|
+
}>;
|
|
228
|
+
edges: Array<{
|
|
229
|
+
edge_id: string;
|
|
230
|
+
source_node_id: string;
|
|
231
|
+
target_node_id: string;
|
|
232
|
+
label?: string;
|
|
233
|
+
}>;
|
|
234
|
+
created_at: string;
|
|
235
|
+
updated_at: string;
|
|
236
|
+
};
|
|
237
|
+
}>>;
|
|
238
|
+
createWorkflow(data: {
|
|
239
|
+
title: string;
|
|
240
|
+
description?: string;
|
|
241
|
+
}): Promise<APIResponse<{
|
|
242
|
+
workflow: {
|
|
243
|
+
id: number;
|
|
244
|
+
title: string;
|
|
245
|
+
};
|
|
246
|
+
}>>;
|
|
247
|
+
updateWorkflow(id: number, data: {
|
|
248
|
+
title?: string;
|
|
249
|
+
description?: string;
|
|
250
|
+
nodes?: Array<Record<string, unknown>>;
|
|
251
|
+
edges?: Array<Record<string, unknown>>;
|
|
252
|
+
viewport?: Record<string, number>;
|
|
253
|
+
}): Promise<APIResponse<{
|
|
254
|
+
workflow: Record<string, unknown>;
|
|
255
|
+
}>>;
|
|
256
|
+
deleteWorkflow(id: number): Promise<APIResponse<{
|
|
257
|
+
success: boolean;
|
|
258
|
+
}>>;
|
|
259
|
+
listAgents(): Promise<APIResponse<{
|
|
260
|
+
agents: Array<{
|
|
261
|
+
id: number;
|
|
262
|
+
name: string;
|
|
263
|
+
description: string;
|
|
264
|
+
model: string;
|
|
265
|
+
tools?: string[];
|
|
266
|
+
tool_count: number;
|
|
267
|
+
created_at: string;
|
|
268
|
+
}>;
|
|
269
|
+
}>>;
|
|
270
|
+
getAgent(agentId: number): Promise<APIResponse<Record<string, unknown>>>;
|
|
271
|
+
createAgent(data: {
|
|
272
|
+
name: string;
|
|
273
|
+
description?: string;
|
|
274
|
+
model?: string;
|
|
275
|
+
system_prompt?: string;
|
|
276
|
+
temperature?: number;
|
|
277
|
+
max_tokens?: number;
|
|
278
|
+
tools?: string[];
|
|
279
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
280
|
+
updateAgent(agentId: number, data: Record<string, unknown>): Promise<APIResponse<Record<string, unknown>>>;
|
|
281
|
+
deleteAgent(agentId: number): Promise<APIResponse<{
|
|
282
|
+
success: boolean;
|
|
283
|
+
}>>;
|
|
284
|
+
listSkills(): Promise<APIResponse<{
|
|
285
|
+
skills: Array<{
|
|
286
|
+
id: number;
|
|
287
|
+
name: string;
|
|
288
|
+
description: string;
|
|
289
|
+
skill_type: string;
|
|
290
|
+
created_at: string;
|
|
291
|
+
}>;
|
|
292
|
+
}>>;
|
|
293
|
+
getSkill(skillId: number): Promise<APIResponse<Record<string, unknown>>>;
|
|
294
|
+
createSkill(data: {
|
|
295
|
+
name: string;
|
|
296
|
+
description?: string;
|
|
297
|
+
skill_type: string;
|
|
298
|
+
content?: string;
|
|
299
|
+
config?: Record<string, unknown>;
|
|
300
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
301
|
+
updateSkill(skillId: number, data: Record<string, unknown>): Promise<APIResponse<Record<string, unknown>>>;
|
|
302
|
+
deleteSkill(skillId: number): Promise<APIResponse<{
|
|
303
|
+
success: boolean;
|
|
304
|
+
}>>;
|
|
305
|
+
listSchedules(): Promise<APIResponse<{
|
|
306
|
+
schedules: Array<Record<string, unknown>>;
|
|
307
|
+
total: number;
|
|
308
|
+
}>>;
|
|
309
|
+
createSchedule(workflowId: number, data: {
|
|
310
|
+
name: string;
|
|
311
|
+
cron_expression: string;
|
|
312
|
+
execution_type?: string;
|
|
313
|
+
agent_id?: number;
|
|
314
|
+
endpoint_url?: string;
|
|
315
|
+
http_method?: string;
|
|
316
|
+
input?: Record<string, unknown>;
|
|
317
|
+
enabled?: boolean;
|
|
318
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
319
|
+
updateSchedule(workflowId: number, scheduleId: number, data: Record<string, unknown>): Promise<APIResponse<Record<string, unknown>>>;
|
|
320
|
+
deleteSchedule(workflowId: number, scheduleId: number): Promise<APIResponse<{
|
|
321
|
+
success: boolean;
|
|
322
|
+
}>>;
|
|
323
|
+
listRuns(): Promise<APIResponse<{
|
|
324
|
+
runs: Array<Record<string, unknown>>;
|
|
325
|
+
total: number;
|
|
326
|
+
}>>;
|
|
327
|
+
getRun(workflowId: number, runId: number): Promise<APIResponse<Record<string, unknown>>>;
|
|
328
|
+
startRun(workflowId: number, data: {
|
|
329
|
+
name?: string;
|
|
330
|
+
trigger_type?: string;
|
|
331
|
+
run_type?: string;
|
|
332
|
+
agent_id?: number;
|
|
333
|
+
input?: Record<string, unknown>;
|
|
334
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
335
|
+
deleteRun(workflowId: number, runId: number): Promise<APIResponse<{
|
|
336
|
+
success: boolean;
|
|
337
|
+
}>>;
|
|
204
338
|
}
|
|
205
339
|
//# sourceMappingURL=api-client.d.ts.map
|
package/dist/api-client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,qBAAqB,EACrB,qBAAqB,EACrB,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,qBAAqB,EACrB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,yBAAyB,EACzB,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,EACjB,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,yBAAyB,EACzB,sBAAsB,EACtB,SAAS,EACT,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,gCAAgC,EAChC,+BAA+B,EAC/B,gCAAgC,EAGhC,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,iBAAiB,EAEjB,6BAA6B,EAC7B,8BAA8B,EAC9B,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,YAAY,EACZ,cAAc,EACf,MAAM,YAAY,CAAC;AAkBpB;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAiB/D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGrD;AA+CD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA4BnD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EA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QlG,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC;QAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAIzF,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAIxF,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAIlM,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAG/F"}
|
package/dist/api-client.js
CHANGED
|
@@ -616,5 +616,97 @@ export class NLookAPIClient {
|
|
|
616
616
|
method: 'GET',
|
|
617
617
|
});
|
|
618
618
|
}
|
|
619
|
+
// ============================================================
|
|
620
|
+
// Workflow APIs
|
|
621
|
+
// ============================================================
|
|
622
|
+
async listWorkflows() {
|
|
623
|
+
return this.request('/api/v1/public/workflows');
|
|
624
|
+
}
|
|
625
|
+
async getWorkflow(id) {
|
|
626
|
+
return this.request(`/api/v1/public/workflows/${id}`);
|
|
627
|
+
}
|
|
628
|
+
async createWorkflow(data) {
|
|
629
|
+
return this.request('/api/v1/public/workflows', {
|
|
630
|
+
method: 'POST',
|
|
631
|
+
body: JSON.stringify(data),
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
async updateWorkflow(id, data) {
|
|
635
|
+
return this.request(`/api/v1/public/workflows/${id}`, {
|
|
636
|
+
method: 'PUT',
|
|
637
|
+
body: JSON.stringify(data),
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
async deleteWorkflow(id) {
|
|
641
|
+
return this.request(`/api/v1/public/workflows/${id}`, {
|
|
642
|
+
method: 'DELETE',
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
// ============================================================
|
|
646
|
+
// Agent APIs
|
|
647
|
+
// ============================================================
|
|
648
|
+
async listAgents() {
|
|
649
|
+
return this.request('/api/v1/agents');
|
|
650
|
+
}
|
|
651
|
+
async getAgent(agentId) {
|
|
652
|
+
return this.request(`/api/v1/agents/${agentId}`);
|
|
653
|
+
}
|
|
654
|
+
async createAgent(data) {
|
|
655
|
+
return this.request('/api/v1/agents', { method: 'POST', body: JSON.stringify(data) });
|
|
656
|
+
}
|
|
657
|
+
async updateAgent(agentId, data) {
|
|
658
|
+
return this.request(`/api/v1/agents/${agentId}`, { method: 'PUT', body: JSON.stringify(data) });
|
|
659
|
+
}
|
|
660
|
+
async deleteAgent(agentId) {
|
|
661
|
+
return this.request(`/api/v1/agents/${agentId}`, { method: 'DELETE' });
|
|
662
|
+
}
|
|
663
|
+
// ============================================================
|
|
664
|
+
// Skill APIs
|
|
665
|
+
// ============================================================
|
|
666
|
+
async listSkills() {
|
|
667
|
+
return this.request('/api/v1/skills');
|
|
668
|
+
}
|
|
669
|
+
async getSkill(skillId) {
|
|
670
|
+
return this.request(`/api/v1/skills/${skillId}`);
|
|
671
|
+
}
|
|
672
|
+
async createSkill(data) {
|
|
673
|
+
return this.request('/api/v1/skills', { method: 'POST', body: JSON.stringify(data) });
|
|
674
|
+
}
|
|
675
|
+
async updateSkill(skillId, data) {
|
|
676
|
+
return this.request(`/api/v1/skills/${skillId}`, { method: 'PUT', body: JSON.stringify(data) });
|
|
677
|
+
}
|
|
678
|
+
async deleteSkill(skillId) {
|
|
679
|
+
return this.request(`/api/v1/skills/${skillId}`, { method: 'DELETE' });
|
|
680
|
+
}
|
|
681
|
+
// ============================================================
|
|
682
|
+
// Schedule APIs
|
|
683
|
+
// ============================================================
|
|
684
|
+
async listSchedules() {
|
|
685
|
+
return this.request('/api/v1/workflow-schedules');
|
|
686
|
+
}
|
|
687
|
+
async createSchedule(workflowId, data) {
|
|
688
|
+
return this.request(`/api/v1/workflows/${workflowId}/schedules`, { method: 'POST', body: JSON.stringify(data) });
|
|
689
|
+
}
|
|
690
|
+
async updateSchedule(workflowId, scheduleId, data) {
|
|
691
|
+
return this.request(`/api/v1/workflows/${workflowId}/schedules/${scheduleId}`, { method: 'PUT', body: JSON.stringify(data) });
|
|
692
|
+
}
|
|
693
|
+
async deleteSchedule(workflowId, scheduleId) {
|
|
694
|
+
return this.request(`/api/v1/workflows/${workflowId}/schedules/${scheduleId}`, { method: 'DELETE' });
|
|
695
|
+
}
|
|
696
|
+
// ============================================================
|
|
697
|
+
// Run APIs
|
|
698
|
+
// ============================================================
|
|
699
|
+
async listRuns() {
|
|
700
|
+
return this.request('/api/v1/workflow-runs');
|
|
701
|
+
}
|
|
702
|
+
async getRun(workflowId, runId) {
|
|
703
|
+
return this.request(`/api/v1/workflows/${workflowId}/runs/${runId}`);
|
|
704
|
+
}
|
|
705
|
+
async startRun(workflowId, data) {
|
|
706
|
+
return this.request(`/api/v1/workflows/${workflowId}/runs`, { method: 'POST', body: JSON.stringify(data) });
|
|
707
|
+
}
|
|
708
|
+
async deleteRun(workflowId, runId) {
|
|
709
|
+
return this.request(`/api/v1/workflows/${workflowId}/runs/${runId}`, { method: 'DELETE' });
|
|
710
|
+
}
|
|
619
711
|
}
|
|
620
712
|
//# sourceMappingURL=api-client.js.map
|
package/dist/index.js
CHANGED
|
@@ -324,7 +324,7 @@ function registerTools() {
|
|
|
324
324
|
server.tool('append_to_document', 'Append content to an existing document. Use this to add AI session logs, notes, summaries, or references to a document. Great for maintaining context across AI conversations. Local file paths are automatically uploaded to Google Drive, and image URLs are automatically converted to markdown format.', {
|
|
325
325
|
document_id: z.coerce.number().describe('Document ID to append to'),
|
|
326
326
|
content: z.string().describe('Content to append in Markdown format. Use Markdown syntax: # heading, **bold**, - list. Do NOT use HTML tags. NEVER use tables (| syntax) - use bullet lists or sections instead.'),
|
|
327
|
-
entry_type: z.enum(['ai_session', 'note', 'summary', 'reference']).optional().describe('Entry type: ai_session (AI conversation), note (general note), summary (summary), reference (external reference)'),
|
|
327
|
+
entry_type: z.enum(['ai_session', 'note', 'summary', 'reference', 'evaluation']).optional().describe('Entry type: ai_session (AI conversation), note (general note), summary (summary), reference (external reference), evaluation (evaluation/feedback)'),
|
|
328
328
|
title: z.string().optional().describe('Optional title for the entry'),
|
|
329
329
|
linked_project_id: z.number().optional().describe('Link to another project/document'),
|
|
330
330
|
metadata: z.record(z.string(), z.unknown()).optional().describe('Additional metadata (session_id, ai_model, tags, etc.)'),
|
|
@@ -378,7 +378,7 @@ function registerTools() {
|
|
|
378
378
|
server.tool('list_document_entries', 'Get all entries appended to a document. Shows AI sessions, notes, summaries, and references.', {
|
|
379
379
|
document_id: z.coerce.number().describe('Document ID'),
|
|
380
380
|
limit: z.number().optional().describe('Maximum number of entries to return (default: 20)'),
|
|
381
|
-
entry_type: z.enum(['ai_session', 'note', 'summary', 'reference']).optional().describe('Filter by entry type'),
|
|
381
|
+
entry_type: z.enum(['ai_session', 'note', 'summary', 'reference', 'evaluation']).optional().describe('Filter by entry type'),
|
|
382
382
|
include_full_content: z.boolean().optional().describe('Include full content instead of preview (default: false)'),
|
|
383
383
|
}, async ({ document_id, limit, entry_type, include_full_content = false }) => {
|
|
384
384
|
try {
|
|
@@ -2111,6 +2111,659 @@ function registerTools() {
|
|
|
2111
2111
|
};
|
|
2112
2112
|
}
|
|
2113
2113
|
});
|
|
2114
|
+
// ============================================================
|
|
2115
|
+
// Workflow Tools
|
|
2116
|
+
// ============================================================
|
|
2117
|
+
// List Workflows
|
|
2118
|
+
server.tool('list_workflows', 'List all workflows for the current user', {}, async () => {
|
|
2119
|
+
try {
|
|
2120
|
+
const result = await client.listWorkflows();
|
|
2121
|
+
if (!result.success) {
|
|
2122
|
+
return {
|
|
2123
|
+
content: [{ type: 'text', text: `❌ Failed to list workflows: ${result.error || 'Unknown error'}` }],
|
|
2124
|
+
isError: true,
|
|
2125
|
+
};
|
|
2126
|
+
}
|
|
2127
|
+
const workflows = result.data?.workflows || [];
|
|
2128
|
+
if (workflows.length === 0) {
|
|
2129
|
+
return { content: [{ type: 'text', text: '📋 No workflows found.' }] };
|
|
2130
|
+
}
|
|
2131
|
+
const list = workflows.map((w, i) => `${i + 1}. **${w.title}** (ID: ${w.id})\n ${w.description || 'No description'}\n Nodes: ${w.node_count} | Updated: ${w.updated_at}`).join('\n\n');
|
|
2132
|
+
return { content: [{ type: 'text', text: `📋 Workflows (${workflows.length})\n\n${list}` }] };
|
|
2133
|
+
}
|
|
2134
|
+
catch (error) {
|
|
2135
|
+
return {
|
|
2136
|
+
content: [{ type: 'text', text: `❌ Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2137
|
+
isError: true,
|
|
2138
|
+
};
|
|
2139
|
+
}
|
|
2140
|
+
});
|
|
2141
|
+
// Get Workflow
|
|
2142
|
+
server.tool('get_workflow', 'Get workflow details with all nodes and edges', {
|
|
2143
|
+
workflow_id: z.number().describe('Workflow ID'),
|
|
2144
|
+
}, async ({ workflow_id }) => {
|
|
2145
|
+
try {
|
|
2146
|
+
const result = await client.getWorkflow(workflow_id);
|
|
2147
|
+
if (!result.success) {
|
|
2148
|
+
return {
|
|
2149
|
+
content: [{ type: 'text', text: `❌ Workflow not found: ${result.error || 'Unknown error'}` }],
|
|
2150
|
+
isError: true,
|
|
2151
|
+
};
|
|
2152
|
+
}
|
|
2153
|
+
const w = result.data?.workflow;
|
|
2154
|
+
if (!w) {
|
|
2155
|
+
return {
|
|
2156
|
+
content: [{ type: 'text', text: '❌ Workflow not found' }],
|
|
2157
|
+
isError: true,
|
|
2158
|
+
};
|
|
2159
|
+
}
|
|
2160
|
+
const nodes = w.nodes?.map(n => ` - [${n.node_type}] ${n.node_id} → ref:${n.ref_id} ${n.data?.title || ''}`).join('\n') || ' (none)';
|
|
2161
|
+
const edges = w.edges?.map(e => ` - ${e.source_node_id} → ${e.target_node_id} ${e.label ? `(${e.label})` : ''}`).join('\n') || ' (none)';
|
|
2162
|
+
return {
|
|
2163
|
+
content: [{
|
|
2164
|
+
type: 'text',
|
|
2165
|
+
text: `🔀 **${w.title}** (ID: ${w.id})\n${w.description || ''}\n\n**Nodes:**\n${nodes}\n\n**Edges:**\n${edges}`,
|
|
2166
|
+
}],
|
|
2167
|
+
};
|
|
2168
|
+
}
|
|
2169
|
+
catch (error) {
|
|
2170
|
+
return {
|
|
2171
|
+
content: [{ type: 'text', text: `❌ Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2172
|
+
isError: true,
|
|
2173
|
+
};
|
|
2174
|
+
}
|
|
2175
|
+
});
|
|
2176
|
+
// Create Workflow
|
|
2177
|
+
server.tool('create_workflow', 'Create a new workflow', {
|
|
2178
|
+
title: z.string().describe('Workflow title'),
|
|
2179
|
+
description: z.string().optional().describe('Workflow description'),
|
|
2180
|
+
}, async ({ title, description }) => {
|
|
2181
|
+
try {
|
|
2182
|
+
const result = await client.createWorkflow({ title, description });
|
|
2183
|
+
if (!result.success) {
|
|
2184
|
+
return {
|
|
2185
|
+
content: [{ type: 'text', text: `❌ Failed to create workflow: ${result.error || 'Unknown error'}` }],
|
|
2186
|
+
isError: true,
|
|
2187
|
+
};
|
|
2188
|
+
}
|
|
2189
|
+
const w = result.data?.workflow;
|
|
2190
|
+
return {
|
|
2191
|
+
content: [{ type: 'text', text: `✅ Workflow created: **${w?.title}** (ID: ${w?.id})` }],
|
|
2192
|
+
};
|
|
2193
|
+
}
|
|
2194
|
+
catch (error) {
|
|
2195
|
+
return {
|
|
2196
|
+
content: [{ type: 'text', text: `❌ Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2197
|
+
isError: true,
|
|
2198
|
+
};
|
|
2199
|
+
}
|
|
2200
|
+
});
|
|
2201
|
+
// Update Workflow
|
|
2202
|
+
server.tool('update_workflow', 'Update workflow metadata (title, description)', {
|
|
2203
|
+
workflow_id: z.number().describe('Workflow ID'),
|
|
2204
|
+
title: z.string().optional().describe('New title'),
|
|
2205
|
+
description: z.string().optional().describe('New description'),
|
|
2206
|
+
}, async ({ workflow_id, title, description }) => {
|
|
2207
|
+
try {
|
|
2208
|
+
const data = {};
|
|
2209
|
+
if (title !== undefined)
|
|
2210
|
+
data.title = title;
|
|
2211
|
+
if (description !== undefined)
|
|
2212
|
+
data.description = description;
|
|
2213
|
+
const result = await client.updateWorkflow(workflow_id, data);
|
|
2214
|
+
if (!result.success) {
|
|
2215
|
+
return {
|
|
2216
|
+
content: [{ type: 'text', text: `❌ Failed to update workflow: ${result.error || 'Unknown error'}` }],
|
|
2217
|
+
isError: true,
|
|
2218
|
+
};
|
|
2219
|
+
}
|
|
2220
|
+
return {
|
|
2221
|
+
content: [{ type: 'text', text: `✅ Workflow ${workflow_id} updated` }],
|
|
2222
|
+
};
|
|
2223
|
+
}
|
|
2224
|
+
catch (error) {
|
|
2225
|
+
return {
|
|
2226
|
+
content: [{ type: 'text', text: `❌ Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2227
|
+
isError: true,
|
|
2228
|
+
};
|
|
2229
|
+
}
|
|
2230
|
+
});
|
|
2231
|
+
// Delete Workflow
|
|
2232
|
+
server.tool('delete_workflow', 'Delete a workflow', {
|
|
2233
|
+
workflow_id: z.number().describe('Workflow ID'),
|
|
2234
|
+
}, async ({ workflow_id }) => {
|
|
2235
|
+
try {
|
|
2236
|
+
const result = await client.deleteWorkflow(workflow_id);
|
|
2237
|
+
if (!result.success) {
|
|
2238
|
+
return {
|
|
2239
|
+
content: [{ type: 'text', text: `❌ Failed to delete workflow: ${result.error || 'Unknown error'}` }],
|
|
2240
|
+
isError: true,
|
|
2241
|
+
};
|
|
2242
|
+
}
|
|
2243
|
+
return {
|
|
2244
|
+
content: [{ type: 'text', text: `🗑️ Workflow ${workflow_id} deleted` }],
|
|
2245
|
+
};
|
|
2246
|
+
}
|
|
2247
|
+
catch (error) {
|
|
2248
|
+
return {
|
|
2249
|
+
content: [{ type: 'text', text: `❌ Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2250
|
+
isError: true,
|
|
2251
|
+
};
|
|
2252
|
+
}
|
|
2253
|
+
});
|
|
2254
|
+
// ============================================================
|
|
2255
|
+
// Agent Tools
|
|
2256
|
+
// ============================================================
|
|
2257
|
+
// List Agents
|
|
2258
|
+
server.tool('list_agents', 'List all AI agents. Returns agent name, model, description, and tools.', {}, async () => {
|
|
2259
|
+
try {
|
|
2260
|
+
const result = await client.listAgents();
|
|
2261
|
+
if (!result.success) {
|
|
2262
|
+
return {
|
|
2263
|
+
content: [{ type: 'text', text: `Failed to list agents: ${result.error || 'Unknown error'}` }],
|
|
2264
|
+
isError: true,
|
|
2265
|
+
};
|
|
2266
|
+
}
|
|
2267
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2268
|
+
}
|
|
2269
|
+
catch (error) {
|
|
2270
|
+
return {
|
|
2271
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2272
|
+
isError: true,
|
|
2273
|
+
};
|
|
2274
|
+
}
|
|
2275
|
+
});
|
|
2276
|
+
// Get Agent
|
|
2277
|
+
server.tool('get_agent', 'Get detailed information about a specific AI agent including system prompt, model config, and assigned tools.', {
|
|
2278
|
+
agent_id: z.number().describe('Agent ID'),
|
|
2279
|
+
}, async ({ agent_id }) => {
|
|
2280
|
+
try {
|
|
2281
|
+
const result = await client.getAgent(agent_id);
|
|
2282
|
+
if (!result.success) {
|
|
2283
|
+
return {
|
|
2284
|
+
content: [{ type: 'text', text: `Agent not found: ${result.error || 'Unknown error'}` }],
|
|
2285
|
+
isError: true,
|
|
2286
|
+
};
|
|
2287
|
+
}
|
|
2288
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2289
|
+
}
|
|
2290
|
+
catch (error) {
|
|
2291
|
+
return {
|
|
2292
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2293
|
+
isError: true,
|
|
2294
|
+
};
|
|
2295
|
+
}
|
|
2296
|
+
});
|
|
2297
|
+
// Create Agent
|
|
2298
|
+
server.tool('create_agent', 'Create a new AI agent with a name, model, system prompt, and optional tools.', {
|
|
2299
|
+
name: z.string().describe('Agent name'),
|
|
2300
|
+
description: z.string().optional().describe('Agent description'),
|
|
2301
|
+
model: z.string().optional().default('gpt-4o').describe('LLM model to use'),
|
|
2302
|
+
system_prompt: z.string().optional().describe('System prompt for the agent'),
|
|
2303
|
+
temperature: z.number().optional().describe('Temperature (0-2)'),
|
|
2304
|
+
max_tokens: z.number().optional().describe('Max tokens for responses'),
|
|
2305
|
+
tools: z.array(z.string()).optional().describe('List of tool names to assign'),
|
|
2306
|
+
}, async ({ name, description, model, system_prompt, temperature, max_tokens, tools }) => {
|
|
2307
|
+
try {
|
|
2308
|
+
const data = { name };
|
|
2309
|
+
if (description !== undefined)
|
|
2310
|
+
data.description = description;
|
|
2311
|
+
if (model !== undefined)
|
|
2312
|
+
data.model = model;
|
|
2313
|
+
if (system_prompt !== undefined)
|
|
2314
|
+
data.system_prompt = system_prompt;
|
|
2315
|
+
if (temperature !== undefined)
|
|
2316
|
+
data.temperature = temperature;
|
|
2317
|
+
if (max_tokens !== undefined)
|
|
2318
|
+
data.max_tokens = max_tokens;
|
|
2319
|
+
if (tools !== undefined)
|
|
2320
|
+
data.tools = tools;
|
|
2321
|
+
const result = await client.createAgent(data);
|
|
2322
|
+
if (!result.success) {
|
|
2323
|
+
return {
|
|
2324
|
+
content: [{ type: 'text', text: `Failed to create agent: ${result.error || 'Unknown error'}` }],
|
|
2325
|
+
isError: true,
|
|
2326
|
+
};
|
|
2327
|
+
}
|
|
2328
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2329
|
+
}
|
|
2330
|
+
catch (error) {
|
|
2331
|
+
return {
|
|
2332
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2333
|
+
isError: true,
|
|
2334
|
+
};
|
|
2335
|
+
}
|
|
2336
|
+
});
|
|
2337
|
+
// Update Agent
|
|
2338
|
+
server.tool('update_agent', 'Update an existing AI agent. Only provided fields will be changed.', {
|
|
2339
|
+
agent_id: z.number().describe('Agent ID'),
|
|
2340
|
+
name: z.string().optional().describe('New agent name'),
|
|
2341
|
+
description: z.string().optional().describe('New description'),
|
|
2342
|
+
model: z.string().optional().describe('New LLM model'),
|
|
2343
|
+
system_prompt: z.string().optional().describe('New system prompt'),
|
|
2344
|
+
temperature: z.number().optional().describe('New temperature'),
|
|
2345
|
+
max_tokens: z.number().optional().describe('New max tokens'),
|
|
2346
|
+
tools: z.array(z.string()).optional().describe('New tool list'),
|
|
2347
|
+
}, async ({ agent_id, name, description, model, system_prompt, temperature, max_tokens, tools }) => {
|
|
2348
|
+
try {
|
|
2349
|
+
const data = {};
|
|
2350
|
+
if (name !== undefined)
|
|
2351
|
+
data.name = name;
|
|
2352
|
+
if (description !== undefined)
|
|
2353
|
+
data.description = description;
|
|
2354
|
+
if (model !== undefined)
|
|
2355
|
+
data.model = model;
|
|
2356
|
+
if (system_prompt !== undefined)
|
|
2357
|
+
data.system_prompt = system_prompt;
|
|
2358
|
+
if (temperature !== undefined)
|
|
2359
|
+
data.temperature = temperature;
|
|
2360
|
+
if (max_tokens !== undefined)
|
|
2361
|
+
data.max_tokens = max_tokens;
|
|
2362
|
+
if (tools !== undefined)
|
|
2363
|
+
data.tools = tools;
|
|
2364
|
+
const result = await client.updateAgent(agent_id, data);
|
|
2365
|
+
if (!result.success) {
|
|
2366
|
+
return {
|
|
2367
|
+
content: [{ type: 'text', text: `Failed to update agent: ${result.error || 'Unknown error'}` }],
|
|
2368
|
+
isError: true,
|
|
2369
|
+
};
|
|
2370
|
+
}
|
|
2371
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2372
|
+
}
|
|
2373
|
+
catch (error) {
|
|
2374
|
+
return {
|
|
2375
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2376
|
+
isError: true,
|
|
2377
|
+
};
|
|
2378
|
+
}
|
|
2379
|
+
});
|
|
2380
|
+
// Delete Agent
|
|
2381
|
+
server.tool('delete_agent', 'Delete an AI agent by ID.', {
|
|
2382
|
+
agent_id: z.number().describe('Agent ID'),
|
|
2383
|
+
}, async ({ agent_id }) => {
|
|
2384
|
+
try {
|
|
2385
|
+
const result = await client.deleteAgent(agent_id);
|
|
2386
|
+
if (!result.success) {
|
|
2387
|
+
return {
|
|
2388
|
+
content: [{ type: 'text', text: `Failed to delete agent: ${result.error || 'Unknown error'}` }],
|
|
2389
|
+
isError: true,
|
|
2390
|
+
};
|
|
2391
|
+
}
|
|
2392
|
+
return { content: [{ type: 'text', text: `Agent ${agent_id} deleted successfully.` }] };
|
|
2393
|
+
}
|
|
2394
|
+
catch (error) {
|
|
2395
|
+
return {
|
|
2396
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2397
|
+
isError: true,
|
|
2398
|
+
};
|
|
2399
|
+
}
|
|
2400
|
+
});
|
|
2401
|
+
// ============================================================
|
|
2402
|
+
// Skill Tools
|
|
2403
|
+
// ============================================================
|
|
2404
|
+
// List Skills
|
|
2405
|
+
server.tool('list_skills', 'List all skills. Returns skill name, type, and description.', {}, async () => {
|
|
2406
|
+
try {
|
|
2407
|
+
const result = await client.listSkills();
|
|
2408
|
+
if (!result.success) {
|
|
2409
|
+
return {
|
|
2410
|
+
content: [{ type: 'text', text: `Failed to list skills: ${result.error || 'Unknown error'}` }],
|
|
2411
|
+
isError: true,
|
|
2412
|
+
};
|
|
2413
|
+
}
|
|
2414
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2415
|
+
}
|
|
2416
|
+
catch (error) {
|
|
2417
|
+
return {
|
|
2418
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2419
|
+
isError: true,
|
|
2420
|
+
};
|
|
2421
|
+
}
|
|
2422
|
+
});
|
|
2423
|
+
// Get Skill
|
|
2424
|
+
server.tool('get_skill', 'Get detailed information about a specific skill including its content and configuration.', {
|
|
2425
|
+
skill_id: z.number().describe('Skill ID'),
|
|
2426
|
+
}, async ({ skill_id }) => {
|
|
2427
|
+
try {
|
|
2428
|
+
const result = await client.getSkill(skill_id);
|
|
2429
|
+
if (!result.success) {
|
|
2430
|
+
return {
|
|
2431
|
+
content: [{ type: 'text', text: `Skill not found: ${result.error || 'Unknown error'}` }],
|
|
2432
|
+
isError: true,
|
|
2433
|
+
};
|
|
2434
|
+
}
|
|
2435
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2436
|
+
}
|
|
2437
|
+
catch (error) {
|
|
2438
|
+
return {
|
|
2439
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2440
|
+
isError: true,
|
|
2441
|
+
};
|
|
2442
|
+
}
|
|
2443
|
+
});
|
|
2444
|
+
// Create Skill
|
|
2445
|
+
server.tool('create_skill', 'Create a new skill with a type (prompt, tool, api, or mcp) and optional content/config.', {
|
|
2446
|
+
name: z.string().describe('Skill name'),
|
|
2447
|
+
skill_type: z.enum(['prompt', 'tool', 'api', 'mcp']).describe('Skill type'),
|
|
2448
|
+
content: z.string().optional().describe('Skill content (e.g., prompt text, tool code)'),
|
|
2449
|
+
description: z.string().optional().describe('Skill description'),
|
|
2450
|
+
config: z.record(z.string(), z.unknown()).optional().describe('Additional configuration'),
|
|
2451
|
+
}, async ({ name, skill_type, content, description, config }) => {
|
|
2452
|
+
try {
|
|
2453
|
+
const data = { name, skill_type };
|
|
2454
|
+
if (content !== undefined)
|
|
2455
|
+
data.content = content;
|
|
2456
|
+
if (description !== undefined)
|
|
2457
|
+
data.description = description;
|
|
2458
|
+
if (config !== undefined)
|
|
2459
|
+
data.config = config;
|
|
2460
|
+
const result = await client.createSkill(data);
|
|
2461
|
+
if (!result.success) {
|
|
2462
|
+
return {
|
|
2463
|
+
content: [{ type: 'text', text: `Failed to create skill: ${result.error || 'Unknown error'}` }],
|
|
2464
|
+
isError: true,
|
|
2465
|
+
};
|
|
2466
|
+
}
|
|
2467
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2468
|
+
}
|
|
2469
|
+
catch (error) {
|
|
2470
|
+
return {
|
|
2471
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2472
|
+
isError: true,
|
|
2473
|
+
};
|
|
2474
|
+
}
|
|
2475
|
+
});
|
|
2476
|
+
// Update Skill
|
|
2477
|
+
server.tool('update_skill', 'Update an existing skill. Only provided fields will be changed.', {
|
|
2478
|
+
skill_id: z.number().describe('Skill ID'),
|
|
2479
|
+
name: z.string().optional().describe('New skill name'),
|
|
2480
|
+
skill_type: z.enum(['prompt', 'tool', 'api', 'mcp']).optional().describe('New skill type'),
|
|
2481
|
+
content: z.string().optional().describe('New content'),
|
|
2482
|
+
description: z.string().optional().describe('New description'),
|
|
2483
|
+
config: z.record(z.string(), z.unknown()).optional().describe('New configuration'),
|
|
2484
|
+
}, async ({ skill_id, name, skill_type, content, description, config }) => {
|
|
2485
|
+
try {
|
|
2486
|
+
const data = {};
|
|
2487
|
+
if (name !== undefined)
|
|
2488
|
+
data.name = name;
|
|
2489
|
+
if (skill_type !== undefined)
|
|
2490
|
+
data.skill_type = skill_type;
|
|
2491
|
+
if (content !== undefined)
|
|
2492
|
+
data.content = content;
|
|
2493
|
+
if (description !== undefined)
|
|
2494
|
+
data.description = description;
|
|
2495
|
+
if (config !== undefined)
|
|
2496
|
+
data.config = config;
|
|
2497
|
+
const result = await client.updateSkill(skill_id, data);
|
|
2498
|
+
if (!result.success) {
|
|
2499
|
+
return {
|
|
2500
|
+
content: [{ type: 'text', text: `Failed to update skill: ${result.error || 'Unknown error'}` }],
|
|
2501
|
+
isError: true,
|
|
2502
|
+
};
|
|
2503
|
+
}
|
|
2504
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2505
|
+
}
|
|
2506
|
+
catch (error) {
|
|
2507
|
+
return {
|
|
2508
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2509
|
+
isError: true,
|
|
2510
|
+
};
|
|
2511
|
+
}
|
|
2512
|
+
});
|
|
2513
|
+
// Delete Skill
|
|
2514
|
+
server.tool('delete_skill', 'Delete a skill by ID.', {
|
|
2515
|
+
skill_id: z.number().describe('Skill ID'),
|
|
2516
|
+
}, async ({ skill_id }) => {
|
|
2517
|
+
try {
|
|
2518
|
+
const result = await client.deleteSkill(skill_id);
|
|
2519
|
+
if (!result.success) {
|
|
2520
|
+
return {
|
|
2521
|
+
content: [{ type: 'text', text: `Failed to delete skill: ${result.error || 'Unknown error'}` }],
|
|
2522
|
+
isError: true,
|
|
2523
|
+
};
|
|
2524
|
+
}
|
|
2525
|
+
return { content: [{ type: 'text', text: `Skill ${skill_id} deleted successfully.` }] };
|
|
2526
|
+
}
|
|
2527
|
+
catch (error) {
|
|
2528
|
+
return {
|
|
2529
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2530
|
+
isError: true,
|
|
2531
|
+
};
|
|
2532
|
+
}
|
|
2533
|
+
});
|
|
2534
|
+
// ============================================================
|
|
2535
|
+
// Schedule Tools
|
|
2536
|
+
// ============================================================
|
|
2537
|
+
// List Schedules
|
|
2538
|
+
server.tool('list_schedules', 'List all workflow schedules with their cron expressions and status.', {}, async () => {
|
|
2539
|
+
try {
|
|
2540
|
+
const result = await client.listSchedules();
|
|
2541
|
+
if (!result.success) {
|
|
2542
|
+
return {
|
|
2543
|
+
content: [{ type: 'text', text: `Failed to list schedules: ${result.error || 'Unknown error'}` }],
|
|
2544
|
+
isError: true,
|
|
2545
|
+
};
|
|
2546
|
+
}
|
|
2547
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2548
|
+
}
|
|
2549
|
+
catch (error) {
|
|
2550
|
+
return {
|
|
2551
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2552
|
+
isError: true,
|
|
2553
|
+
};
|
|
2554
|
+
}
|
|
2555
|
+
});
|
|
2556
|
+
// Create Schedule
|
|
2557
|
+
server.tool('create_schedule', 'Create a new workflow schedule with a cron expression. Supports workflow, agent, or API execution types.', {
|
|
2558
|
+
workflow_id: z.number().describe('Workflow ID to schedule'),
|
|
2559
|
+
name: z.string().describe('Schedule name'),
|
|
2560
|
+
cron_expression: z.string().describe('Cron expression (e.g., "0 9 * * 1-5" for weekdays at 9am)'),
|
|
2561
|
+
execution_type: z.enum(['workflow', 'agent', 'api']).optional().describe('Execution type'),
|
|
2562
|
+
agent_id: z.number().optional().describe('Agent ID (required for agent execution type)'),
|
|
2563
|
+
endpoint_url: z.string().optional().describe('Endpoint URL (for API execution type)'),
|
|
2564
|
+
http_method: z.string().optional().describe('HTTP method (for API execution type)'),
|
|
2565
|
+
input: z.record(z.string(), z.unknown()).optional().describe('Input data for the schedule'),
|
|
2566
|
+
enabled: z.boolean().optional().describe('Whether the schedule is enabled'),
|
|
2567
|
+
}, async ({ workflow_id, name, cron_expression, execution_type, agent_id, endpoint_url, http_method, input, enabled }) => {
|
|
2568
|
+
try {
|
|
2569
|
+
const data = { name, cron_expression };
|
|
2570
|
+
if (execution_type !== undefined)
|
|
2571
|
+
data.execution_type = execution_type;
|
|
2572
|
+
if (agent_id !== undefined)
|
|
2573
|
+
data.agent_id = agent_id;
|
|
2574
|
+
if (endpoint_url !== undefined)
|
|
2575
|
+
data.endpoint_url = endpoint_url;
|
|
2576
|
+
if (http_method !== undefined)
|
|
2577
|
+
data.http_method = http_method;
|
|
2578
|
+
if (input !== undefined)
|
|
2579
|
+
data.input = input;
|
|
2580
|
+
if (enabled !== undefined)
|
|
2581
|
+
data.enabled = enabled;
|
|
2582
|
+
const result = await client.createSchedule(workflow_id, data);
|
|
2583
|
+
if (!result.success) {
|
|
2584
|
+
return {
|
|
2585
|
+
content: [{ type: 'text', text: `Failed to create schedule: ${result.error || 'Unknown error'}` }],
|
|
2586
|
+
isError: true,
|
|
2587
|
+
};
|
|
2588
|
+
}
|
|
2589
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2590
|
+
}
|
|
2591
|
+
catch (error) {
|
|
2592
|
+
return {
|
|
2593
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2594
|
+
isError: true,
|
|
2595
|
+
};
|
|
2596
|
+
}
|
|
2597
|
+
});
|
|
2598
|
+
// Update Schedule
|
|
2599
|
+
server.tool('update_schedule', 'Update an existing workflow schedule. Only provided fields will be changed.', {
|
|
2600
|
+
workflow_id: z.number().describe('Workflow ID'),
|
|
2601
|
+
schedule_id: z.number().describe('Schedule ID'),
|
|
2602
|
+
name: z.string().optional().describe('New schedule name'),
|
|
2603
|
+
cron_expression: z.string().optional().describe('New cron expression'),
|
|
2604
|
+
execution_type: z.enum(['workflow', 'agent', 'api']).optional().describe('New execution type'),
|
|
2605
|
+
agent_id: z.number().optional().describe('New agent ID'),
|
|
2606
|
+
endpoint_url: z.string().optional().describe('New endpoint URL'),
|
|
2607
|
+
http_method: z.string().optional().describe('New HTTP method'),
|
|
2608
|
+
input: z.record(z.string(), z.unknown()).optional().describe('New input data'),
|
|
2609
|
+
enabled: z.boolean().optional().describe('Enable or disable the schedule'),
|
|
2610
|
+
}, async ({ workflow_id, schedule_id, name, cron_expression, execution_type, agent_id, endpoint_url, http_method, input, enabled }) => {
|
|
2611
|
+
try {
|
|
2612
|
+
const data = {};
|
|
2613
|
+
if (name !== undefined)
|
|
2614
|
+
data.name = name;
|
|
2615
|
+
if (cron_expression !== undefined)
|
|
2616
|
+
data.cron_expression = cron_expression;
|
|
2617
|
+
if (execution_type !== undefined)
|
|
2618
|
+
data.execution_type = execution_type;
|
|
2619
|
+
if (agent_id !== undefined)
|
|
2620
|
+
data.agent_id = agent_id;
|
|
2621
|
+
if (endpoint_url !== undefined)
|
|
2622
|
+
data.endpoint_url = endpoint_url;
|
|
2623
|
+
if (http_method !== undefined)
|
|
2624
|
+
data.http_method = http_method;
|
|
2625
|
+
if (input !== undefined)
|
|
2626
|
+
data.input = input;
|
|
2627
|
+
if (enabled !== undefined)
|
|
2628
|
+
data.enabled = enabled;
|
|
2629
|
+
const result = await client.updateSchedule(workflow_id, schedule_id, data);
|
|
2630
|
+
if (!result.success) {
|
|
2631
|
+
return {
|
|
2632
|
+
content: [{ type: 'text', text: `Failed to update schedule: ${result.error || 'Unknown error'}` }],
|
|
2633
|
+
isError: true,
|
|
2634
|
+
};
|
|
2635
|
+
}
|
|
2636
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2637
|
+
}
|
|
2638
|
+
catch (error) {
|
|
2639
|
+
return {
|
|
2640
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2641
|
+
isError: true,
|
|
2642
|
+
};
|
|
2643
|
+
}
|
|
2644
|
+
});
|
|
2645
|
+
// Delete Schedule
|
|
2646
|
+
server.tool('delete_schedule', 'Delete a workflow schedule by ID.', {
|
|
2647
|
+
workflow_id: z.number().describe('Workflow ID'),
|
|
2648
|
+
schedule_id: z.number().describe('Schedule ID'),
|
|
2649
|
+
}, async ({ workflow_id, schedule_id }) => {
|
|
2650
|
+
try {
|
|
2651
|
+
const result = await client.deleteSchedule(workflow_id, schedule_id);
|
|
2652
|
+
if (!result.success) {
|
|
2653
|
+
return {
|
|
2654
|
+
content: [{ type: 'text', text: `Failed to delete schedule: ${result.error || 'Unknown error'}` }],
|
|
2655
|
+
isError: true,
|
|
2656
|
+
};
|
|
2657
|
+
}
|
|
2658
|
+
return { content: [{ type: 'text', text: `Schedule ${schedule_id} deleted successfully.` }] };
|
|
2659
|
+
}
|
|
2660
|
+
catch (error) {
|
|
2661
|
+
return {
|
|
2662
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2663
|
+
isError: true,
|
|
2664
|
+
};
|
|
2665
|
+
}
|
|
2666
|
+
});
|
|
2667
|
+
// ============================================================
|
|
2668
|
+
// Run Tools
|
|
2669
|
+
// ============================================================
|
|
2670
|
+
// List Runs
|
|
2671
|
+
server.tool('list_runs', 'List all workflow runs with their status, duration, and trigger info.', {}, async () => {
|
|
2672
|
+
try {
|
|
2673
|
+
const result = await client.listRuns();
|
|
2674
|
+
if (!result.success) {
|
|
2675
|
+
return {
|
|
2676
|
+
content: [{ type: 'text', text: `Failed to list runs: ${result.error || 'Unknown error'}` }],
|
|
2677
|
+
isError: true,
|
|
2678
|
+
};
|
|
2679
|
+
}
|
|
2680
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2681
|
+
}
|
|
2682
|
+
catch (error) {
|
|
2683
|
+
return {
|
|
2684
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2685
|
+
isError: true,
|
|
2686
|
+
};
|
|
2687
|
+
}
|
|
2688
|
+
});
|
|
2689
|
+
// Get Run
|
|
2690
|
+
server.tool('get_run', 'Get detailed information about a specific workflow run including execution logs.', {
|
|
2691
|
+
workflow_id: z.number().describe('Workflow ID'),
|
|
2692
|
+
run_id: z.number().describe('Run ID'),
|
|
2693
|
+
}, async ({ workflow_id, run_id }) => {
|
|
2694
|
+
try {
|
|
2695
|
+
const result = await client.getRun(workflow_id, run_id);
|
|
2696
|
+
if (!result.success) {
|
|
2697
|
+
return {
|
|
2698
|
+
content: [{ type: 'text', text: `Run not found: ${result.error || 'Unknown error'}` }],
|
|
2699
|
+
isError: true,
|
|
2700
|
+
};
|
|
2701
|
+
}
|
|
2702
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2703
|
+
}
|
|
2704
|
+
catch (error) {
|
|
2705
|
+
return {
|
|
2706
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2707
|
+
isError: true,
|
|
2708
|
+
};
|
|
2709
|
+
}
|
|
2710
|
+
});
|
|
2711
|
+
// Start Run
|
|
2712
|
+
server.tool('start_run', 'Start a new workflow run. Supports workflow, agent, or API run types.', {
|
|
2713
|
+
workflow_id: z.number().describe('Workflow ID to run'),
|
|
2714
|
+
name: z.string().optional().describe('Run name'),
|
|
2715
|
+
run_type: z.enum(['workflow', 'agent', 'api']).optional().describe('Run type'),
|
|
2716
|
+
agent_id: z.number().optional().describe('Agent ID (required for agent run type)'),
|
|
2717
|
+
input: z.record(z.string(), z.unknown()).optional().describe('Input data for the run'),
|
|
2718
|
+
}, async ({ workflow_id, name, run_type, agent_id, input }) => {
|
|
2719
|
+
try {
|
|
2720
|
+
const data = {};
|
|
2721
|
+
if (name !== undefined)
|
|
2722
|
+
data.name = name;
|
|
2723
|
+
if (run_type !== undefined)
|
|
2724
|
+
data.run_type = run_type;
|
|
2725
|
+
if (agent_id !== undefined)
|
|
2726
|
+
data.agent_id = agent_id;
|
|
2727
|
+
if (input !== undefined)
|
|
2728
|
+
data.input = input;
|
|
2729
|
+
const result = await client.startRun(workflow_id, data);
|
|
2730
|
+
if (!result.success) {
|
|
2731
|
+
return {
|
|
2732
|
+
content: [{ type: 'text', text: `Failed to start run: ${result.error || 'Unknown error'}` }],
|
|
2733
|
+
isError: true,
|
|
2734
|
+
};
|
|
2735
|
+
}
|
|
2736
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
2737
|
+
}
|
|
2738
|
+
catch (error) {
|
|
2739
|
+
return {
|
|
2740
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2741
|
+
isError: true,
|
|
2742
|
+
};
|
|
2743
|
+
}
|
|
2744
|
+
});
|
|
2745
|
+
// Delete Run
|
|
2746
|
+
server.tool('delete_run', 'Delete a workflow run by ID.', {
|
|
2747
|
+
workflow_id: z.number().describe('Workflow ID'),
|
|
2748
|
+
run_id: z.number().describe('Run ID'),
|
|
2749
|
+
}, async ({ workflow_id, run_id }) => {
|
|
2750
|
+
try {
|
|
2751
|
+
const result = await client.deleteRun(workflow_id, run_id);
|
|
2752
|
+
if (!result.success) {
|
|
2753
|
+
return {
|
|
2754
|
+
content: [{ type: 'text', text: `Failed to delete run: ${result.error || 'Unknown error'}` }],
|
|
2755
|
+
isError: true,
|
|
2756
|
+
};
|
|
2757
|
+
}
|
|
2758
|
+
return { content: [{ type: 'text', text: `Run ${run_id} deleted successfully.` }] };
|
|
2759
|
+
}
|
|
2760
|
+
catch (error) {
|
|
2761
|
+
return {
|
|
2762
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }],
|
|
2763
|
+
isError: true,
|
|
2764
|
+
};
|
|
2765
|
+
}
|
|
2766
|
+
});
|
|
2114
2767
|
} // End of registerTools function
|
|
2115
2768
|
// ============================================================
|
|
2116
2769
|
// Start Server
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nlook-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.63",
|
|
4
4
|
"description": "NLook MCP Server for Claude Desktop and AI tools integration",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"homepage": "https://nlook.me",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
30
|
-
"hono": "4.
|
|
30
|
+
"hono": "^4.12.2",
|
|
31
31
|
"turndown": "^7.2.2",
|
|
32
32
|
"zod": "^4.2.1"
|
|
33
33
|
},
|