@mastra/mcp-docs-server 0.13.27 β 0.13.28-alpha.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/.docs/organized/changelogs/%40internal%2Fplayground.md +3 -1
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +10 -10
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +4 -0
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +13 -13
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +11 -0
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +23 -23
- package/.docs/organized/changelogs/%40mastra%2Fcloud.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +57 -57
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +22 -22
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +43 -43
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +18 -18
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Flance.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +16 -16
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +12 -12
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +63 -63
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Frag.md +13 -13
- package/.docs/organized/changelogs/%40mastra%2Freact.md +18 -0
- package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +12 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +25 -25
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +9 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +13 -13
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +10 -10
- package/.docs/organized/changelogs/create-mastra.md +59 -59
- package/.docs/organized/changelogs/mastra.md +77 -77
- package/.docs/raw/agents/runtime-context.mdx +11 -16
- package/.docs/raw/agents/using-tools-and-mcp.mdx +1 -1
- package/.docs/raw/getting-started/model-providers.mdx +5 -3
- package/.docs/raw/reference/streaming/ChunkType.mdx +2 -6
- package/.docs/raw/reference/streaming/agents/MastraModelOutput.mdx +1 -5
- package/.docs/raw/workflows/overview.mdx +22 -5
- package/CHANGELOG.md +7 -0
- package/package.json +4 -4
|
@@ -1,5 +1,81 @@
|
|
|
1
1
|
# mastra
|
|
2
2
|
|
|
3
|
+
## 0.14.2-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- streamLegacy/generateLegacy clarification in playground ([#8468](https://github.com/mastra-ai/mastra/pull/8468))
|
|
8
|
+
|
|
9
|
+
- Fix useStreamWorkflow unmounting breaking stream call ([#8449](https://github.com/mastra-ai/mastra/pull/8449))
|
|
10
|
+
|
|
11
|
+
- Remove shell from dev ([#8466](https://github.com/mastra-ai/mastra/pull/8466))
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`10e633a`](https://github.com/mastra-ai/mastra/commit/10e633a07d333466d9734c97acfc3dbf757ad2d0)]:
|
|
14
|
+
- @mastra/core@0.20.1-alpha.0
|
|
15
|
+
- @mastra/deployer@0.20.1-alpha.0
|
|
16
|
+
|
|
17
|
+
## 0.14.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Make init versions latest pkgs ([#8434](https://github.com/mastra-ai/mastra/pull/8434))
|
|
22
|
+
|
|
23
|
+
## 0.14.1-alpha.0
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Make init versions latest pkgs ([#8434](https://github.com/mastra-ai/mastra/pull/8434))
|
|
28
|
+
|
|
29
|
+
## 0.14.0
|
|
30
|
+
|
|
31
|
+
### Minor Changes
|
|
32
|
+
|
|
33
|
+
- Breaking change to move the agent.streamVNext/generateVNext implementation to the default stream/generate. The old stream/generate have now been moved to streamLegacy and generateLegacy ([#8097](https://github.com/mastra-ai/mastra/pull/8097))
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- Remove log drains UI from the playground ([#8379](https://github.com/mastra-ai/mastra/pull/8379))
|
|
38
|
+
|
|
39
|
+
- add refetch interval to traces to make it feel "instant" ([#8386](https://github.com/mastra-ai/mastra/pull/8386))
|
|
40
|
+
|
|
41
|
+
- better memory message ([#8382](https://github.com/mastra-ai/mastra/pull/8382))
|
|
42
|
+
|
|
43
|
+
- Add doc url to netlify gateway ([#8356](https://github.com/mastra-ai/mastra/pull/8356))
|
|
44
|
+
|
|
45
|
+
- fix codeblock line number color contrast for legacy traces ([#8385](https://github.com/mastra-ai/mastra/pull/8385))
|
|
46
|
+
|
|
47
|
+
- Model router documentation and playground UI improvements ([#8372](https://github.com/mastra-ai/mastra/pull/8372))
|
|
48
|
+
|
|
49
|
+
**Documentation generation (`@mastra/core`):**
|
|
50
|
+
- Fixed inverted dynamic model selection logic in provider examples
|
|
51
|
+
- Improved copy: replaced marketing language with action-oriented descriptions
|
|
52
|
+
- Added generated file comments with timestamps to all MDX outputs so maintainers know not to directly edit generated files
|
|
53
|
+
|
|
54
|
+
**Playground UI model picker (`@mastra/playground-ui`):**
|
|
55
|
+
- Fixed provider field clearing when typing in model input
|
|
56
|
+
- Added responsive layout (stacks on mobile, side-by-side on desktop)
|
|
57
|
+
- Improved general styling of provider/model pickers
|
|
58
|
+
|
|
59
|
+
**Environment variables (`@mastra/deployer`):**
|
|
60
|
+
- Properly handle array of env vars (e.g., NETLIFY_TOKEN, NETLIFY_SITE_ID)
|
|
61
|
+
- Added correct singular/plural handling for "environment variable(s)"
|
|
62
|
+
|
|
63
|
+
- fix playground message history initial state for v1 models ([#8427](https://github.com/mastra-ai/mastra/pull/8427))
|
|
64
|
+
|
|
65
|
+
- show thread list in desc order ([#8381](https://github.com/mastra-ai/mastra/pull/8381))
|
|
66
|
+
|
|
67
|
+
- Fix an issue preventing showing working memory and semantic recall in the playground ([#8358](https://github.com/mastra-ai/mastra/pull/8358))
|
|
68
|
+
|
|
69
|
+
- Fix shell option breaking server start on windows env ([#8377](https://github.com/mastra-ai/mastra/pull/8377))
|
|
70
|
+
|
|
71
|
+
- Add observe strean to get streans after workflow has been interrupted ([#8318](https://github.com/mastra-ai/mastra/pull/8318))
|
|
72
|
+
|
|
73
|
+
- Updated dependencies [[`00cb6bd`](https://github.com/mastra-ai/mastra/commit/00cb6bdf78737c0fac14a5a0c7b532a11e38558a), [`869ba22`](https://github.com/mastra-ai/mastra/commit/869ba222e1d6b58fc1b65e7c9fd55ca4e01b8c2f), [`1b73665`](https://github.com/mastra-ai/mastra/commit/1b73665e8e23f5c09d49fcf3e7d709c75259259e), [`989a4db`](https://github.com/mastra-ai/mastra/commit/989a4dbbaf07a2794d0e1863714c6d10f1244d6b), [`f7d7475`](https://github.com/mastra-ai/mastra/commit/f7d747507341aef60ed39e4b49318db1f86034a6), [`084b77b`](https://github.com/mastra-ai/mastra/commit/084b77b2955960e0190af8db3f77138aa83ed65c), [`a93ff84`](https://github.com/mastra-ai/mastra/commit/a93ff84b5e1af07ee236ac8873dac9b49aa5d501), [`bc5aacb`](https://github.com/mastra-ai/mastra/commit/bc5aacb646d468d325327e36117129f28cd13bf6), [`03622f8`](https://github.com/mastra-ai/mastra/commit/03622f86e9d7342197f80f95333ea3ff65c783ae), [`6b5af12`](https://github.com/mastra-ai/mastra/commit/6b5af12ce9e09066e0c32e821c203a6954498bea), [`bf60e4a`](https://github.com/mastra-ai/mastra/commit/bf60e4a89c515afd9570b7b79f33b95e7d07c397), [`d41aee5`](https://github.com/mastra-ai/mastra/commit/d41aee526d124e35f42720a08e64043229193679), [`e8fe13c`](https://github.com/mastra-ai/mastra/commit/e8fe13c4b4c255a42520127797ec394310f7c919), [`3ca833d`](https://github.com/mastra-ai/mastra/commit/3ca833dc994c38e3c9b4f9b4478a61cd8e07b32a), [`1edb8d1`](https://github.com/mastra-ai/mastra/commit/1edb8d1cfb963e72a12412990fb9170936c9904c), [`fbf6e32`](https://github.com/mastra-ai/mastra/commit/fbf6e324946332d0f5ed8930bf9d4d4479cefd7a), [`4753027`](https://github.com/mastra-ai/mastra/commit/4753027ee889288775c6958bdfeda03ff909af67)]:
|
|
74
|
+
- @mastra/core@0.20.0
|
|
75
|
+
- @mastra/deployer@0.20.0
|
|
76
|
+
- @mastra/mcp@0.13.3
|
|
77
|
+
- @mastra/loggers@0.10.15
|
|
78
|
+
|
|
3
79
|
## 0.14.0-alpha.0
|
|
4
80
|
|
|
5
81
|
### Minor Changes
|
|
@@ -222,81 +298,5 @@
|
|
|
222
298
|
|
|
223
299
|
### Patch Changes
|
|
224
300
|
|
|
225
|
-
- Get rid off swr one for all ([#7931](https://github.com/mastra-ai/mastra/pull/7931))
|
|
226
|
-
|
|
227
|
-
- Updated dependencies [[`a61f23f`](https://github.com/mastra-ai/mastra/commit/a61f23fbbca4b88b763d94f1d784c47895ed72d7), [`d1dc606`](https://github.com/mastra-ai/mastra/commit/d1dc6067b0557a71190b68d56ee15b48c26d2411), [`d3bd4d4`](https://github.com/mastra-ai/mastra/commit/d3bd4d482a685bbb67bfa89be91c90dca3fa71ad)]:
|
|
228
|
-
- @mastra/core@0.17.2-alpha.0
|
|
229
|
-
- @mastra/deployer@0.17.2-alpha.0
|
|
230
|
-
|
|
231
|
-
## 0.13.1
|
|
232
|
-
|
|
233
|
-
### Patch Changes
|
|
234
|
-
|
|
235
|
-
- fix workflow resuming issue in the playground ([#7988](https://github.com/mastra-ai/mastra/pull/7988))
|
|
236
|
-
|
|
237
|
-
- Updated dependencies [[`fd00e63`](https://github.com/mastra-ai/mastra/commit/fd00e63759cbcca3473c40cac9843280b0557cff), [`ab610f6`](https://github.com/mastra-ai/mastra/commit/ab610f6f41dbfe6c9502368671485ca7a0aac09b), [`e6bda5f`](https://github.com/mastra-ai/mastra/commit/e6bda5f954ee8493ea18adc1a883f0a5b785ad9b)]:
|
|
238
|
-
- @mastra/core@0.17.1
|
|
239
|
-
- @mastra/deployer@0.17.1
|
|
240
|
-
|
|
241
|
-
## 0.13.1-alpha.0
|
|
242
|
-
|
|
243
|
-
### Patch Changes
|
|
244
|
-
|
|
245
|
-
- fix workflow resuming issue in the playground ([#7988](https://github.com/mastra-ai/mastra/pull/7988))
|
|
246
|
-
|
|
247
|
-
- Updated dependencies [[`fd00e63`](https://github.com/mastra-ai/mastra/commit/fd00e63759cbcca3473c40cac9843280b0557cff), [`ab610f6`](https://github.com/mastra-ai/mastra/commit/ab610f6f41dbfe6c9502368671485ca7a0aac09b), [`e6bda5f`](https://github.com/mastra-ai/mastra/commit/e6bda5f954ee8493ea18adc1a883f0a5b785ad9b)]:
|
|
248
|
-
- @mastra/core@0.17.1-alpha.0
|
|
249
|
-
- @mastra/deployer@0.17.1-alpha.0
|
|
250
|
-
|
|
251
|
-
## 0.13.0
|
|
252
|
-
|
|
253
|
-
### Minor Changes
|
|
254
|
-
|
|
255
|
-
- Improved workspace dependency resolution during development and builds. This makes the build process more reliable when working with monorepos and workspace packages, reducing potential bundling errors and improving development experience. ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
|
|
256
|
-
|
|
257
|
-
### Patch Changes
|
|
258
|
-
|
|
259
|
-
- clean up console logs in monorepo ([#7926](https://github.com/mastra-ai/mastra/pull/7926))
|
|
260
|
-
|
|
261
|
-
- update playground workflows to use createRunAsync instead of createRun ([#7903](https://github.com/mastra-ai/mastra/pull/7903))
|
|
262
|
-
|
|
263
|
-
- Improve the `mastra init` CLI. ([#7837](https://github.com/mastra-ai/mastra/pull/7837))
|
|
264
|
-
|
|
265
|
-
Previously, when you ran `mastra init` in a directory without a `package.json` file you'd receive no output. Now the CLI shows an error with next steps. Additionally, `mastra init` now also installs `zod` if not present already.
|
|
266
|
-
|
|
267
|
-
- Add support for running the Mastra dev server over HTTPS for local development. ([#7871](https://github.com/mastra-ai/mastra/pull/7871))
|
|
268
|
-
- Add `--https` flag for `mastra dev`. This automatically creates a local key and certificate for you.
|
|
269
|
-
- Alternatively, you can provide your own key and cert through `server.https`:
|
|
270
|
-
|
|
271
|
-
```ts
|
|
272
|
-
// src/mastra/index.ts
|
|
273
|
-
import { Mastra } from '@mastra/core/mastra';
|
|
274
|
-
import fs from 'node:fs';
|
|
275
|
-
|
|
276
|
-
export const mastra = new Mastra({
|
|
277
|
-
server: {
|
|
278
|
-
https: {
|
|
279
|
-
key: fs.readFileSync('path/to/key.pem'),
|
|
280
|
-
cert: fs.readFileSync('path/to/cert.pem'),
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
|
-
});
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
- avoid refetching on error when resolving a workflow in cloud ([#7842](https://github.com/mastra-ai/mastra/pull/7842))
|
|
287
|
-
|
|
288
|
-
- fix scorers table link full row ([#7915](https://github.com/mastra-ai/mastra/pull/7915))
|
|
289
|
-
|
|
290
|
-
- dependencies updates: ([#7810](https://github.com/mastra-ai/mastra/pull/7810))
|
|
291
|
-
- Updated dependency [`strip-json-comments@^5.0.3` βοΈ](https://www.npmjs.com/package/strip-json-comments/v/5.0.3) (from `^5.0.2`, in `dependencies`)
|
|
292
|
-
|
|
293
|
-
- adjust the way we display scorers in agent metadata ([#7910](https://github.com/mastra-ai/mastra/pull/7910))
|
|
294
|
-
|
|
295
|
-
- fix minor playground stuff for observability ([#7765](https://github.com/mastra-ai/mastra/pull/7765))
|
|
296
|
-
|
|
297
|
-
- Handle zod intersections in dynamic form ([#7768](https://github.com/mastra-ai/mastra/pull/7768))
|
|
298
|
-
|
|
299
|
-
- Playground ui -pass runtimeContext to client SDK get methods ([#7767](https://github.com/mastra-ai/mastra/pull/7767))
|
|
300
|
-
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 5967 more lines hidden. See full changelog in package directory.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Runtime
|
|
2
|
+
title: "Runtime Context | Agents | Mastra Docs"
|
|
3
3
|
description: Learn how to use Mastra's RuntimeContext to provide dynamic, request-specific configuration to agents.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Runtime Context
|
|
7
7
|
|
|
8
8
|
Mastra provides `RuntimeContext`, a dependency injection system that lets you configure agents with runtime variables. If you find yourself creating multiple agents that perform similar tasks, runtime context allows you to consolidate them into a single, more flexible agent.
|
|
9
9
|
|
|
@@ -46,9 +46,9 @@ export const testWeatherAgent = new Agent({
|
|
|
46
46
|
|
|
47
47
|
### Example tool
|
|
48
48
|
|
|
49
|
-
This tool exports a `WeatherRuntimeContext` type,
|
|
49
|
+
This tool exports a `WeatherRuntimeContext` type, enabling type-safe access to runtime configuration wherever the toolβs `runtimeContext` is used. It extracts `city` from `context`, which is derived from the user message passed to `.generate()`, and uses it to query a weather service API.
|
|
50
50
|
|
|
51
|
-
```typescript {4-6} filename="src/mastra/tools/test-weather-tool.ts" showLineNumbers copy
|
|
51
|
+
```typescript {4-6, 15} filename="src/mastra/tools/test-weather-tool.ts" showLineNumbers copy
|
|
52
52
|
import { createTool } from "@mastra/core/tools";
|
|
53
53
|
import { z } from "zod";
|
|
54
54
|
|
|
@@ -58,26 +58,21 @@ export type WeatherRuntimeContext = {
|
|
|
58
58
|
|
|
59
59
|
export const testWeatherTool = createTool({
|
|
60
60
|
id: "test-weather-tool",
|
|
61
|
-
description: "
|
|
61
|
+
description: "Fetches the current weather for a given city",
|
|
62
62
|
inputSchema: z.object({
|
|
63
|
-
|
|
64
|
-
}),
|
|
65
|
-
outputSchema: z.object({
|
|
66
|
-
metric: z.string(),
|
|
67
|
-
temperature: z.number(),
|
|
68
|
-
weather: z.string()
|
|
63
|
+
city: z.string()
|
|
69
64
|
}),
|
|
70
65
|
execute: async ({ context, runtimeContext }) => {
|
|
71
|
-
const {
|
|
66
|
+
const { city } = context;
|
|
72
67
|
const unit = runtimeContext.get("temperature-unit") as WeatherRuntimeContext["temperature-unit"];
|
|
73
68
|
|
|
74
|
-
const
|
|
75
|
-
const
|
|
69
|
+
const response = await fetch(`https://weather.service?city=${city}`);
|
|
70
|
+
const { temperature, conditions } = await response.json();
|
|
76
71
|
|
|
77
72
|
return {
|
|
78
73
|
metric: unit === "celsius" ? "Β°C" : "Β°F",
|
|
79
74
|
temperature,
|
|
80
|
-
|
|
75
|
+
conditions
|
|
81
76
|
};
|
|
82
77
|
}
|
|
83
78
|
});
|
|
@@ -96,7 +91,7 @@ const agent = mastra.getAgent("testWeatherAgent");
|
|
|
96
91
|
|
|
97
92
|
const runtimeContext = new RuntimeContext<WeatherRuntimeContext>();
|
|
98
93
|
|
|
99
|
-
runtimeContext.set("temperature-unit", "
|
|
94
|
+
runtimeContext.set("temperature-unit", "celsius");
|
|
100
95
|
|
|
101
96
|
const response = await agent.generate("What's the weather in London?", {
|
|
102
97
|
runtimeContext
|
|
@@ -22,7 +22,7 @@ import { z } from "zod";
|
|
|
22
22
|
|
|
23
23
|
export const weatherTool = createTool({
|
|
24
24
|
id: "weather-tool",
|
|
25
|
-
description: "Fetches the current weather
|
|
25
|
+
description: "Fetches the current weather for a given city",
|
|
26
26
|
inputSchema: z.object({
|
|
27
27
|
city: z.string(),
|
|
28
28
|
}),
|
|
@@ -29,6 +29,8 @@ const result = await agent.generate("What is the weather like?");
|
|
|
29
29
|
|
|
30
30
|
<Callout>
|
|
31
31
|
**[β View all 38 providers and 7 gateways](../../models)**
|
|
32
|
+
|
|
33
|
+
Explore our complete catalog with logos, model counts, and documentation for each provider.
|
|
32
34
|
</Callout>
|
|
33
35
|
|
|
34
36
|
## Configuration
|
|
@@ -56,6 +58,6 @@ const agent = new Agent({
|
|
|
56
58
|
## Learn More
|
|
57
59
|
|
|
58
60
|
- [π Browse All Model Providers](../../models) - Complete list with examples
|
|
59
|
-
- [π Agent Documentation](
|
|
60
|
-
- [βοΈ Environment Variables](/
|
|
61
|
-
- [π§ Tool Configuration](/
|
|
61
|
+
- [π Agent Documentation](../../reference/agents/agent.mdx) - Using models with agents
|
|
62
|
+
- [βοΈ Environment Variables](../getting-started/installation.mdx#add-your-api-key) - Configuration guide
|
|
63
|
+
- [π§ Tool Configuration](../agents/using-tools-and-mcp.mdx#adding-tools-to-an-agent) - Adding tools to agents
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Reference: ChunkType
|
|
2
|
+
title: "Reference: ChunkType | Agents | Mastra Docs"
|
|
3
3
|
description: "Documentation for the ChunkType type used in Mastra streaming responses, defining all possible chunk types and their payloads."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
import { Callout } from "nextra/components";
|
|
7
7
|
import { PropertiesTable } from "@/components/properties-table";
|
|
8
8
|
|
|
9
|
-
# ChunkType
|
|
10
|
-
|
|
11
|
-
<Callout type="important">
|
|
12
|
-
<strong className="block">Experimental API: </strong>This type is part of the experimental `.stream()` method. The API may change as we refine the feature based on feedback.
|
|
13
|
-
</Callout>
|
|
9
|
+
# ChunkType
|
|
14
10
|
|
|
15
11
|
The `ChunkType` type defines the mastra format of stream chunks that can be emitted during streaming responses from agents.
|
|
16
12
|
|
|
@@ -6,11 +6,7 @@ description: "Complete reference for MastraModelOutput - the stream object retur
|
|
|
6
6
|
import { Callout } from "nextra/components";
|
|
7
7
|
import { PropertiesTable } from "@/components/properties-table";
|
|
8
8
|
|
|
9
|
-
# MastraModelOutput
|
|
10
|
-
|
|
11
|
-
<Callout type="important">
|
|
12
|
-
<strong className="block">Experimental API: </strong>This type is part of the experimental `.stream()` method. The API may change as we refine the feature based on feedback.
|
|
13
|
-
</Callout>
|
|
9
|
+
# MastraModelOutput
|
|
14
10
|
|
|
15
11
|
The `MastraModelOutput` class is returned by [.stream()](./stream.mdx) and provides both streaming and promise-based access to model outputs. It supports structured output generation, tool calls, reasoning, and comprehensive usage tracking.
|
|
16
12
|
|
|
@@ -1,18 +1,32 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Handling Complex LLM Operations | Workflows | Mastra"
|
|
3
|
-
description: "Workflows in Mastra help you orchestrate complex sequences of
|
|
3
|
+
description: "Workflows in Mastra help you orchestrate complex sequences of tasks with features like branching, parallel execution, resource suspension, and more."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
import { Steps } from "nextra/components";
|
|
7
7
|
|
|
8
8
|
# Workflows overview
|
|
9
9
|
|
|
10
|
-
Workflows
|
|
11
|
-
|
|
12
|
-
A workflow manages execution order, dependencies, branching, parallelism, and error handling β enabling you to build robust, reusable processes. Steps can be nested or cloned to compose larger workflows.
|
|
10
|
+
Workflows allow you to define and manage complex sequences of tasks by connecting them with clear, structured processes. Unlike a single agent, which operates independently, workflows enable you to orchestrate multiple steps with specific logic, tools, and external services. This approach provides more control and predictability, ensuring consistent results by allowing you to determine what tasks are performed and when they are completed.
|
|
13
11
|
|
|
14
12
|

|
|
15
13
|
|
|
14
|
+
## When to use a workflow
|
|
15
|
+
|
|
16
|
+
For example, you might want to perform a sequence of tasks:
|
|
17
|
+
|
|
18
|
+
1. Handle a user question like βCan I return my last order?β
|
|
19
|
+
2. Fetch user-specific data from a database using their `user_id`.
|
|
20
|
+
3. Check return eligibility via an external API or business logic.
|
|
21
|
+
4. Make a conditional decision (e.g. approve, deny, escalate) based on the data.
|
|
22
|
+
5. Generate a tailored response based on the outcome.
|
|
23
|
+
|
|
24
|
+
Each of these tasks is created as a **step** in a workflow, giving you fine-grained control over data flow, execution order, and side effects.
|
|
25
|
+
|
|
26
|
+
> **πΉ Watch**: β An introduction to workflows, and how they compare to agents [YouTube (7 minutes)](https://youtu.be/0jg2g3sNvgw)
|
|
27
|
+
|
|
28
|
+
## Building workflows
|
|
29
|
+
|
|
16
30
|
You create workflows by:
|
|
17
31
|
|
|
18
32
|
- Defining **steps** with `createStep`, specifying input/output schemas and business logic.
|
|
@@ -21,7 +35,10 @@ You create workflows by:
|
|
|
21
35
|
|
|
22
36
|
This structure provides full type safety and runtime validation, ensuring data integrity across the entire workflow.
|
|
23
37
|
|
|
24
|
-
|
|
38
|
+
### Visual testing
|
|
39
|
+
|
|
40
|
+
Use the [Playground](../server-db/local-dev-playground.mdx#workflows) to visualize workflow execution in real time. It shows which steps are running, completed, or suspended.
|
|
41
|
+
|
|
25
42
|
|
|
26
43
|
## Getting started
|
|
27
44
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 0.13.28-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`10e633a`](https://github.com/mastra-ai/mastra/commit/10e633a07d333466d9734c97acfc3dbf757ad2d0)]:
|
|
8
|
+
- @mastra/core@0.20.1-alpha.0
|
|
9
|
+
|
|
3
10
|
## 0.13.27
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.28-alpha.0",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"uuid": "^11.1.0",
|
|
34
34
|
"zod": "^3.25.76",
|
|
35
35
|
"zod-to-json-schema": "^3.24.6",
|
|
36
|
-
"@mastra/core": "0.20.0",
|
|
36
|
+
"@mastra/core": "0.20.1-alpha.0",
|
|
37
37
|
"@mastra/mcp": "^0.13.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"tsx": "^4.19.4",
|
|
50
50
|
"typescript": "^5.8.3",
|
|
51
51
|
"vitest": "^3.2.4",
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
52
|
+
"@mastra/core": "0.20.1-alpha.0",
|
|
53
|
+
"@internal/lint": "0.0.46"
|
|
54
54
|
},
|
|
55
55
|
"homepage": "https://mastra.ai",
|
|
56
56
|
"repository": {
|