nana800-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/dist/index.js +18 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -451,19 +451,17 @@ var registerNodeTools = (server) => {
|
|
|
451
451
|
"Create a new trigger node in a scheme. Triggers start the execution of automation workflows.",
|
|
452
452
|
{
|
|
453
453
|
scheme: z3.string().optional().describe("The scheme ID where the trigger will be created (uses MCP_SCHEME_ID env if not provided)"),
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
slug: z3.string().optional().describe("URL-friendly identifier for code_action triggers")
|
|
454
|
+
trigger_type: z3.string().describe("Type of trigger (e.g., WEBHOOK, INTERVAL, CODE_ACTION)"),
|
|
455
|
+
slug: z3.string().optional().describe("URL-friendly identifier for the trigger"),
|
|
456
|
+
description: z3.string().optional().describe("Description of what this trigger does")
|
|
458
457
|
},
|
|
459
|
-
async ({ scheme,
|
|
458
|
+
async ({ scheme, trigger_type, slug, description }) => {
|
|
460
459
|
try {
|
|
461
460
|
const resolvedSchemeId = getSchemeId(scheme);
|
|
462
461
|
const client = getApiClient();
|
|
463
|
-
const body = { scheme: resolvedSchemeId,
|
|
464
|
-
if (node_name) body.node_name = node_name;
|
|
465
|
-
if (node_description) body.node_description = node_description;
|
|
462
|
+
const body = { scheme: resolvedSchemeId, trigger_type };
|
|
466
463
|
if (slug) body.slug = slug;
|
|
464
|
+
if (description) body.description = description;
|
|
467
465
|
const result = await client.post("/node/create/trigger", body);
|
|
468
466
|
return {
|
|
469
467
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
|
|
@@ -480,17 +478,17 @@ var registerNodeTools = (server) => {
|
|
|
480
478
|
"Create a new action node in a scheme. Actions perform operations like sending emails, making HTTP requests, etc.",
|
|
481
479
|
{
|
|
482
480
|
scheme: z3.string().optional().describe("The scheme ID where the action will be created (uses MCP_SCHEME_ID env if not provided)"),
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
481
|
+
action_type: z3.string().describe("Type of action (e.g., REQUEST, CONDITION, TG_BOT_MESSAGE_SEND, SET_CONTEXT_PARAM_DATA)"),
|
|
482
|
+
slug: z3.string().optional().describe("URL-friendly identifier for the action"),
|
|
483
|
+
description: z3.string().optional().describe("Description of what this action does")
|
|
486
484
|
},
|
|
487
|
-
async ({ scheme,
|
|
485
|
+
async ({ scheme, action_type, slug, description }) => {
|
|
488
486
|
try {
|
|
489
487
|
const resolvedSchemeId = getSchemeId(scheme);
|
|
490
488
|
const client = getApiClient();
|
|
491
|
-
const body = { scheme: resolvedSchemeId,
|
|
492
|
-
if (
|
|
493
|
-
if (
|
|
489
|
+
const body = { scheme: resolvedSchemeId, action_type };
|
|
490
|
+
if (slug) body.slug = slug;
|
|
491
|
+
if (description) body.description = description;
|
|
494
492
|
const result = await client.post("/node/create/action", body);
|
|
495
493
|
return {
|
|
496
494
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
|
|
@@ -507,14 +505,14 @@ var registerNodeTools = (server) => {
|
|
|
507
505
|
"Update an existing node properties",
|
|
508
506
|
{
|
|
509
507
|
node_id: z3.string().describe("The unique ID of the node to update"),
|
|
510
|
-
|
|
511
|
-
|
|
508
|
+
slug: z3.string().optional().describe("New slug/identifier for the node"),
|
|
509
|
+
description: z3.string().optional().describe("New description")
|
|
512
510
|
},
|
|
513
|
-
async ({ node_id,
|
|
511
|
+
async ({ node_id, slug, description }) => {
|
|
514
512
|
const client = getApiClient();
|
|
515
513
|
const body = {};
|
|
516
|
-
if (
|
|
517
|
-
if (
|
|
514
|
+
if (slug !== void 0) body.slug = slug;
|
|
515
|
+
if (description !== void 0) body.description = description;
|
|
518
516
|
const result = await client.put(`/node/update/${node_id}`, body);
|
|
519
517
|
return {
|
|
520
518
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
|