@mastra/mcp-docs-server 1.3.15 → 1.3.16-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/docs/agents/overview.md +1 -1
- package/.docs/docs/agents/processors.md +5 -5
- package/.docs/docs/agents/resumable-streams.md +2 -2
- package/.docs/docs/agents/structured-output.md +1 -1
- package/.docs/docs/connections/mcp.md +3 -1
- package/.docs/docs/deployment/mastra-server.md +1 -1
- package/.docs/docs/evals/multi-turn.md +2 -2
- package/.docs/docs/guides/build-an-eval-loop.md +1 -1
- package/.docs/docs/harness/agent-controller.md +2 -2
- package/.docs/docs/harness/durable-agents.md +1 -0
- package/.docs/docs/index.md +1 -1
- package/.docs/docs/mastra-platform/alerts.md +225 -122
- package/.docs/docs/mastra-platform/api.md +3 -3
- package/.docs/docs/mastra-platform/connect.md +1 -1
- package/.docs/docs/mastra-platform/gateway/api/audio.md +50 -0
- package/.docs/docs/mastra-platform/gateway/api/chat-completions.md +91 -0
- package/.docs/docs/mastra-platform/gateway/api/decisions.md +54 -0
- package/.docs/docs/mastra-platform/gateway/api/embeddings.md +35 -0
- package/.docs/docs/mastra-platform/gateway/api/images.md +52 -0
- package/.docs/docs/mastra-platform/gateway/api/messages.md +50 -0
- package/.docs/docs/mastra-platform/gateway/api/models.md +25 -0
- package/.docs/docs/mastra-platform/gateway/api/rerank.md +33 -0
- package/.docs/docs/mastra-platform/gateway/api/responses.md +48 -0
- package/.docs/docs/mastra-platform/gateway/api/videos.md +86 -0
- package/.docs/docs/mastra-platform/gateway/integrations.md +151 -0
- package/.docs/docs/mastra-platform/gateway/keys-and-byok.md +76 -0
- package/.docs/docs/mastra-platform/gateway/migrate.md +60 -0
- package/.docs/docs/mastra-platform/gateway/models-and-routing.md +40 -0
- package/.docs/docs/mastra-platform/gateway/overview.md +182 -0
- package/.docs/docs/mastra-platform/gateway/quickstart.md +103 -0
- package/.docs/docs/mastra-platform/gateway/usage-and-limits.md +76 -0
- package/.docs/docs/mastra-platform/gateway/web-search.md +46 -0
- package/.docs/docs/memory/observational-memory.md +1 -1
- package/.docs/docs/memory/semantic-recall.md +6 -0
- package/.docs/docs/sandbox/overview.md +5 -5
- package/.docs/integrations/channels/slack.md +1 -1
- package/.docs/integrations/file-storage/amazon-s3.md +1 -1
- package/.docs/integrations/file-storage/archil.md +1 -1
- package/.docs/integrations/file-storage/azure-blob.md +1 -1
- package/.docs/integrations/file-storage/google-cloud-storage.md +1 -1
- package/.docs/integrations/file-storage/mesa.md +1 -1
- package/.docs/integrations/file-storage/neon.md +1 -1
- package/.docs/integrations/file-storage/vercel-files.md +1 -1
- package/.docs/integrations/sandboxes/apple-container.md +1 -1
- package/.docs/integrations/sandboxes/blaxel.md +1 -1
- package/.docs/integrations/sandboxes/daytona.md +1 -1
- package/.docs/integrations/sandboxes/docker.md +1 -1
- package/.docs/integrations/sandboxes/e2b-desktop.md +1 -1
- package/.docs/integrations/sandboxes/e2b.md +1 -1
- package/.docs/integrations/sandboxes/modal.md +1 -1
- package/.docs/integrations/sandboxes/railway.md +1 -1
- package/.docs/integrations/sandboxes/sprites.md +1 -1
- package/.docs/integrations/sandboxes/vercel.md +2 -2
- package/.docs/integrations/tools/brightdata.md +1 -1
- package/.docs/integrations/tools/parallel.md +1 -1
- package/.docs/integrations/tools/perplexity.md +1 -1
- package/.docs/integrations/tools/sanity-context.md +226 -0
- package/.docs/integrations/tools/tavily.md +1 -1
- package/.docs/integrations/vectors/mongodb.md +221 -17
- package/.docs/integrations.md +1 -0
- package/.docs/models/gateways/custom-gateways.md +1 -1
- package/.docs/models/gateways/mastra.md +13 -41
- package/.docs/models/gateways/merge-gateway.md +2 -1
- package/.docs/models/gateways/netlify.md +2 -1
- package/.docs/models/gateways/openrouter.md +1 -1
- package/.docs/models/gateways/requesty.md +8 -1
- package/.docs/models/gateways/vercel.md +3 -1
- package/.docs/models/index.md +4 -4
- package/.docs/models/providers/aimlapi.md +3 -3
- package/.docs/models/providers/ambient.md +1 -1
- package/.docs/models/providers/chutes.md +2 -2
- package/.docs/models/providers/cloudflare-workers-ai.md +2 -1
- package/.docs/models/providers/cortecs.md +19 -15
- package/.docs/models/providers/crossmodel.md +2 -1
- package/.docs/models/providers/digitalocean.md +3 -1
- package/.docs/models/providers/edenai.md +9 -3
- package/.docs/models/providers/google.md +2 -1
- package/.docs/models/providers/hostinger-router.md +1 -1
- package/.docs/models/providers/huggingface.md +7 -1
- package/.docs/models/providers/inceptron.md +8 -8
- package/.docs/models/providers/kenari.md +2 -2
- package/.docs/models/providers/kilo.md +85 -82
- package/.docs/models/providers/llmgateway-providers.md +9 -5
- package/.docs/models/providers/llmgateway.md +5 -4
- package/.docs/models/providers/nano-gpt.md +21 -39
- package/.docs/models/providers/nearai.md +1 -2
- package/.docs/models/providers/novita-ai.md +5 -2
- package/.docs/models/providers/obscurify.md +1 -1
- package/.docs/models/providers/ofox.md +4 -1
- package/.docs/models/providers/opencode-go.md +0 -1
- package/.docs/models/providers/opencode.md +3 -5
- package/.docs/models/providers/prime.md +4 -1
- package/.docs/models/providers/vivgrid.md +5 -1
- package/.docs/reference/agent-controller/agent-controller-class.md +1 -1
- package/.docs/reference/agent-controller/session.md +7 -5
- package/.docs/reference/agents/agent.md +2 -2
- package/.docs/reference/agents/durable-agent.md +18 -0
- package/.docs/reference/client-js/agent-controller.md +1 -1
- package/.docs/reference/coding-agent/build-base-prompt.md +1 -1
- package/.docs/reference/coding-agent/create-coding-agent.md +7 -7
- package/.docs/reference/core/mastra-model-gateway.md +1 -1
- package/.docs/reference/datasets/startExperiment.md +1 -1
- package/.docs/reference/evals/multi-turn-judge.md +2 -2
- package/.docs/reference/evals/noise-sensitivity.md +1 -1
- package/.docs/reference/evals/tool-call-accuracy.md +1 -1
- package/.docs/reference/memory/observational-memory.md +2 -2
- package/.docs/reference/memory/recall.md +1 -1
- package/.docs/reference/processors/prefill-error-handler.md +2 -2
- package/.docs/reference/processors/processor-interface.md +1 -1
- package/.docs/reference/processors/provider-history-compat.md +1 -1
- package/.docs/reference/processors/response-cache.md +1 -1
- package/.docs/reference/processors/stream-error-retry-processor.md +3 -3
- package/.docs/reference/rag/retrieval.md +29 -1
- package/.docs/reference/workspace/platform-filesystem.md +1 -1
- package/.docs/reference/workspace/platform-sandbox.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +5 -5
- package/package.json +5 -5
|
@@ -74,7 +74,7 @@ By defining the model using `provider/model` format Mastra automatically looks f
|
|
|
74
74
|
Short list of known model IDs are:
|
|
75
75
|
|
|
76
76
|
- `openai/gpt-6.1-sol`, `openai/gpt-6-luna`
|
|
77
|
-
- `anthropic/claude-sonnet-5
|
|
77
|
+
- `anthropic/claude-sonnet-5.5`, `anthropic/claude-opus-5.5`, `anthropic/claude-haiku-5.5`
|
|
78
78
|
- `google/gemini-3.8-flash`
|
|
79
79
|
|
|
80
80
|
Go to <https://mastra.ai/models> for a full list of supported models.
|
|
@@ -99,7 +99,7 @@ import { PrefillErrorHandler, TokenLimiter, ModerationProcessor } from '@mastra/
|
|
|
99
99
|
const agent = new Agent({
|
|
100
100
|
id: 'support-agent',
|
|
101
101
|
name: 'support-agent',
|
|
102
|
-
model: 'openai/gpt-5.6',
|
|
102
|
+
model: 'openai/gpt-5.6-sol',
|
|
103
103
|
instructions: '...',
|
|
104
104
|
inputProcessors: [
|
|
105
105
|
new TokenLimiter(4000),
|
|
@@ -138,7 +138,7 @@ import { StreamErrorRetryProcessor } from '@mastra/core/processors'
|
|
|
138
138
|
const agent = new Agent({
|
|
139
139
|
id: 'tuned-agent',
|
|
140
140
|
name: 'tuned-agent',
|
|
141
|
-
model: 'openai/gpt-5.6',
|
|
141
|
+
model: 'openai/gpt-5.6-sol',
|
|
142
142
|
instructions: '...',
|
|
143
143
|
errorProcessors: [new StreamErrorRetryProcessor({ maxRetries: 5 })],
|
|
144
144
|
maxProcessorRetries: 5,
|
|
@@ -155,7 +155,7 @@ An empty `errorProcessors` list merges like any other, so it still gets the four
|
|
|
155
155
|
new Agent({
|
|
156
156
|
id: 'custom-error-recovery-agent',
|
|
157
157
|
name: 'custom-error-recovery-agent',
|
|
158
|
-
model: 'openai/gpt-5.6',
|
|
158
|
+
model: 'openai/gpt-5.6-sol',
|
|
159
159
|
instructions: '...',
|
|
160
160
|
errorProcessorDefaults: false,
|
|
161
161
|
errorProcessors: [new StreamErrorRetryProcessor({ maxRetries: 5 })],
|
|
@@ -520,7 +520,7 @@ export const searchAgent = new Agent({
|
|
|
520
520
|
id: 'search-agent',
|
|
521
521
|
name: 'Search Agent',
|
|
522
522
|
instructions: 'You answer questions concisely.',
|
|
523
|
-
model: 'openai/gpt-5.6',
|
|
523
|
+
model: 'openai/gpt-5.6-sol',
|
|
524
524
|
inputProcessors: [new ResponseCache({ cache, ttl: 600 })], // 10 minutes
|
|
525
525
|
})
|
|
526
526
|
```
|
|
@@ -596,7 +596,7 @@ export const agent = new Agent({
|
|
|
596
596
|
id: 'cached-agent',
|
|
597
597
|
name: 'Cached Agent',
|
|
598
598
|
instructions: '...',
|
|
599
|
-
model: 'openai/gpt-5.6',
|
|
599
|
+
model: 'openai/gpt-5.6-sol',
|
|
600
600
|
inputProcessors: [new ResponseCache({ cache })],
|
|
601
601
|
})
|
|
602
602
|
```
|
|
@@ -31,7 +31,7 @@ export const supportAgent = new Agent({
|
|
|
31
31
|
id: 'support-agent',
|
|
32
32
|
name: 'Support agent',
|
|
33
33
|
instructions: 'You help customers with their orders.',
|
|
34
|
-
model: 'openai/gpt-5.6',
|
|
34
|
+
model: 'openai/gpt-5.6-sol',
|
|
35
35
|
durable: {
|
|
36
36
|
// Keep finished runs replayable for 2 minutes instead of 30 seconds
|
|
37
37
|
cleanupTimeoutMs: 120_000,
|
|
@@ -63,7 +63,7 @@ export const batchAgent = new Agent({
|
|
|
63
63
|
id: 'batch-agent',
|
|
64
64
|
name: 'Batch agent',
|
|
65
65
|
instructions: 'You classify support tickets.',
|
|
66
|
-
model: 'openai/gpt-5.6',
|
|
66
|
+
model: 'openai/gpt-5.6-sol',
|
|
67
67
|
durable: false,
|
|
68
68
|
})
|
|
69
69
|
```
|
|
@@ -281,7 +281,7 @@ The response is still validated against `schema`. Only the injected text changes
|
|
|
281
281
|
|
|
282
282
|
When `model` is provided to the `structuredOutput` property, Mastra uses a separate internal agent to handle the structured output. The main agent will handle all of the steps (including tool calling) and the structured output model will handle only the generation of structured output.
|
|
283
283
|
|
|
284
|
-
**For AI agents:** The `model` property is a string in Mastra's model router format: `provider/model`, for example `openai/gpt-6.1-sol`, `openai/gpt-6-luna`, `anthropic/claude-sonnet-5
|
|
284
|
+
**For AI agents:** The `model` property is a string in Mastra's model router format: `provider/model`, for example `openai/gpt-6.1-sol`, `openai/gpt-6-luna`, `anthropic/claude-sonnet-5.5` or `google/gemini-3.8-flash`. Use `/` and not `:` as a separator. Example: `openai/<model>`, not `openai:<model>`, and don't pass a provider object. No provider import is needed for this format. Don't install any AI SDK package unless Mastra's documentation says otherwise. By defining the model using `provider/model` format Mastra automatically looks for environment variables for the provider. The defined model requires an environment variable to be set for the provider. OpenAI: `OPENAI_API_KEY`. Anthropic: `ANTHROPIC_API_KEY`. Google: `GOOGLE_API_KEY`.
|
|
285
285
|
|
|
286
286
|
```typescript
|
|
287
287
|
const response = await testAgent.generate('Tell me about TypeScript.', {
|
|
@@ -452,7 +452,9 @@ Tools loaded through `listTools()` include a `serverId` in `_meta.ui`, allowing
|
|
|
452
452
|
|
|
453
453
|
Mastra Studio uses [`@mcp-ui/client`](https://www.npmjs.com/package/@mcp-ui/client) to load app HTML through a sandbox proxy and communicate over JSON-RPC with `postMessage`.
|
|
454
454
|
|
|
455
|
-
|
|
455
|
+
Guest HTML runs in an inner frame sandboxed with `allow-scripts` and `allow-forms`, and that sandbox doesn't include Studio's origin, so the frame can't read the parent page, cookies, or storage or send credentialed requests to Studio. When the proxy is a same-origin blob, Studio also removes `allow-same-origin` from the outer frame, ignores any sandbox attribute the app supplies, and applies a content security policy that blocks connections back to the Studio origin.
|
|
456
|
+
|
|
457
|
+
If you replace the built-in proxy, host it on a separate registrable domain rather than the Studio host. The host still controls all communication with the guest app.
|
|
456
458
|
|
|
457
459
|
## MCP events
|
|
458
460
|
|
|
@@ -147,7 +147,7 @@ To add your own endpoints, see [Custom API Routes](https://mastra.ai/docs/server
|
|
|
147
147
|
|
|
148
148
|
## Graceful shutdown and rolling deploys
|
|
149
149
|
|
|
150
|
-
By default, the generated server handles `SIGINT` and `SIGTERM`. It stops accepting connections, waits up to [`server.drainTimeout`](https://mastra.ai/reference/configuration) for active requests and streams, then runs `mastra.shutdown()`. Shutdown gives in-flight workflow runs (including durable agent runs) the same drain window to finish before workers and pub/sub subscriptions are torn down. A durable agent run still executing after the window stops and releases its claim on the run, so the next boot can recover it right away. The drain timeout defaults to 5 seconds. A second signal terminates the process immediately. See [`server.handleShutdownSignals`](https://mastra.ai/reference/configuration) if you need to manage signals yourself.
|
|
150
|
+
By default, the generated server handles `SIGINT` and `SIGTERM`. It stops accepting connections, waits up to [`server.drainTimeout`](https://mastra.ai/reference/configuration) for active requests and streams, then runs `mastra.shutdown()`. Shutdown gives in-flight workflow runs (including durable agent runs) the same drain window to finish before workers and pub/sub subscriptions are torn down. A durable agent run still executing after the window stops and releases its claim on the run, so the next boot can recover it right away. A tool call still running at that point is aborted, and its result is discarded even if the tool ignores the abort and finishes. When the run is recovered, that tool call runs again, and during a rolling deploy it can start before the first call ends. A longer `drainTimeout` gives running tools more time to finish, but the window starts when shutdown does, so also [make tools safe to repeat](https://mastra.ai/docs/harness/durable-agents). The drain timeout defaults to 5 seconds. A second signal terminates the process immediately. See [`server.handleShutdownSignals`](https://mastra.ai/reference/configuration) if you need to manage signals yourself.
|
|
151
151
|
|
|
152
152
|
Shutdown then hands back the agent thread runs the process still holds:
|
|
153
153
|
|
|
@@ -109,7 +109,7 @@ const result = await runEvals({
|
|
|
109
109
|
scorers: [
|
|
110
110
|
{
|
|
111
111
|
scorer: createMultiTurnJudgeScorer({
|
|
112
|
-
model: 'anthropic/claude-haiku-5
|
|
112
|
+
model: 'anthropic/claude-haiku-5.5',
|
|
113
113
|
criterion:
|
|
114
114
|
'The agent provided forecasts for London and Paris, and gave weather-appropriate packing advice.',
|
|
115
115
|
}),
|
|
@@ -132,7 +132,7 @@ export const conversationJudge = createScorer({
|
|
|
132
132
|
description: 'Grades every assistant turn in a conversation against one criterion',
|
|
133
133
|
type: 'agent',
|
|
134
134
|
judge: {
|
|
135
|
-
model: 'anthropic/claude-haiku-5
|
|
135
|
+
model: 'anthropic/claude-haiku-5.5',
|
|
136
136
|
instructions: 'You grade multi-turn assistant transcripts against a single criterion.',
|
|
137
137
|
},
|
|
138
138
|
})
|
|
@@ -171,7 +171,7 @@ export const refundCorrectnessScorer = createScorer({
|
|
|
171
171
|
description: 'Checks an answer against the test case’s expected outcome.',
|
|
172
172
|
type: 'agent',
|
|
173
173
|
judge: {
|
|
174
|
-
model: 'anthropic/claude-sonnet-5
|
|
174
|
+
model: 'anthropic/claude-sonnet-5.5',
|
|
175
175
|
instructions: `
|
|
176
176
|
Evaluate correctness against the supplied ground truth.
|
|
177
177
|
Pass only if every "must" criterion is satisfied and no "mustNot"
|
|
@@ -211,7 +211,7 @@ console.log(session.mode.resolve().instructions)
|
|
|
211
211
|
Switch models independently with [`session.model.switch()`](https://mastra.ai/reference/agent-controller/session), then read the active selection with [`session.model.get()`](https://mastra.ai/reference/agent-controller/session). The selection is stored as the thread's current model and remains active when the Session changes modes:
|
|
212
212
|
|
|
213
213
|
```typescript
|
|
214
|
-
await session.model.switch('anthropic/claude-sonnet-5
|
|
214
|
+
await session.model.switch('anthropic/claude-sonnet-5.5')
|
|
215
215
|
|
|
216
216
|
console.log(session.model.get())
|
|
217
217
|
```
|
|
@@ -362,7 +362,7 @@ await session.subagents.model.set({
|
|
|
362
362
|
|
|
363
363
|
await session.subagents.model.set({
|
|
364
364
|
agentType: 'code-reviewer',
|
|
365
|
-
modelId: 'anthropic/claude-sonnet-5
|
|
365
|
+
modelId: 'anthropic/claude-sonnet-5.5',
|
|
366
366
|
})
|
|
367
367
|
|
|
368
368
|
const reviewerModel = session.subagents.model.get({
|
|
@@ -456,6 +456,7 @@ If the snapshot upsert dominates writes, reduce checkpoint size or frequency fir
|
|
|
456
456
|
A durable or evented agent can run the same tool call more than once. A tool call is one request from the model to run a tool. A repeat happens in these situations:
|
|
457
457
|
|
|
458
458
|
- The process stops while the tool runs, or after the tool returns but before Mastra saves its result. When the run is [recovered](#crash-recovery), the tool runs again.
|
|
459
|
+
- The server shuts down gracefully while the tool runs, and the tool is still running when the [drain timeout](https://mastra.ai/docs/deployment/mastra-server) ends. Mastra discards the tool's result, and recovery runs the tool again. A tool whose result Mastra saves within the drain timeout keeps it.
|
|
459
460
|
- With Postgres storage and Redis Streams PubSub, an evented worker stops before it publishes the tool's result. Another worker [reclaims the step](https://mastra.ai/reference/pubsub/redis-streams) and runs the tool again.
|
|
460
461
|
- Recovery takes over a run while the previous execution is still running the tool, for example with [`recover()` and `force: true`](#manual-recovery). Both executions can run the tool concurrently. See [stop work after ownership loss](#stop-work-after-ownership-loss).
|
|
461
462
|
|
package/.docs/docs/index.md
CHANGED
|
@@ -80,7 +80,7 @@ By defining the model using `provider/model` format Mastra automatically looks f
|
|
|
80
80
|
Short list of known model IDs are:
|
|
81
81
|
|
|
82
82
|
- `openai/gpt-6.1-sol`, `openai/gpt-6-luna`
|
|
83
|
-
- `anthropic/claude-sonnet-5
|
|
83
|
+
- `anthropic/claude-sonnet-5.5`, `anthropic/claude-opus-5.5`, `anthropic/claude-haiku-5.5`
|
|
84
84
|
- `google/gemini-3.8-flash`
|
|
85
85
|
|
|
86
86
|
Go to <https://mastra.ai/models> for a full list of supported models.
|