@mindstudio-ai/agent 0.0.20 → 0.1.0

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/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # @mindstudio-ai/agent
2
2
 
3
- TypeScript SDK, CLI, and MCP server for executing [MindStudio](https://mindstudio.ai) workflow steps directly.
3
+ Every AI model. Every integration. One SDK.
4
4
 
5
- Call any of MindStudio's 120+ built-in actions AI models, image/video generation, web scraping, integrations, and more with fully typed inputs and outputs. Use from TypeScript, the command line, or any MCP-compatible AI agent.
5
+ [MindStudio](https://mindstudio.ai) gives you direct access to 200+ AI models and [1,000+ integrations](https://github.com/mindstudio-ai/mscr) no separate API keys, no setup, no friction. This package is the developer toolkit: a TypeScript SDK, CLI, and MCP server that puts the entire platform at your fingertips.
6
+
7
+ Generate text, images, video, and audio. Scrape the web. Search Google. Post to Slack. Read from Airtable. Send emails. Process media. Connect to 850+ third-party services. All with one API key, fully typed, and ready to use from code, the command line, or any MCP-compatible AI agent.
6
8
 
7
9
  ## Install
8
10
 
@@ -21,27 +23,24 @@ import { MindStudioAgent } from '@mindstudio-ai/agent';
21
23
 
22
24
  const agent = new MindStudioAgent({ apiKey: 'your-api-key' });
23
25
 
24
- // Generate text with an AI model
26
+ // Generate text with any AI model — OpenAI, Anthropic, Google, and more
25
27
  const { content } = await agent.generateText({
26
28
  message: 'Summarize this article: ...',
27
29
  });
28
- console.log(content);
29
30
 
30
31
  // Generate an image
31
32
  const { imageUrl } = await agent.generateImage({
32
33
  prompt: 'A mountain landscape at sunset',
33
34
  });
34
- console.log(imageUrl);
35
35
 
36
36
  // Search Google
37
37
  const { results } = await agent.searchGoogle({
38
38
  query: 'TypeScript best practices',
39
39
  exportType: 'json',
40
40
  });
41
- console.log(results);
42
41
  ```
43
42
 
44
- Every method is fully typed — your editor will autocomplete available parameters, show enum options, and infer the output shape. Results are returned flat for easy destructuring.
43
+ Every method is fully typed — your editor will autocomplete parameters, show enum options, and infer the output shape. Results are returned flat for easy destructuring.
45
44
 
46
45
  ### CLI
47
46
 
@@ -49,13 +48,13 @@ Every method is fully typed — your editor will autocomplete available paramete
49
48
  # Authenticate (opens browser, saves key locally)
50
49
  mindstudio login
51
50
 
52
- # Execute a step with named flags
51
+ # Execute with named flags
53
52
  mindstudio generate-image --prompt "A mountain landscape at sunset"
54
53
 
55
- # Or with JSON input (JSON5-tolerant: unquoted keys, single quotes, trailing commas)
54
+ # Or with JSON input (JSON5-tolerant)
56
55
  mindstudio generate-image '{prompt: "A mountain landscape at sunset"}'
57
56
 
58
- # Just the image URL, no metadata
57
+ # Extract a single output field
59
58
  mindstudio generate-image --prompt "A sunset" --output-key imageUrl
60
59
 
61
60
  # List all available methods
@@ -68,7 +67,7 @@ mindstudio info generate-image
68
67
  echo '{"query": "TypeScript best practices"}' | mindstudio search-google
69
68
  ```
70
69
 
71
- Run via `npx` without installing globally:
70
+ Run via `npx` without installing:
72
71
 
73
72
  ```bash
74
73
  npx @mindstudio-ai/agent generate-text --message "Hello"
@@ -92,19 +91,19 @@ Add to your MCP client config (Claude Code, Cursor, VS Code, etc.):
92
91
  }
93
92
  ```
94
93
 
95
- All 120+ step methods are exposed as MCP tools with full JSON Schema input definitions, so your AI agent can discover and call them directly. The MCP server also exposes `listAgents` and `runAgent` tools for running pre-built agents.
94
+ Every action is exposed as an MCP tool with full JSON Schema definitions your AI agent can discover and call any of them directly.
96
95
 
97
96
  ## Authentication
98
97
 
99
- The fastest way to authenticate is the interactive login:
98
+ The fastest way to get started:
100
99
 
101
100
  ```bash
102
101
  mindstudio login
103
102
  ```
104
103
 
105
- This opens your browser, authenticates with MindStudio, and saves your API key to `~/.mindstudio/config.json`. All subsequent CLI and SDK usage will pick it up automatically.
104
+ Opens your browser, authenticates with MindStudio, and saves your API key to `~/.mindstudio/config.json`. All subsequent usage picks it up automatically.
106
105
 
107
- You can also authenticate via environment variable or constructor parameter:
106
+ You can also authenticate via environment variable or constructor:
108
107
 
109
108
  ```typescript
110
109
  // Pass directly
@@ -115,88 +114,76 @@ const agent = new MindStudioAgent({ apiKey: 'your-api-key' });
115
114
  const agent = new MindStudioAgent();
116
115
  ```
117
116
 
118
- MindStudio routes to the correct AI provider (OpenAI, Google, Anthropic, etc.) server-side — you do not need separate provider API keys.
117
+ One API key is all you need. MindStudio routes to the correct AI provider (OpenAI, Google, Anthropic, Meta, xAI, DeepSeek, etc.) server-side — no separate provider keys required.
119
118
 
120
119
  Other auth commands:
121
120
 
122
121
  ```bash
123
- # Check current auth status and verify credentials
124
- mindstudio whoami
125
-
126
- # Clear stored credentials
127
- mindstudio logout
122
+ mindstudio whoami # Check current auth status
123
+ mindstudio logout # Clear stored credentials
128
124
  ```
129
125
 
130
126
  Resolution order: constructor `apiKey` > `MINDSTUDIO_API_KEY` env > `~/.mindstudio/config.json` > `CALLBACK_TOKEN` env.
131
127
 
132
- ## Thread persistence
128
+ ## 200+ AI models
133
129
 
134
- Steps execute within threads. Pass `$threadId` and `$appId` from a previous call to maintain state across calls:
130
+ Direct access to models from every major provider all through a single API key, billed at cost with no markups.
135
131
 
136
132
  ```typescript
137
- const r1 = await agent.generateText({
138
- message: 'My name is Alice',
139
- });
140
-
141
- // The model remembers the conversation
142
- const r2 = await agent.generateText(
143
- { message: 'What is my name?' },
144
- { threadId: r1.$threadId, appId: r1.$appId },
145
- );
146
- ```
133
+ // Browse available models
134
+ const { models } = await agent.listModelsSummary();
147
135
 
148
- ### Automatic thread reuse
149
-
150
- For local debugging or scripts where you want all calls to share a single thread (similar to how MindStudio custom function sandboxes work), enable `reuseThreadId`:
151
-
152
- ```typescript
153
- const agent = new MindStudioAgent({ reuseThreadId: true });
136
+ // Filter by type
137
+ const { models: imageModels } = await agent.listModelsSummaryByType('image_generation');
154
138
 
155
- // Or set the environment variable
156
- // MINDSTUDIO_REUSE_THREAD_ID=true
139
+ // Use a specific model
140
+ const { models: chatModels } = await agent.listModelsByType('llm_chat');
141
+ const gemini = chatModels.find(m => m.name.includes('Gemini'));
157
142
 
158
- await agent.generateText({ message: 'My name is Alice' }); // creates a thread
159
- await agent.generateText({ message: 'What is my name?' }); // reuses the same thread automatically
143
+ const { content } = await agent.generateText({
144
+ message: 'Hello',
145
+ modelOverride: {
146
+ model: gemini.id,
147
+ temperature: 0.7,
148
+ maxResponseTokens: 1024,
149
+ },
150
+ });
160
151
  ```
161
152
 
162
- The thread ID from the first response is captured and sent with all subsequent calls. You can still override it per-call by passing an explicit `threadId` in the options.
163
-
164
- ## Rate limiting
165
-
166
- Rate limiting is handled automatically:
153
+ Model types: `llm_chat`, `image_generation`, `video_generation`, `video_analysis`, `text_to_speech`, `vision`, `transcription`.
167
154
 
168
- - **Concurrency queue** — requests beyond the server's concurrent limit are queued and proceed as slots open up (10 for internal tokens, 20 for API keys)
169
- - **Auto-retry on 429** — rate-limited responses are retried automatically using the `Retry-After` header (default: 3 retries, configurable via `maxRetries`)
170
- - **Call cap** — internal tokens are capped at 500 calls per execution; the SDK throws `MindStudioError` with code `call_cap_exceeded` rather than sending requests that will fail
155
+ ## 1,000+ integrations
171
156
 
172
- Every result includes `$rateLimitRemaining` so you can throttle proactively:
157
+ 850+ third-party connectors from the open-source [MindStudio Connector Registry (MSCR)](https://github.com/mindstudio-ai/mscr) — Slack, Google, HubSpot, Salesforce, Airtable, Notion, and hundreds more — alongside 140+ built-in actions for AI, media, web, and data processing.
173
158
 
174
159
  ```typescript
175
- const result = await agent.generateText({ message: 'Hello' });
176
- console.log(result.$rateLimitRemaining); // calls remaining in window
177
- ```
160
+ // Browse connectors and their actions
161
+ const { services } = await agent.listConnectors();
162
+ const { action } = await agent.getConnectorAction('slack', 'slack/send-message');
178
163
 
179
- ## Billing
164
+ // Check which services are connected in your org
165
+ const { connections } = await agent.listConnections();
180
166
 
181
- Every result includes optional billing metadata:
182
-
183
- ```typescript
184
- const result = await agent.generateImage({ prompt: 'A sunset' });
185
- console.log(result.$billingCost); // cost in credits for this call
186
- console.log(result.$billingEvents); // itemized billing events
167
+ // Execute a connector action
168
+ const result = await agent.runFromConnectorRegistry({
169
+ serviceId: 'slack',
170
+ actionId: 'slack/send-message',
171
+ connectionId: 'your-connection-id',
172
+ // ... action-specific fields from getConnectorAction()
173
+ });
187
174
  ```
188
175
 
189
- These fields are `undefined` when the server does not return billing headers.
176
+ Connectors require the user to connect to the third-party service in MindStudio before use. Use `listConnections()` to check what's available.
190
177
 
191
- ## Available steps
178
+ ## Built-in actions
192
179
 
193
- Every step has a dedicated typed method. A few highlights:
180
+ Every action has a dedicated typed method. A few highlights:
194
181
 
195
182
  | Method | Description |
196
183
  | --- | --- |
197
- | `generateText()` | Send a message to an AI model |
198
- | `generateImage()` | Generate an image from a text prompt |
199
- | `generateVideo()` | Generate a video from a text prompt |
184
+ | `generateText()` | Send a message to any AI model |
185
+ | `generateImage()` | Generate an image from a prompt |
186
+ | `generateVideo()` | Generate a video from a prompt |
200
187
  | `generateAsset()` | Generate an HTML/PDF/PNG/video asset |
201
188
  | `analyzeImage()` | Analyze an image with a vision model |
202
189
  | `textToSpeech()` | Convert text to speech |
@@ -206,9 +193,9 @@ Every step has a dedicated typed method. A few highlights:
206
193
  | `httpRequest()` | Make an HTTP request |
207
194
  | `sendEmail()` | Send an email |
208
195
  | `postToSlackChannel()` | Post to a Slack channel |
209
- | `runWorkflow()` | Run another MindStudio workflow |
196
+ | `runPackagedWorkflow()` | Run another MindStudio workflow |
210
197
 
211
- ...and 100+ more for Google Docs/Sheets/Calendar, YouTube, LinkedIn, HubSpot, Airtable, Notion, Coda, Telegram, media processing, PII detection, and more.
198
+ ...and 130+ more for Google Docs/Sheets/Calendar, YouTube, LinkedIn, HubSpot, Airtable, Notion, Coda, Telegram, media processing, PII detection, and more.
212
199
 
213
200
  All methods show full documentation in your editor's IntelliSense — hover any method to see usage notes, parameter descriptions, and enum options.
214
201
 
@@ -239,19 +226,35 @@ const result = await agent.runAgent({
239
226
  });
240
227
  ```
241
228
 
242
- `runAgent()` always uses async mode internally — it submits the run, then polls for the result until it completes or fails. The poll interval defaults to 1 second and can be configured with `pollIntervalMs`.
229
+ `runAgent()` uses async polling internally — it submits the run, then polls until complete or failed. The poll interval defaults to 1 second and can be configured with `pollIntervalMs`.
243
230
 
244
- ## Helpers
231
+ ## Thread persistence
232
+
233
+ Steps execute within threads. Pass `$threadId` and `$appId` from a previous call to maintain state:
245
234
 
246
235
  ```typescript
247
- // List all available AI models
248
- const { models } = await agent.listModels();
236
+ const r1 = await agent.generateText({
237
+ message: 'My name is Alice',
238
+ });
249
239
 
250
- // Filter by type
251
- const { models: chatModels } = await agent.listModelsByType('llm_chat');
240
+ // The model remembers the conversation
241
+ const r2 = await agent.generateText(
242
+ { message: 'What is my name?' },
243
+ { threadId: r1.$threadId, appId: r1.$appId },
244
+ );
245
+ ```
252
246
 
253
- // List available connector services
254
- const { services } = await agent.listConnectors();
247
+ ### Automatic thread reuse
248
+
249
+ For scripts where all calls should share a single thread:
250
+
251
+ ```typescript
252
+ const agent = new MindStudioAgent({ reuseThreadId: true });
253
+
254
+ // Or set MINDSTUDIO_REUSE_THREAD_ID=true
255
+
256
+ await agent.generateText({ message: 'My name is Alice' }); // creates a thread
257
+ await agent.generateText({ message: 'What is my name?' }); // reuses it automatically
255
258
  ```
256
259
 
257
260
  ## Configuration
@@ -274,19 +277,54 @@ const agent = new MindStudioAgent({
274
277
  });
275
278
  ```
276
279
 
280
+ ## Rate limiting
281
+
282
+ Handled automatically:
283
+
284
+ - **Concurrency queue** — requests beyond the server's concurrent limit are queued and proceed as slots open up
285
+ - **Auto-retry on 429** — rate-limited responses are retried using the `Retry-After` header (default: 3 retries, configurable via `maxRetries`)
286
+ - **Call cap** — internal tokens are capped at 500 calls per execution
287
+
288
+ Every result includes `$rateLimitRemaining` so you can throttle proactively.
289
+
290
+ ## Billing
291
+
292
+ Every result includes optional billing metadata:
293
+
294
+ ```typescript
295
+ const result = await agent.generateImage({ prompt: 'A sunset' });
296
+ console.log(result.$billingCost); // cost in credits for this call
297
+ console.log(result.$billingEvents); // itemized billing events
298
+ ```
299
+
300
+ ## Error handling
301
+
302
+ ```typescript
303
+ import { MindStudioAgent, MindStudioError } from '@mindstudio-ai/agent';
304
+
305
+ try {
306
+ await agent.generateImage({ prompt: '...' });
307
+ } catch (err) {
308
+ if (err instanceof MindStudioError) {
309
+ console.error(err.message); // Human-readable message
310
+ console.error(err.code); // "invalid_step_config", "api_error", "call_cap_exceeded", etc.
311
+ console.error(err.status); // HTTP status (400, 401, 429, etc.)
312
+ console.error(err.details); // Raw API error body
313
+ }
314
+ }
315
+ ```
316
+
277
317
  ## Low-level access
278
318
 
279
- For step types not yet in the generated methods, use `executeStep()` directly:
319
+ For step types not yet in the generated methods:
280
320
 
281
321
  ```typescript
282
- const result = await agent.executeStep('someNewStep', {
283
- param1: 'value',
284
- });
322
+ const result = await agent.executeStep('someNewStep', { param1: 'value' });
285
323
  ```
286
324
 
287
325
  ## Types
288
326
 
289
- All input/output types are exported for use in your own code:
327
+ All input/output types are exported:
290
328
 
291
329
  ```typescript
292
330
  import type {
@@ -408,7 +446,7 @@ mindstudio generate-text --message "What is my name?" \
408
446
 
409
447
  ## MCP server
410
448
 
411
- The package includes a built-in [MCP](https://modelcontextprotocol.io) (Model Context Protocol) server. It exposes all step methods and helpers as tools, so any MCP-compatible AI agent (Claude Code, Cursor, Windsurf, VS Code Copilot, etc.) can discover and call them.
449
+ The package includes a built-in [MCP](https://modelcontextprotocol.io) (Model Context Protocol) server. It exposes every action, helper, and agent tool so any MCP-compatible AI agent (Claude Code, Cursor, Windsurf, VS Code Copilot, etc.) can discover and use the full platform.
412
450
 
413
451
  Start manually:
414
452
 
@@ -456,24 +494,7 @@ The raw OpenAPI spec that this SDK is generated from is available at:
456
494
  https://v1.mindstudio-api.com/developer/v2/steps/openapi.json
457
495
  ```
458
496
 
459
- This contains full JSON Schema definitions for every step's input and output, descriptions, and usage notes. Useful if you want to build your own tooling, code generators, or integrations.
460
-
461
- ## Error handling
462
-
463
- ```typescript
464
- import { MindStudioAgent, MindStudioError } from '@mindstudio-ai/agent';
465
-
466
- try {
467
- await agent.generateImage({ prompt: '...' });
468
- } catch (err) {
469
- if (err instanceof MindStudioError) {
470
- console.error(err.message); // Human-readable message
471
- console.error(err.code); // Machine-readable code (e.g. "invalid_step_config")
472
- console.error(err.status); // HTTP status (e.g. 400)
473
- console.error(err.details); // Raw API error body
474
- }
475
- }
476
- ```
497
+ Full JSON Schema definitions for every step's input and output. Useful for building your own tooling, code generators, or integrations.
477
498
 
478
499
  ## License
479
500
 
package/dist/cli.js CHANGED
@@ -698,6 +698,13 @@ var init_metadata = __esm({
698
698
  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
699
  outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the resized video" } }, "required": ["videoUrl"] }
700
700
  },
701
+ "runFromConnectorRegistry": {
702
+ stepType: "runFromConnectorRegistry",
703
+ description: "Run a raw API connector to a third-party service",
704
+ 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).',
705
+ 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" },
706
+ outputSchema: { "type": "object", "properties": { "data": { "type": "object", "description": "Key-value map of output variables set by the connector" } }, "required": ["data"] }
707
+ },
701
708
  "runPackagedWorkflow": {
702
709
  stepType: "runPackagedWorkflow",
703
710
  description: 'Run a packaged workflow ("custom block")',
@@ -1534,6 +1541,9 @@ function applyStepMethods(AgentClass) {
1534
1541
  proto.resizeVideo = function(step, options) {
1535
1542
  return this.executeStep("resizeVideo", step, options);
1536
1543
  };
1544
+ proto.runFromConnectorRegistry = function(step, options) {
1545
+ return this.executeStep("runFromConnectorRegistry", step, options);
1546
+ };
1537
1547
  proto.runPackagedWorkflow = function(step, options) {
1538
1548
  return this.executeStep("runPackagedWorkflow", step, options);
1539
1549
  };
@@ -1707,12 +1717,24 @@ function applyHelperMethods(AgentClass) {
1707
1717
  proto.listModelsByType = function(modelType) {
1708
1718
  return this._request("GET", `/helpers/models/${modelType}`).then((r) => r.data);
1709
1719
  };
1720
+ proto.listModelsSummary = function() {
1721
+ return this._request("GET", "/helpers/models-summary").then((r) => r.data);
1722
+ };
1723
+ proto.listModelsSummaryByType = function(modelType) {
1724
+ return this._request("GET", `/helpers/models-summary/${modelType}`).then((r) => r.data);
1725
+ };
1710
1726
  proto.listConnectors = function() {
1711
1727
  return this._request("GET", "/helpers/connectors").then((r) => r.data);
1712
1728
  };
1713
1729
  proto.getConnector = function(serviceId) {
1714
1730
  return this._request("GET", `/helpers/connectors/${serviceId}`).then((r) => r.data);
1715
1731
  };
1732
+ proto.getConnectorAction = function(serviceId, actionId) {
1733
+ return this._request("GET", `/helpers/connectors/${serviceId}/${actionId}`).then((r) => r.data);
1734
+ };
1735
+ proto.listConnections = function() {
1736
+ return this._request("GET", "/helpers/connections").then((r) => r.data);
1737
+ };
1716
1738
  }
1717
1739
  var init_helpers = __esm({
1718
1740
  "src/generated/helpers.ts"() {
@@ -1966,7 +1988,7 @@ async function startMcpServer(options) {
1966
1988
  capabilities: { tools: {} },
1967
1989
  serverInfo: {
1968
1990
  name: "mindstudio-agent",
1969
- version: "0.0.20"
1991
+ version: "0.1.0"
1970
1992
  }
1971
1993
  });
1972
1994
  break;
@@ -1986,12 +2008,25 @@ async function startMcpServer(options) {
1986
2008
  result = await getAgent().listModelsByType(
1987
2009
  args.modelType
1988
2010
  );
2011
+ } else if (toolName === "listModelsSummary") {
2012
+ result = await getAgent().listModelsSummary();
2013
+ } else if (toolName === "listModelsSummaryByType") {
2014
+ result = await getAgent().listModelsSummaryByType(
2015
+ args.modelType
2016
+ );
1989
2017
  } else if (toolName === "listConnectors") {
1990
2018
  result = await getAgent().listConnectors();
1991
2019
  } else if (toolName === "getConnector") {
1992
2020
  result = await getAgent().getConnector(
1993
2021
  args.serviceId
1994
2022
  );
2023
+ } else if (toolName === "getConnectorAction") {
2024
+ result = await getAgent().getConnectorAction(
2025
+ args.serviceId,
2026
+ args.actionId
2027
+ );
2028
+ } else if (toolName === "listConnections") {
2029
+ result = await getAgent().listConnections();
1995
2030
  } else if (toolName === "listAgents") {
1996
2031
  result = await getAgent().listAgents();
1997
2032
  } else if (toolName === "runAgent") {
@@ -2080,9 +2115,36 @@ var init_mcp = __esm({
2080
2115
  required: ["modelType"]
2081
2116
  }
2082
2117
  },
2118
+ {
2119
+ name: "listModelsSummary",
2120
+ description: "List all available AI models (summary) with only id, name, type, and tags. Suitable for display or consumption inside a model context window.",
2121
+ inputSchema: { type: "object", properties: {} }
2122
+ },
2123
+ {
2124
+ name: "listModelsSummaryByType",
2125
+ description: "List AI models (summary) filtered by type.",
2126
+ inputSchema: {
2127
+ type: "object",
2128
+ properties: {
2129
+ modelType: {
2130
+ type: "string",
2131
+ enum: [
2132
+ "llm_chat",
2133
+ "image_generation",
2134
+ "video_generation",
2135
+ "video_analysis",
2136
+ "text_to_speech",
2137
+ "vision",
2138
+ "transcription"
2139
+ ]
2140
+ }
2141
+ },
2142
+ required: ["modelType"]
2143
+ }
2144
+ },
2083
2145
  {
2084
2146
  name: "listConnectors",
2085
- description: "List available connector services (Slack, Google, HubSpot, etc.).",
2147
+ description: "List available connector services (Slack, Google, HubSpot, etc.) and their actions.",
2086
2148
  inputSchema: { type: "object", properties: {} }
2087
2149
  },
2088
2150
  {
@@ -2094,6 +2156,29 @@ var init_mcp = __esm({
2094
2156
  required: ["serviceId"]
2095
2157
  }
2096
2158
  },
2159
+ {
2160
+ name: "getConnectorAction",
2161
+ description: "Get the full configuration for a connector action, including all input fields needed to call it via runFromConnectorRegistry.",
2162
+ inputSchema: {
2163
+ type: "object",
2164
+ properties: {
2165
+ serviceId: {
2166
+ type: "string",
2167
+ description: "The connector service ID."
2168
+ },
2169
+ actionId: {
2170
+ type: "string",
2171
+ description: 'The full action ID including service prefix (e.g. "slack/send-message").'
2172
+ }
2173
+ },
2174
+ required: ["serviceId", "actionId"]
2175
+ }
2176
+ },
2177
+ {
2178
+ name: "listConnections",
2179
+ description: "List OAuth connections for the organization. Use the returned connection IDs when calling connector actions.",
2180
+ inputSchema: { type: "object", properties: {} }
2181
+ },
2097
2182
  {
2098
2183
  name: "listAgents",
2099
2184
  description: "List all pre-built agents in the organization along with org metadata.",
@@ -2233,8 +2318,12 @@ async function readStdin() {
2233
2318
  var HELPER_NAMES = /* @__PURE__ */ new Set([
2234
2319
  "listModels",
2235
2320
  "listModelsByType",
2321
+ "listModelsSummary",
2322
+ "listModelsSummaryByType",
2236
2323
  "listConnectors",
2237
- "getConnector"
2324
+ "getConnector",
2325
+ "getConnectorAction",
2326
+ "listConnections"
2238
2327
  ]);
2239
2328
  function resolveMethodOrFail(name, metadataKeys) {
2240
2329
  if (metadataKeys.has(name)) return name;
@@ -2293,8 +2382,12 @@ async function cmdInfo(rawMethod) {
2293
2382
  const helpers = {
2294
2383
  listModels: { desc: "List all available AI models.", input: "(none)", output: "{ models: MindStudioModel[] }" },
2295
2384
  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 }" }
2385
+ listModelsSummary: { desc: "List all AI models (summary: id, name, type, tags).", input: "(none)", output: "{ models: MindStudioModelSummary[] }" },
2386
+ listModelsSummaryByType: { desc: "List AI models (summary) filtered by type.", input: "modelType: string (required)", output: "{ models: MindStudioModelSummary[] }" },
2387
+ listConnectors: { desc: "List available connector services and their actions.", input: "(none)", output: "{ services: ConnectorService[] }" },
2388
+ getConnector: { desc: "Get details for a connector service.", input: "serviceId: string (required)", output: "{ service: ConnectorService }" },
2389
+ getConnectorAction: { desc: "Get full configuration for a connector action.", input: "serviceId: string, actionId: string (both required)", output: "{ action: ConnectorActionDetail }" },
2390
+ listConnections: { desc: "List OAuth connections for the organization.", input: "(none)", output: "{ connections: Connection[] }" }
2298
2391
  };
2299
2392
  const h = helpers[method];
2300
2393
  process.stderr.write(`
@@ -2376,10 +2469,23 @@ async function cmdExec(method, input, options) {
2376
2469
  result = await agent.listModels();
2377
2470
  } else if (method === "listModelsByType") {
2378
2471
  result = await agent.listModelsByType(input.modelType);
2472
+ } else if (method === "listModelsSummary") {
2473
+ result = await agent.listModelsSummary();
2474
+ } else if (method === "listModelsSummaryByType") {
2475
+ result = await agent.listModelsSummaryByType(
2476
+ input.modelType
2477
+ );
2379
2478
  } else if (method === "listConnectors") {
2380
2479
  result = await agent.listConnectors();
2381
2480
  } else if (method === "getConnector") {
2382
2481
  result = await agent.getConnector(input.serviceId);
2482
+ } else if (method === "getConnectorAction") {
2483
+ result = await agent.getConnectorAction(
2484
+ input.serviceId,
2485
+ input.actionId
2486
+ );
2487
+ } else if (method === "listConnections") {
2488
+ result = await agent.listConnections();
2383
2489
  } else {
2384
2490
  const { stepMetadata: stepMetadata2 } = await Promise.resolve().then(() => (init_metadata(), metadata_exports));
2385
2491
  const meta = stepMetadata2[method];
@@ -2494,7 +2600,7 @@ function isNewerVersion(current, latest) {
2494
2600
  return false;
2495
2601
  }
2496
2602
  async function checkForUpdate() {
2497
- const currentVersion = "0.0.20";
2603
+ const currentVersion = "0.1.0";
2498
2604
  if (!currentVersion) return null;
2499
2605
  try {
2500
2606
  const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
@@ -2523,7 +2629,7 @@ async function checkForUpdate() {
2523
2629
  }
2524
2630
  }
2525
2631
  function printUpdateNotice(latestVersion) {
2526
- const currentVersion = "0.0.20";
2632
+ const currentVersion = "0.1.0";
2527
2633
  process.stderr.write(
2528
2634
  `
2529
2635
  ${ansi.cyanBright("Update available")} ${ansi.gray(currentVersion + " \u2192")} ${ansi.cyanBold(latestVersion)}
@@ -2597,7 +2703,7 @@ async function cmdLogin(options) {
2597
2703
  process.stderr.write("\n");
2598
2704
  printLogo();
2599
2705
  process.stderr.write("\n");
2600
- const ver = "0.0.20";
2706
+ const ver = "0.1.0";
2601
2707
  process.stderr.write(
2602
2708
  ` ${ansi.bold("MindStudio")} ${ansi.gray("CLI")}${ver ? " " + ansi.gray("v" + ver) : ""}
2603
2709
  `