@mastra/mcp-docs-server 1.2.6-alpha.2 → 1.2.6-alpha.4
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.
|
@@ -110,6 +110,29 @@ A tool can also pause _during_ its `execute` function by calling `suspend()`. Th
|
|
|
110
110
|
|
|
111
111
|
The stream emits a `tool-call-suspended` chunk with a custom payload defined by the tool's `suspendSchema`. You resume by calling `resumeStream()` with data matching the tool's `resumeSchema`.
|
|
112
112
|
|
|
113
|
+
```typescript
|
|
114
|
+
const weatherTool = createTool({
|
|
115
|
+
id: 'get-weather',
|
|
116
|
+
inputSchema: z.object({
|
|
117
|
+
location: z.string().optional(),
|
|
118
|
+
}),
|
|
119
|
+
suspendSchema: z.object({
|
|
120
|
+
question: z.string(),
|
|
121
|
+
}),
|
|
122
|
+
resumeSchema: z.object({
|
|
123
|
+
location: z.string(),
|
|
124
|
+
}),
|
|
125
|
+
execute: async ({ location }, context) => {
|
|
126
|
+
if (!location) {
|
|
127
|
+
return await context?.agent?.suspend({
|
|
128
|
+
question: 'Which city would you like the weather for?',
|
|
129
|
+
})
|
|
130
|
+
}
|
|
131
|
+
return await fetchWeather(location)
|
|
132
|
+
},
|
|
133
|
+
})
|
|
134
|
+
```
|
|
135
|
+
|
|
113
136
|
> **Note:** `suspend()` doesn't throw — return immediately after calling it (e.g. `return await suspend({ ... })`). Code after `await suspend(...)` still runs before the tool pauses.
|
|
114
137
|
|
|
115
138
|
## Tool approval with `generate()`
|
|
@@ -129,6 +129,8 @@ export const agent = new Agent({
|
|
|
129
129
|
|
|
130
130
|
The resolver function receives `{ requestContext }` and returns a `SkillInput[]` array or a `Promise<SkillInput[]>`.
|
|
131
131
|
|
|
132
|
+
See [Request Context](https://mastra.ai/docs/server/request-context) for more on using request context with agents and workflows.
|
|
133
|
+
|
|
132
134
|
## Merging with workspace skills
|
|
133
135
|
|
|
134
136
|
When an agent has both `skills` and a workspace with skills configured, they merge. Agent-level skills take precedence on name conflicts:
|
|
@@ -149,7 +151,7 @@ const customReview = createSkill({
|
|
|
149
151
|
instructions: '...',
|
|
150
152
|
})
|
|
151
153
|
|
|
152
|
-
export const
|
|
154
|
+
export const reviewer = new Agent({
|
|
153
155
|
id: 'reviewer',
|
|
154
156
|
model: 'openai/gpt-5.5',
|
|
155
157
|
workspace,
|
package/.docs/models/index.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Model Providers
|
|
4
4
|
|
|
5
|
-
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to
|
|
5
|
+
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 4563 models from 140 providers through a single API.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# OpenCode Zen
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 51 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [OpenCode Zen documentation](https://opencode.ai/docs/zen).
|
|
8
8
|
|
|
@@ -75,6 +75,7 @@ for await (const chunk of stream) {
|
|
|
75
75
|
| `opencode/gpt-5.5` | 1.1M | | | | | | $5 | $30 |
|
|
76
76
|
| `opencode/gpt-5.5-pro` | 1.1M | | | | | | $30 | $180 |
|
|
77
77
|
| `opencode/grok-build-0.1` | 256K | | | | | | $1 | $2 |
|
|
78
|
+
| `opencode/hy3-free` | 256K | | | | | | — | — |
|
|
78
79
|
| `opencode/kimi-k2.5` | 262K | | | | | | $0.60 | $3 |
|
|
79
80
|
| `opencode/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
80
81
|
| `opencode/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
@@ -45,7 +45,7 @@ export const mastra = new Mastra({
|
|
|
45
45
|
})
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
`notifications.dispatch.enabled`
|
|
48
|
+
`notifications.dispatch.enabled` allows an internal dispatcher workflow to run with the default cron `*/1 * * * *`. The dispatcher reads due notification records from storage, groups summaries by `agentId`, `resourceId`, and `threadId`, and emits signals through the agent thread runtime. It isn't a user-facing entrypoint. The dispatch schedule (and the workflow scheduler backing it) activates lazily on the first deferred or summarized notification, so apps that never defer notifications don't run a scheduler at all.
|
|
49
49
|
|
|
50
50
|
## Constructor parameters
|
|
51
51
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.2.6-alpha.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`a940148`](https://github.com/mastra-ai/mastra/commit/a9401483e1bfe85c18a6e73d33c5949239d65a92)]:
|
|
8
|
+
- @mastra/core@1.50.1-alpha.2
|
|
9
|
+
|
|
3
10
|
## 1.2.6-alpha.2
|
|
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": "1.2.6-alpha.
|
|
3
|
+
"version": "1.2.6-alpha.4",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
"jsdom": "^26.1.0",
|
|
29
29
|
"local-pkg": "^1.1.2",
|
|
30
30
|
"zod": "^4.4.3",
|
|
31
|
-
"@mastra/core": "1.50.1-alpha.
|
|
31
|
+
"@mastra/core": "1.50.1-alpha.2",
|
|
32
32
|
"@mastra/mcp": "^1.13.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@hono/node-server": "^1.19.11",
|
|
36
36
|
"@types/jsdom": "^21.1.7",
|
|
37
37
|
"@types/node": "22.19.21",
|
|
38
|
-
"@vitest/coverage-v8": "4.1.
|
|
39
|
-
"@vitest/ui": "4.1.
|
|
38
|
+
"@vitest/coverage-v8": "4.1.9",
|
|
39
|
+
"@vitest/ui": "4.1.9",
|
|
40
40
|
"@wong2/mcp-cli": "^2.0.0",
|
|
41
41
|
"cross-env": "^10.1.0",
|
|
42
42
|
"eslint": "^10.4.1",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"tsup": "^8.5.1",
|
|
45
45
|
"tsx": "^4.22.4",
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
|
-
"vitest": "4.1.
|
|
47
|
+
"vitest": "4.1.9",
|
|
48
48
|
"@internal/lint": "0.0.112",
|
|
49
|
-
"@mastra/core": "1.50.1-alpha.
|
|
49
|
+
"@mastra/core": "1.50.1-alpha.2",
|
|
50
50
|
"@internal/types-builder": "0.0.87"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|