@mindstudio-ai/agent 0.0.20 → 0.1.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/cli.js CHANGED
@@ -138,6 +138,15 @@ var init_metadata = __esm({
138
138
  inputSchema: { "type": "object", "properties": { "name": { "type": "string", "description": "Name for the new data source (supports variable interpolation)" } }, "required": ["name"] },
139
139
  outputSchema: { "description": "This step does not produce output data." }
140
140
  },
141
+ "createGmailDraft": {
142
+ stepType: "createGmailDraft",
143
+ description: "Create a draft email in the connected Gmail account.",
144
+ usageNotes: `- Requires a Google OAuth connection with Gmail compose scope.
145
+ - The draft appears in the user's Gmail Drafts folder but is not sent.
146
+ - messageType controls the body format: "plain" for plain text, "html" for raw HTML, "markdown" for auto-converted markdown.`,
147
+ inputSchema: { "type": "object", "properties": { "to": { "type": "string", "description": "Recipient email address(es), comma-separated for multiple" }, "subject": { "type": "string", "description": "Email subject line" }, "message": { "type": "string", "description": "Email body content" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "messageType": { "enum": ["plain", "html", "markdown"], "type": "string", "description": 'Body format: "plain", "html", or "markdown"' } }, "required": ["to", "subject", "message", "messageType"] },
148
+ outputSchema: { "type": "object", "properties": { "draftId": { "type": "string", "description": "Gmail draft ID" } }, "required": ["draftId"] }
149
+ },
141
150
  "createGoogleCalendarEvent": {
142
151
  stepType: "createGoogleCalendarEvent",
143
152
  description: "Create a new event on a Google Calendar.",
@@ -393,6 +402,13 @@ var init_metadata = __esm({
393
402
  inputSchema: { "type": "object", "properties": { "prompt": { "type": "string", "description": "Text prompt describing the video to generate" }, "skipAssetCreation": { "type": "boolean", "description": "If true, the video will not appear in the user's asset history" }, "videoModelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": "Video generation model identifier" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model"], "description": "Optional model configuration override. Uses the workflow's default video model if not specified" }, "generateVariants": { "type": "boolean", "description": "Whether to generate multiple video variants in parallel" }, "numVariants": { "type": "number", "description": "Number of variants to generate (max 10)" }, "addWatermark": { "type": "boolean", "description": "Whether to add a MindStudio watermark to the generated video" } }, "required": ["prompt"] },
394
403
  outputSchema: { "type": "object", "properties": { "videoUrl": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] } }, "required": ["videoUrl"] }
395
404
  },
405
+ "getGmailAttachments": {
406
+ stepType: "getGmailAttachments",
407
+ description: "Download attachments from a Gmail email and re-host them on CDN.",
408
+ usageNotes: "- Requires a Google OAuth connection with Gmail readonly scope.\n- Attachments are uploaded to CDN and returned as URLs.\n- Attachments larger than 25MB are skipped.\n- Use the message ID from Search Gmail Emails, List Recent Gmail Emails, or Get Gmail Email steps.",
409
+ inputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["messageId"] },
410
+ outputSchema: { "description": "This step does not produce output data." }
411
+ },
396
412
  "getGmailDraft": {
397
413
  stepType: "getGmailDraft",
398
414
  description: "Retrieve a specific draft from Gmail by draft ID.",
@@ -407,6 +423,13 @@ var init_metadata = __esm({
407
423
  inputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID to retrieve" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["messageId"] },
408
424
  outputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID" }, "subject": { "type": "string", "description": "Email subject" }, "from": { "type": "string", "description": "Sender email" }, "to": { "type": "string", "description": "Recipient email" }, "date": { "type": "string", "description": "Email date" }, "body": { "type": "string", "description": "Email body content" }, "labels": { "type": "string", "description": "Comma-separated label IDs" } }, "required": ["messageId", "subject", "from", "to", "date", "body", "labels"] }
409
425
  },
426
+ "getGmailUnreadCount": {
427
+ stepType: "getGmailUnreadCount",
428
+ description: "Get the number of unread emails in the connected Gmail inbox.",
429
+ usageNotes: "- Requires a Google OAuth connection with Gmail readonly scope.\n- Returns the unread message count for the inbox label.\n- This is a lightweight call that does not fetch any email content.",
430
+ inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" } } },
431
+ outputSchema: { "description": "This step does not produce output data." }
432
+ },
410
433
  "getGoogleCalendarEvent": {
411
434
  stepType: "getGoogleCalendarEvent",
412
435
  description: "Retrieve a specific event from a Google Calendar by event ID.",
@@ -540,6 +563,13 @@ var init_metadata = __esm({
540
563
  inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "limit": { "type": "string", "description": "Max drafts to return (default: 10, max: 50)" }, "exportType": { "enum": ["json", "text"], "type": "string", "description": 'Format for the variable output: "json" or "text"' } }, "required": ["exportType"] },
541
564
  outputSchema: { "type": "object", "properties": { "drafts": { "type": "array", "items": { "type": "object", "properties": { "draftId": { "type": "string", "description": "Gmail draft ID" }, "messageId": { "type": "string", "description": "Gmail message ID" }, "subject": { "type": "string", "description": "Email subject" }, "to": { "type": "string", "description": "Recipient email" }, "snippet": { "type": "string", "description": "Short preview text" } }, "required": ["draftId", "messageId", "subject", "to", "snippet"] }, "description": "List of draft summaries" } }, "required": ["drafts"] }
542
565
  },
566
+ "listGmailLabels": {
567
+ stepType: "listGmailLabels",
568
+ description: "List all labels in the connected Gmail account. Use these label IDs or names with the Update Gmail Labels step.",
569
+ usageNotes: '- Requires a Google OAuth connection with Gmail readonly scope.\n- Returns both system labels (INBOX, SENT, TRASH, etc.) and user-created labels.\n- Label type is "system" for built-in labels or "user" for custom labels.',
570
+ inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" } } },
571
+ outputSchema: { "description": "This step does not produce output data." }
572
+ },
543
573
  "listGoogleCalendarEvents": {
544
574
  stepType: "listGoogleCalendarEvents",
545
575
  description: "List upcoming events from a Google Calendar, ordered by start time.",
@@ -554,6 +584,13 @@ var init_metadata = __esm({
554
584
  inputSchema: { "type": "object", "properties": { "folderId": { "type": "string", "description": "Google Drive folder ID (defaults to root)" }, "limit": { "type": "number", "description": "Max files to return (default: 20)" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "exportType": { "enum": ["json", "text"], "type": "string", "description": 'Format for the variable output: "json" or "text"' } }, "required": ["exportType"] },
555
585
  outputSchema: { "type": "object", "properties": { "files": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "mimeType": { "type": "string" }, "size": { "type": "string" }, "webViewLink": { "type": "string" }, "createdTime": { "type": "string" }, "modifiedTime": { "type": "string" } }, "required": ["id", "name", "mimeType", "size", "webViewLink", "createdTime", "modifiedTime"] }, "description": "List of files in the folder" } }, "required": ["files"] }
556
586
  },
587
+ "listRecentGmailEmails": {
588
+ stepType: "listRecentGmailEmails",
589
+ description: "List recent emails from the connected Gmail inbox.",
590
+ usageNotes: '- Requires a Google OAuth connection with Gmail readonly scope.\n- Returns up to 100 emails (default 5), ordered by most recent first.\n- Functionally equivalent to Search Gmail Emails with an "in:inbox" query.',
591
+ inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "exportType": { "enum": ["json", "text"], "type": "string", "description": 'Format for the variable output: "json" or "text"' }, "limit": { "type": "string", "description": "Maximum number of emails to return (1-100, default: 5)" } }, "required": ["exportType", "limit"] },
592
+ outputSchema: { "description": "This step does not produce output data." }
593
+ },
557
594
  "logic": {
558
595
  stepType: "logic",
559
596
  description: "Route execution to different branches based on AI evaluation, comparison operators, or workflow jumps.",
@@ -698,6 +735,13 @@ var init_metadata = __esm({
698
735
  inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the source video to resize" }, "mode": { "enum": ["fit", "exact"], "type": "string", "description": "Resize mode: 'fit' scales within max dimensions, 'exact' forces exact dimensions" }, "maxWidth": { "type": "number", "description": "Maximum width in pixels (used with 'fit' mode)" }, "maxHeight": { "type": "number", "description": "Maximum height in pixels (used with 'fit' mode)" }, "width": { "type": "number", "description": "Exact width in pixels (used with 'exact' mode)" }, "height": { "type": "number", "description": "Exact height in pixels (used with 'exact' mode)" }, "strategy": { "enum": ["pad", "crop"], "type": "string", "description": "Strategy for handling aspect ratio mismatch in 'exact' mode" }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["videoUrl", "mode"] },
699
736
  outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the resized video" } }, "required": ["videoUrl"] }
700
737
  },
738
+ "runFromConnectorRegistry": {
739
+ stepType: "runFromConnectorRegistry",
740
+ description: "Run a raw API connector to a third-party service",
741
+ usageNotes: '- Use the /developer/v2/helpers/connectors endpoint to list available services and actions.\n- Use /developer/v2/helpers/connectors/{serviceId}/{actionId} to get the full input configuration for an action.\n- Use /developer/v2/helpers/connections to list your available OAuth connections.\n- The actionId format is "serviceId/actionId" (e.g., "slack/send-message").\n- Pass a __connectionId to authenticate the request with a specific OAuth connection, otherwise the default will be used (if configured).',
742
+ inputSchema: { "type": "object", "properties": { "actionId": { "type": "string", "description": "The connector action identifier in the format serviceId/actionId" }, "displayName": { "type": "string", "description": "Human-readable name of the connector action" }, "icon": { "type": "string", "description": "Icon URL for the connector" }, "configurationValues": { "type": "object", "description": "Key-value configuration parameters for the connector action" }, "__connectionId": { "type": "string", "description": "OAuth connection ID used to authenticate the connector request" } }, "required": ["actionId", "displayName", "icon", "configurationValues"], "description": "Configuration for the connector registry step" },
743
+ outputSchema: { "type": "object", "properties": { "data": { "type": "object", "description": "Key-value map of output variables set by the connector" } }, "required": ["data"] }
744
+ },
701
745
  "runPackagedWorkflow": {
702
746
  stepType: "runPackagedWorkflow",
703
747
  description: 'Run a packaged workflow ("custom block")',
@@ -798,6 +842,13 @@ var init_metadata = __esm({
798
842
  inputSchema: { "type": "object", "properties": { "url": { "type": "string", "description": "Full URL or username for the X profile (e.g. https://x.com/elonmusk)" } }, "required": ["url"] },
799
843
  outputSchema: { "type": "object", "properties": { "profile": { "type": "object", "properties": { "text": { "type": "string", "description": "Markdown/plain-text content of the scraped page" }, "html": { "type": "string", "description": "Raw HTML content of the scraped page" }, "json": { "type": "object", "description": "Structured data extracted from the page" }, "screenshotUrl": { "type": "string", "description": "Screenshot URL of the page (if requested)" }, "metadata": { "type": "object", "properties": { "title": { "type": "string", "description": "Page title" }, "description": { "type": "string", "description": "Page meta description" }, "url": { "type": "string", "description": "Canonical URL" }, "image": { "type": "string", "description": "Open Graph image URL" } }, "required": ["title", "description", "url", "image"], "description": "Page metadata (Open Graph / meta tags)" } }, "required": ["text", "html"], "description": "Scraped profile data including text, HTML, and optional structured JSON" } }, "required": ["profile"] }
800
844
  },
845
+ "searchGmailEmails": {
846
+ stepType: "searchGmailEmails",
847
+ description: "Search for emails in the connected Gmail account using a Gmail search query. To list recent inbox emails, pass an empty query string.",
848
+ usageNotes: '- Requires a Google OAuth connection with Gmail readonly scope.\n- Uses Gmail search syntax (e.g. "from:user@example.com", "subject:invoice", "is:unread").\n- To list recent inbox emails, use an empty query string or "in:inbox".\n- Returns up to 100 emails (default 5). The variable receives text or JSON depending on exportType.\n- The direct execution output always returns structured email objects.',
849
+ inputSchema: { "type": "object", "properties": { "query": { "type": "string", "description": 'Gmail search query (e.g. "from:user@example.com", "subject:invoice", "is:unread")' }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "exportType": { "enum": ["json", "text"], "type": "string", "description": 'Format for the variable output: "json" or "text"' }, "limit": { "type": "string", "description": "Maximum number of emails to return (1-10, default: 5)" } }, "required": ["query", "exportType", "limit"] },
850
+ outputSchema: { "type": "object", "properties": { "emails": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Gmail message ID" }, "subject": { "type": "string", "description": "Email subject line" }, "from": { "type": "string", "description": "Sender email address" }, "to": { "type": "string", "description": "Recipient email address" }, "date": { "type": "string", "description": "Email date" }, "plainBody": { "type": "string", "description": "Plain text body content" }, "htmlBody": { "type": "string", "description": "HTML body content (if available)" }, "labels": { "type": "string", "description": "Comma-separated label IDs applied to the email" } }, "required": ["id", "subject", "from", "to", "date", "plainBody", "htmlBody", "labels"] }, "description": "List of matching email messages" } }, "required": ["emails"] }
851
+ },
801
852
  "searchGoogle": {
802
853
  stepType: "searchGoogle",
803
854
  description: "Search the web using Google and return structured results.",
@@ -875,6 +926,20 @@ var init_metadata = __esm({
875
926
  inputSchema: { "type": "object", "properties": { "subject": { "type": "string", "description": "Email subject line" }, "body": { "type": "string", "description": "Email body content (plain text, markdown, HTML, or a CDN URL to an HTML file)" }, "connectionId": { "type": "string", "description": "OAuth connection ID(s) for the recipient(s), comma-separated for multiple" }, "generateHtml": { "type": "boolean", "description": "When true, auto-convert the body text into a styled HTML email using AI" }, "generateHtmlInstructions": { "type": "string", "description": "Natural language instructions for the HTML generation style" }, "generateHtmlModelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": 'Model identifier (e.g. "gpt-4", "claude-3-opus")' }, "temperature": { "type": "number", "description": "Sampling temperature for the model (0-2)" }, "maxResponseTokens": { "type": "number", "description": "Maximum number of tokens in the model's response" }, "ignorePreamble": { "type": "boolean", "description": "Whether to skip the system preamble/instructions" }, "userMessagePreprocessor": { "type": "object", "properties": { "dataSource": { "type": "string", "description": "Data source identifier for the preprocessor" }, "messageTemplate": { "type": "string", "description": "Template string applied to user messages before sending to the model" }, "maxResults": { "type": "number", "description": "Maximum number of results to include from the data source" }, "enabled": { "type": "boolean", "description": "Whether the preprocessor is active" }, "shouldInherit": { "type": "boolean", "description": "Whether child steps should inherit this preprocessor configuration" } }, "description": "Preprocessor applied to user messages before sending to the model" }, "preamble": { "type": "string", "description": "System preamble/instructions for the model" }, "multiModelEnabled": { "type": "boolean", "description": "Whether multi-model candidate generation is enabled" }, "editResponseEnabled": { "type": "boolean", "description": "Whether the user can edit the model's response" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"], "description": "Model settings override for HTML generation" }, "attachments": { "type": "array", "items": { "type": "string" }, "description": "URLs of files to attach to the email" } }, "required": ["subject", "body"] },
876
927
  outputSchema: { "type": "object", "properties": { "recipients": { "type": "array", "items": { "type": "string" }, "description": "Email addresses the message was sent to" } }, "required": ["recipients"] }
877
928
  },
929
+ "sendGmailDraft": {
930
+ stepType: "sendGmailDraft",
931
+ description: "Send an existing draft from the connected Gmail account.",
932
+ usageNotes: "- Requires a Google OAuth connection with Gmail compose scope.\n- The draft is sent and removed from the Drafts folder.\n- Use the draft ID returned by the Create Gmail Draft or List Gmail Drafts steps.",
933
+ inputSchema: { "type": "object", "properties": { "draftId": { "type": "string", "description": "Gmail draft ID to send" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["draftId"] },
934
+ outputSchema: { "description": "This step does not produce output data." }
935
+ },
936
+ "sendGmailMessage": {
937
+ stepType: "sendGmailMessage",
938
+ description: "Send an email from the connected Gmail account.",
939
+ usageNotes: '- Requires a Google OAuth connection with Gmail compose scope.\n- messageType controls the body format: "plain" for plain text, "html" for raw HTML, "markdown" for auto-converted markdown.',
940
+ inputSchema: { "type": "object", "properties": { "to": { "type": "string", "description": "Recipient email address(es), comma-separated for multiple" }, "subject": { "type": "string", "description": "Email subject line" }, "message": { "type": "string", "description": "Email body content" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "messageType": { "enum": ["plain", "html", "markdown"], "type": "string", "description": 'Body format: "plain", "html", or "markdown"' } }, "required": ["to", "subject", "message", "messageType"] },
941
+ outputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID of the sent email" } }, "required": ["messageId"] }
942
+ },
878
943
  "sendSMS": {
879
944
  stepType: "sendSMS",
880
945
  description: "Send an SMS or MMS message to a phone number configured via OAuth connection.",
@@ -882,6 +947,13 @@ var init_metadata = __esm({
882
947
  inputSchema: { "type": "object", "properties": { "body": { "type": "string", "description": "SMS message body text" }, "connectionId": { "type": "string", "description": "OAuth connection ID for the recipient phone number" }, "mediaUrls": { "type": "array", "items": { "type": "string" }, "description": "Optional array of media URLs to send as MMS (up to 10, 5MB each)" } }, "required": ["body"] },
883
948
  outputSchema: { "description": "This step does not produce output data." }
884
949
  },
950
+ "setGmailReadStatus": {
951
+ stepType: "setGmailReadStatus",
952
+ description: "Mark one or more Gmail emails as read or unread.",
953
+ usageNotes: "- Requires a Google OAuth connection with Gmail modify scope.\n- Accepts one or more message IDs as a comma-separated string or array.\n- Set markAsRead to true to mark as read, false to mark as unread.",
954
+ inputSchema: { "type": "object", "properties": { "messageIds": { "type": "string", "description": "Gmail message ID(s), comma-separated" }, "markAsRead": { "type": "boolean", "description": "true = mark as read, false = mark as unread" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["messageIds", "markAsRead"] },
955
+ outputSchema: { "description": "This step does not produce output data." }
956
+ },
885
957
  "setRunTitle": {
886
958
  stepType: "setRunTitle",
887
959
  description: "Set the title of the agent run for the user's history",
@@ -973,6 +1045,13 @@ var init_metadata = __esm({
973
1045
  inputSchema: { "type": "object", "properties": { "inputUrl": { "type": "string", "description": "URL of the source audio or video file to trim" }, "start": { "type": ["number", "string"] }, "duration": { "type": ["string", "number"] }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["inputUrl"] },
974
1046
  outputSchema: { "type": "object", "properties": { "mediaUrl": { "type": "string", "description": "URL of the trimmed media file" } }, "required": ["mediaUrl"] }
975
1047
  },
1048
+ "updateGmailLabels": {
1049
+ stepType: "updateGmailLabels",
1050
+ description: "Add or remove labels on Gmail messages, identified by message IDs or a search query.",
1051
+ usageNotes: "- Requires a Google OAuth connection with Gmail modify scope.\n- Provide either a query (Gmail search syntax) or explicit messageIds to target messages.\n- Label IDs can be label names or Gmail label IDs \u2014 names are resolved automatically.",
1052
+ inputSchema: { "type": "object", "properties": { "query": { "type": "string", "description": "Gmail search query to find messages (alternative to messageIds)" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "messageIds": { "type": "string", "description": "Comma-separated message IDs to target (alternative to query)" }, "addLabelIds": { "type": "string", "description": "Comma-separated label names or IDs to add" }, "removeLabelIds": { "type": "string", "description": "Comma-separated label names or IDs to remove" } }, "required": ["query", "messageIds", "addLabelIds", "removeLabelIds"] },
1053
+ outputSchema: { "type": "object", "properties": { "updatedMessageIds": { "type": "array", "items": { "type": "string" }, "description": "Gmail message IDs that were updated" } }, "required": ["updatedMessageIds"] }
1054
+ },
976
1055
  "updateGoogleCalendarEvent": {
977
1056
  stepType: "updateGoogleCalendarEvent",
978
1057
  description: "Update an existing event on a Google Calendar. Only specified fields are changed.",
@@ -1303,6 +1382,9 @@ function applyStepMethods(AgentClass) {
1303
1382
  proto.createDataSource = function(step, options) {
1304
1383
  return this.executeStep("createDataSource", step, options);
1305
1384
  };
1385
+ proto.createGmailDraft = function(step, options) {
1386
+ return this.executeStep("createGmailDraft", step, options);
1387
+ };
1306
1388
  proto.createGoogleCalendarEvent = function(step, options) {
1307
1389
  return this.executeStep("createGoogleCalendarEvent", step, options);
1308
1390
  };
@@ -1405,12 +1487,18 @@ function applyStepMethods(AgentClass) {
1405
1487
  proto.generateVideo = function(step, options) {
1406
1488
  return this.executeStep("generateVideo", step, options);
1407
1489
  };
1490
+ proto.getGmailAttachments = function(step, options) {
1491
+ return this.executeStep("getGmailAttachments", step, options);
1492
+ };
1408
1493
  proto.getGmailDraft = function(step, options) {
1409
1494
  return this.executeStep("getGmailDraft", step, options);
1410
1495
  };
1411
1496
  proto.getGmailEmail = function(step, options) {
1412
1497
  return this.executeStep("getGmailEmail", step, options);
1413
1498
  };
1499
+ proto.getGmailUnreadCount = function(step, options) {
1500
+ return this.executeStep("getGmailUnreadCount", step, options);
1501
+ };
1414
1502
  proto.getGoogleCalendarEvent = function(step, options) {
1415
1503
  return this.executeStep("getGoogleCalendarEvent", step, options);
1416
1504
  };
@@ -1468,12 +1556,18 @@ function applyStepMethods(AgentClass) {
1468
1556
  proto.listGmailDrafts = function(step, options) {
1469
1557
  return this.executeStep("listGmailDrafts", step, options);
1470
1558
  };
1559
+ proto.listGmailLabels = function(step, options) {
1560
+ return this.executeStep("listGmailLabels", step, options);
1561
+ };
1471
1562
  proto.listGoogleCalendarEvents = function(step, options) {
1472
1563
  return this.executeStep("listGoogleCalendarEvents", step, options);
1473
1564
  };
1474
1565
  proto.listGoogleDriveFiles = function(step, options) {
1475
1566
  return this.executeStep("listGoogleDriveFiles", step, options);
1476
1567
  };
1568
+ proto.listRecentGmailEmails = function(step, options) {
1569
+ return this.executeStep("listRecentGmailEmails", step, options);
1570
+ };
1477
1571
  proto.logic = function(step, options) {
1478
1572
  return this.executeStep("logic", step, options);
1479
1573
  };
@@ -1534,6 +1628,9 @@ function applyStepMethods(AgentClass) {
1534
1628
  proto.resizeVideo = function(step, options) {
1535
1629
  return this.executeStep("resizeVideo", step, options);
1536
1630
  };
1631
+ proto.runFromConnectorRegistry = function(step, options) {
1632
+ return this.executeStep("runFromConnectorRegistry", step, options);
1633
+ };
1537
1634
  proto.runPackagedWorkflow = function(step, options) {
1538
1635
  return this.executeStep("runPackagedWorkflow", step, options);
1539
1636
  };
@@ -1576,6 +1673,9 @@ function applyStepMethods(AgentClass) {
1576
1673
  proto.scrapeXProfile = function(step, options) {
1577
1674
  return this.executeStep("scrapeXProfile", step, options);
1578
1675
  };
1676
+ proto.searchGmailEmails = function(step, options) {
1677
+ return this.executeStep("searchGmailEmails", step, options);
1678
+ };
1579
1679
  proto.searchGoogle = function(step, options) {
1580
1680
  return this.executeStep("searchGoogle", step, options);
1581
1681
  };
@@ -1609,9 +1709,18 @@ function applyStepMethods(AgentClass) {
1609
1709
  proto.sendEmail = function(step, options) {
1610
1710
  return this.executeStep("sendEmail", step, options);
1611
1711
  };
1712
+ proto.sendGmailDraft = function(step, options) {
1713
+ return this.executeStep("sendGmailDraft", step, options);
1714
+ };
1715
+ proto.sendGmailMessage = function(step, options) {
1716
+ return this.executeStep("sendGmailMessage", step, options);
1717
+ };
1612
1718
  proto.sendSMS = function(step, options) {
1613
1719
  return this.executeStep("sendSMS", step, options);
1614
1720
  };
1721
+ proto.setGmailReadStatus = function(step, options) {
1722
+ return this.executeStep("setGmailReadStatus", step, options);
1723
+ };
1615
1724
  proto.setRunTitle = function(step, options) {
1616
1725
  return this.executeStep("setRunTitle", step, options);
1617
1726
  };
@@ -1651,6 +1760,9 @@ function applyStepMethods(AgentClass) {
1651
1760
  proto.trimMedia = function(step, options) {
1652
1761
  return this.executeStep("trimMedia", step, options);
1653
1762
  };
1763
+ proto.updateGmailLabels = function(step, options) {
1764
+ return this.executeStep("updateGmailLabels", step, options);
1765
+ };
1654
1766
  proto.updateGoogleCalendarEvent = function(step, options) {
1655
1767
  return this.executeStep("updateGoogleCalendarEvent", step, options);
1656
1768
  };
@@ -1707,12 +1819,27 @@ function applyHelperMethods(AgentClass) {
1707
1819
  proto.listModelsByType = function(modelType) {
1708
1820
  return this._request("GET", `/helpers/models/${modelType}`).then((r) => r.data);
1709
1821
  };
1822
+ proto.listModelsSummary = function() {
1823
+ return this._request("GET", "/helpers/models-summary").then((r) => r.data);
1824
+ };
1825
+ proto.listModelsSummaryByType = function(modelType) {
1826
+ return this._request("GET", `/helpers/models-summary/${modelType}`).then((r) => r.data);
1827
+ };
1710
1828
  proto.listConnectors = function() {
1711
1829
  return this._request("GET", "/helpers/connectors").then((r) => r.data);
1712
1830
  };
1713
1831
  proto.getConnector = function(serviceId) {
1714
1832
  return this._request("GET", `/helpers/connectors/${serviceId}`).then((r) => r.data);
1715
1833
  };
1834
+ proto.getConnectorAction = function(serviceId, actionId) {
1835
+ return this._request("GET", `/helpers/connectors/${serviceId}/${actionId}`).then((r) => r.data);
1836
+ };
1837
+ proto.listConnections = function() {
1838
+ return this._request("GET", "/helpers/connections").then((r) => r.data);
1839
+ };
1840
+ proto.estimateStepCost = function(stepType, step, options) {
1841
+ return this._request("POST", "/helpers/step-cost-estimate", { step: { type: stepType, ...step }, ...options }).then((r) => r.data);
1842
+ };
1716
1843
  }
1717
1844
  var init_helpers = __esm({
1718
1845
  "src/generated/helpers.ts"() {
@@ -1966,7 +2093,7 @@ async function startMcpServer(options) {
1966
2093
  capabilities: { tools: {} },
1967
2094
  serverInfo: {
1968
2095
  name: "mindstudio-agent",
1969
- version: "0.0.20"
2096
+ version: "0.1.1"
1970
2097
  }
1971
2098
  });
1972
2099
  break;
@@ -1980,18 +2107,52 @@ async function startMcpServer(options) {
1980
2107
  const args = params.arguments ?? {};
1981
2108
  try {
1982
2109
  let result;
1983
- if (toolName === "listModels") {
2110
+ if (toolName === "listSteps") {
2111
+ const meta = await getMetadata();
2112
+ const summary = {};
2113
+ for (const [name, step] of Object.entries(meta)) {
2114
+ summary[name] = step.description;
2115
+ }
2116
+ for (const [name, desc] of Object.entries(
2117
+ HELPER_DESCRIPTIONS
2118
+ )) {
2119
+ summary[name] = desc;
2120
+ }
2121
+ result = summary;
2122
+ } else if (toolName === "listModels") {
1984
2123
  result = await getAgent().listModels();
1985
2124
  } else if (toolName === "listModelsByType") {
1986
2125
  result = await getAgent().listModelsByType(
1987
2126
  args.modelType
1988
2127
  );
2128
+ } else if (toolName === "listModelsSummary") {
2129
+ result = await getAgent().listModelsSummary();
2130
+ } else if (toolName === "listModelsSummaryByType") {
2131
+ result = await getAgent().listModelsSummaryByType(
2132
+ args.modelType
2133
+ );
1989
2134
  } else if (toolName === "listConnectors") {
1990
2135
  result = await getAgent().listConnectors();
1991
2136
  } else if (toolName === "getConnector") {
1992
2137
  result = await getAgent().getConnector(
1993
2138
  args.serviceId
1994
2139
  );
2140
+ } else if (toolName === "getConnectorAction") {
2141
+ result = await getAgent().getConnectorAction(
2142
+ args.serviceId,
2143
+ args.actionId
2144
+ );
2145
+ } else if (toolName === "listConnections") {
2146
+ result = await getAgent().listConnections();
2147
+ } else if (toolName === "estimateStepCost") {
2148
+ result = await getAgent().estimateStepCost(
2149
+ args.stepType,
2150
+ args.step,
2151
+ {
2152
+ appId: args.appId,
2153
+ workflowId: args.workflowId
2154
+ }
2155
+ );
1995
2156
  } else if (toolName === "listAgents") {
1996
2157
  result = await getAgent().listAgents();
1997
2158
  } else if (toolName === "runAgent") {
@@ -2046,13 +2207,31 @@ async function startMcpServer(options) {
2046
2207
  }
2047
2208
  }
2048
2209
  }
2049
- var MCP_PROTOCOL_VERSION, HELPER_TOOLS;
2210
+ var MCP_PROTOCOL_VERSION, HELPER_DESCRIPTIONS, HELPER_TOOLS;
2050
2211
  var init_mcp = __esm({
2051
2212
  "src/mcp.ts"() {
2052
2213
  "use strict";
2053
2214
  init_client();
2054
2215
  MCP_PROTOCOL_VERSION = "2024-11-05";
2216
+ HELPER_DESCRIPTIONS = {
2217
+ listModels: "List all available AI models.",
2218
+ listModelsByType: "List AI models filtered by type.",
2219
+ listModelsSummary: "List all AI models (summary: id, name, type, tags).",
2220
+ listModelsSummaryByType: "List AI models (summary) filtered by type.",
2221
+ listConnectors: "List available connector services and their actions.",
2222
+ getConnector: "Get details for a connector service.",
2223
+ getConnectorAction: "Get full configuration for a connector action.",
2224
+ listConnections: "List OAuth connections for the organization.",
2225
+ estimateStepCost: "Estimate the cost of executing a step before running it.",
2226
+ listAgents: "List all pre-built agents in the organization.",
2227
+ runAgent: "Run a pre-built agent and wait for the result."
2228
+ };
2055
2229
  HELPER_TOOLS = [
2230
+ {
2231
+ name: "listSteps",
2232
+ description: "List all available methods with their descriptions. Returns a compact { method: description } map. Use this first to discover what steps and helpers are available, then call a specific method by name.",
2233
+ inputSchema: { type: "object", properties: {} }
2234
+ },
2056
2235
  {
2057
2236
  name: "listModels",
2058
2237
  description: "List all available AI models across all categories.",
@@ -2080,9 +2259,36 @@ var init_mcp = __esm({
2080
2259
  required: ["modelType"]
2081
2260
  }
2082
2261
  },
2262
+ {
2263
+ name: "listModelsSummary",
2264
+ description: "List all available AI models (summary) with only id, name, type, and tags. Suitable for display or consumption inside a model context window.",
2265
+ inputSchema: { type: "object", properties: {} }
2266
+ },
2267
+ {
2268
+ name: "listModelsSummaryByType",
2269
+ description: "List AI models (summary) filtered by type.",
2270
+ inputSchema: {
2271
+ type: "object",
2272
+ properties: {
2273
+ modelType: {
2274
+ type: "string",
2275
+ enum: [
2276
+ "llm_chat",
2277
+ "image_generation",
2278
+ "video_generation",
2279
+ "video_analysis",
2280
+ "text_to_speech",
2281
+ "vision",
2282
+ "transcription"
2283
+ ]
2284
+ }
2285
+ },
2286
+ required: ["modelType"]
2287
+ }
2288
+ },
2083
2289
  {
2084
2290
  name: "listConnectors",
2085
- description: "List available connector services (Slack, Google, HubSpot, etc.).",
2291
+ description: "List available connector services (Slack, Google, HubSpot, etc.) and their actions.",
2086
2292
  inputSchema: { type: "object", properties: {} }
2087
2293
  },
2088
2294
  {
@@ -2094,6 +2300,56 @@ var init_mcp = __esm({
2094
2300
  required: ["serviceId"]
2095
2301
  }
2096
2302
  },
2303
+ {
2304
+ name: "getConnectorAction",
2305
+ description: "Get the full configuration for a connector action, including all input fields needed to call it via runFromConnectorRegistry.",
2306
+ inputSchema: {
2307
+ type: "object",
2308
+ properties: {
2309
+ serviceId: {
2310
+ type: "string",
2311
+ description: "The connector service ID."
2312
+ },
2313
+ actionId: {
2314
+ type: "string",
2315
+ description: 'The full action ID including service prefix (e.g. "slack/send-message").'
2316
+ }
2317
+ },
2318
+ required: ["serviceId", "actionId"]
2319
+ }
2320
+ },
2321
+ {
2322
+ name: "listConnections",
2323
+ description: "List OAuth connections for the organization. Use the returned connection IDs when calling connector actions.",
2324
+ inputSchema: { type: "object", properties: {} }
2325
+ },
2326
+ {
2327
+ name: "estimateStepCost",
2328
+ description: "Estimate the cost of executing a step before running it. Pass the same step config you would use for execution.",
2329
+ inputSchema: {
2330
+ type: "object",
2331
+ properties: {
2332
+ stepType: {
2333
+ type: "string",
2334
+ description: 'The step type name (e.g. "generateText").'
2335
+ },
2336
+ step: {
2337
+ type: "object",
2338
+ description: "The step input parameters.",
2339
+ additionalProperties: true
2340
+ },
2341
+ appId: {
2342
+ type: "string",
2343
+ description: "Optional app ID for context-specific pricing."
2344
+ },
2345
+ workflowId: {
2346
+ type: "string",
2347
+ description: "Optional workflow ID for context-specific pricing."
2348
+ }
2349
+ },
2350
+ required: ["stepType"]
2351
+ }
2352
+ },
2097
2353
  {
2098
2354
  name: "listAgents",
2099
2355
  description: "List all pre-built agents in the organization along with org metadata.",
@@ -2141,7 +2397,7 @@ Commands:
2141
2397
  whoami Show current authentication status
2142
2398
  <method> [json | --flags] Execute a step method (shorthand for exec)
2143
2399
  exec <method> [json | --flags] Execute a step method
2144
- list [--json] List available methods
2400
+ list [--json] [--summary] List available methods (--summary for compact JSON)
2145
2401
  info <method> Show method details (params, types, output)
2146
2402
  agents [--json] List pre-built agents in your organization
2147
2403
  run <appId> [json | --flags] Run a pre-built agent and wait for result
@@ -2233,8 +2489,13 @@ async function readStdin() {
2233
2489
  var HELPER_NAMES = /* @__PURE__ */ new Set([
2234
2490
  "listModels",
2235
2491
  "listModelsByType",
2492
+ "listModelsSummary",
2493
+ "listModelsSummaryByType",
2236
2494
  "listConnectors",
2237
- "getConnector"
2495
+ "getConnector",
2496
+ "getConnectorAction",
2497
+ "listConnections",
2498
+ "estimateStepCost"
2238
2499
  ]);
2239
2500
  function resolveMethodOrFail(name, metadataKeys) {
2240
2501
  if (metadataKeys.has(name)) return name;
@@ -2259,9 +2520,36 @@ async function getAllMethodKeys() {
2259
2520
  const { stepMetadata: stepMetadata2 } = await Promise.resolve().then(() => (init_metadata(), metadata_exports));
2260
2521
  return /* @__PURE__ */ new Set([...Object.keys(stepMetadata2), ...HELPER_NAMES]);
2261
2522
  }
2262
- async function cmdList(asJson) {
2523
+ var HELPER_DESCRIPTIONS2 = {
2524
+ listModels: "List all available AI models.",
2525
+ listModelsByType: "List AI models filtered by type.",
2526
+ listModelsSummary: "List all AI models (summary: id, name, type, tags).",
2527
+ listModelsSummaryByType: "List AI models (summary) filtered by type.",
2528
+ listConnectors: "List available connector services and their actions.",
2529
+ getConnector: "Get details for a connector service.",
2530
+ getConnectorAction: "Get full configuration for a connector action.",
2531
+ listConnections: "List OAuth connections for the organization.",
2532
+ estimateStepCost: "Estimate the cost of executing a step before running it.",
2533
+ listAgents: "List all pre-built agents in the organization.",
2534
+ runAgent: "Run a pre-built agent and wait for the result."
2535
+ };
2536
+ function buildSummary(stepMetadata2) {
2537
+ const summary = {};
2538
+ for (const [name, meta] of Object.entries(stepMetadata2)) {
2539
+ summary[name] = meta.description;
2540
+ }
2541
+ for (const [name, desc] of Object.entries(HELPER_DESCRIPTIONS2)) {
2542
+ summary[name] = desc;
2543
+ }
2544
+ return summary;
2545
+ }
2546
+ async function cmdList(asJson, asSummary) {
2263
2547
  const { stepMetadata: stepMetadata2 } = await Promise.resolve().then(() => (init_metadata(), metadata_exports));
2264
- if (asJson) {
2548
+ if (asSummary) {
2549
+ process.stdout.write(
2550
+ JSON.stringify(buildSummary(stepMetadata2)) + "\n"
2551
+ );
2552
+ } else if (asJson) {
2265
2553
  const entries = Object.entries(stepMetadata2).map(([name, meta]) => ({
2266
2554
  method: camelToKebab(name),
2267
2555
  description: meta.description,
@@ -2293,8 +2581,13 @@ async function cmdInfo(rawMethod) {
2293
2581
  const helpers = {
2294
2582
  listModels: { desc: "List all available AI models.", input: "(none)", output: "{ models: MindStudioModel[] }" },
2295
2583
  listModelsByType: { desc: "List AI models filtered by type.", input: "modelType: string (required)", output: "{ models: MindStudioModel[] }" },
2296
- listConnectors: { desc: "List available connector services.", input: "(none)", output: "{ services: Array }" },
2297
- getConnector: { desc: "Get details for a connector service.", input: "serviceId: string (required)", output: "{ service: object }" }
2584
+ listModelsSummary: { desc: "List all AI models (summary: id, name, type, tags).", input: "(none)", output: "{ models: MindStudioModelSummary[] }" },
2585
+ listModelsSummaryByType: { desc: "List AI models (summary) filtered by type.", input: "modelType: string (required)", output: "{ models: MindStudioModelSummary[] }" },
2586
+ listConnectors: { desc: "List available connector services and their actions.", input: "(none)", output: "{ services: ConnectorService[] }" },
2587
+ getConnector: { desc: "Get details for a connector service.", input: "serviceId: string (required)", output: "{ service: ConnectorService }" },
2588
+ getConnectorAction: { desc: "Get full configuration for a connector action.", input: "serviceId: string, actionId: string (both required)", output: "{ action: ConnectorActionDetail }" },
2589
+ listConnections: { desc: "List OAuth connections for the organization.", input: "(none)", output: "{ connections: Connection[] }" },
2590
+ estimateStepCost: { desc: "Estimate the cost of executing a step before running it.", input: "stepType: string (required), step: object, appId?: string, workflowId?: string", output: "{ costType?: string, estimates?: StepCostEstimateEntry[] }" }
2298
2591
  };
2299
2592
  const h = helpers[method];
2300
2593
  process.stderr.write(`
@@ -2376,10 +2669,32 @@ async function cmdExec(method, input, options) {
2376
2669
  result = await agent.listModels();
2377
2670
  } else if (method === "listModelsByType") {
2378
2671
  result = await agent.listModelsByType(input.modelType);
2672
+ } else if (method === "listModelsSummary") {
2673
+ result = await agent.listModelsSummary();
2674
+ } else if (method === "listModelsSummaryByType") {
2675
+ result = await agent.listModelsSummaryByType(
2676
+ input.modelType
2677
+ );
2379
2678
  } else if (method === "listConnectors") {
2380
2679
  result = await agent.listConnectors();
2381
2680
  } else if (method === "getConnector") {
2382
2681
  result = await agent.getConnector(input.serviceId);
2682
+ } else if (method === "getConnectorAction") {
2683
+ result = await agent.getConnectorAction(
2684
+ input.serviceId,
2685
+ input.actionId
2686
+ );
2687
+ } else if (method === "listConnections") {
2688
+ result = await agent.listConnections();
2689
+ } else if (method === "estimateStepCost") {
2690
+ result = await agent.estimateStepCost(
2691
+ input.stepType,
2692
+ input.step,
2693
+ {
2694
+ appId: input.appId,
2695
+ workflowId: input.workflowId
2696
+ }
2697
+ );
2383
2698
  } else {
2384
2699
  const { stepMetadata: stepMetadata2 } = await Promise.resolve().then(() => (init_metadata(), metadata_exports));
2385
2700
  const meta = stepMetadata2[method];
@@ -2494,7 +2809,7 @@ function isNewerVersion(current, latest) {
2494
2809
  return false;
2495
2810
  }
2496
2811
  async function checkForUpdate() {
2497
- const currentVersion = "0.0.20";
2812
+ const currentVersion = "0.1.1";
2498
2813
  if (!currentVersion) return null;
2499
2814
  try {
2500
2815
  const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
@@ -2523,7 +2838,7 @@ async function checkForUpdate() {
2523
2838
  }
2524
2839
  }
2525
2840
  function printUpdateNotice(latestVersion) {
2526
- const currentVersion = "0.0.20";
2841
+ const currentVersion = "0.1.1";
2527
2842
  process.stderr.write(
2528
2843
  `
2529
2844
  ${ansi.cyanBright("Update available")} ${ansi.gray(currentVersion + " \u2192")} ${ansi.cyanBold(latestVersion)}
@@ -2597,7 +2912,7 @@ async function cmdLogin(options) {
2597
2912
  process.stderr.write("\n");
2598
2913
  printLogo();
2599
2914
  process.stderr.write("\n");
2600
- const ver = "0.0.20";
2915
+ const ver = "0.1.1";
2601
2916
  process.stderr.write(
2602
2917
  ` ${ansi.bold("MindStudio")} ${ansi.gray("CLI")}${ver ? " " + ansi.gray("v" + ver) : ""}
2603
2918
  `
@@ -2830,6 +3145,7 @@ async function main() {
2830
3145
  workflow: { type: "string" },
2831
3146
  version: { type: "string" },
2832
3147
  json: { type: "boolean", default: false },
3148
+ summary: { type: "boolean", default: false },
2833
3149
  help: { type: "boolean", default: false }
2834
3150
  }
2835
3151
  });
@@ -2858,7 +3174,10 @@ async function main() {
2858
3174
  return;
2859
3175
  }
2860
3176
  if (command === "list") {
2861
- await cmdList(values.json);
3177
+ await cmdList(
3178
+ values.json,
3179
+ values.summary
3180
+ );
2862
3181
  return;
2863
3182
  }
2864
3183
  if (command === "agents") {