@mastra/mcp-docs-server 1.2.11 → 1.2.12-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.
Files changed (257) hide show
  1. package/.docs/docs/agents/using-tools.md +25 -0
  2. package/.docs/guides/build-your-ui/ai-sdk-ui.md +5 -5
  3. package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +8 -8
  4. package/.docs/guides/build-your-ui/copilotkit/overview.md +2 -2
  5. package/.docs/guides/build-your-ui/openui.md +1 -1
  6. package/.docs/guides/concepts/multi-agent-systems.md +5 -5
  7. package/.docs/guides/concepts/streaming.md +9 -9
  8. package/.docs/guides/deployment/amazon-ec2.md +1 -1
  9. package/.docs/guides/deployment/aws-lambda.md +1 -1
  10. package/.docs/guides/deployment/azure-app-services.md +1 -1
  11. package/.docs/guides/deployment/cloudflare.md +1 -1
  12. package/.docs/guides/deployment/inngest.md +6 -6
  13. package/.docs/guides/deployment/temporal.md +1 -1
  14. package/.docs/guides/deployment/vercel.md +1 -1
  15. package/.docs/guides/getting-started/astro.md +1 -1
  16. package/.docs/guides/getting-started/electron.md +1 -1
  17. package/.docs/guides/getting-started/nestjs.md +5 -5
  18. package/.docs/guides/getting-started/vite-react.md +1 -1
  19. package/.docs/guides/guide/chef-michel.md +1 -1
  20. package/.docs/guides/guide/code-review-bot.md +1 -1
  21. package/.docs/guides/guide/coding-agent.md +4 -4
  22. package/.docs/guides/guide/dev-assistant.md +1 -1
  23. package/.docs/guides/guide/docs-manager.md +3 -3
  24. package/.docs/guides/guide/github-actions-pr-description.md +4 -4
  25. package/.docs/guides/guide/research-assistant.md +3 -3
  26. package/.docs/guides/guide/research-coordinator.md +3 -3
  27. package/.docs/guides/guide/slack-assistant.md +1 -1
  28. package/.docs/guides/guide/stock-agent.md +1 -1
  29. package/.docs/guides/index.md +1 -1
  30. package/.docs/guides/migrations/ai-sdk-v4-to-v5.md +1 -1
  31. package/.docs/guides/migrations/mastra-cloud.md +6 -6
  32. package/.docs/guides/migrations/network-to-supervisor.md +9 -9
  33. package/.docs/guides/migrations/upgrade-to-v1/agent.md +5 -5
  34. package/.docs/guides/migrations/upgrade-to-v1/cli.md +1 -1
  35. package/.docs/guides/migrations/upgrade-to-v1/client.md +3 -3
  36. package/.docs/guides/migrations/upgrade-to-v1/evals.md +2 -2
  37. package/.docs/guides/migrations/upgrade-to-v1/memory.md +1 -1
  38. package/.docs/guides/migrations/upgrade-to-v1/overview.md +3 -3
  39. package/.docs/guides/migrations/upgrade-to-v1/processors.md +1 -1
  40. package/.docs/guides/migrations/upgrade-to-v1/storage.md +11 -11
  41. package/.docs/guides/migrations/upgrade-to-v1/tools.md +3 -3
  42. package/.docs/guides/migrations/upgrade-to-v1/tracing.md +2 -2
  43. package/.docs/guides/migrations/upgrade-to-v1/voice.md +1 -1
  44. package/.docs/guides/migrations/upgrade-to-v1/workflows.md +1 -1
  45. package/.docs/models/environment-variables.md +1 -0
  46. package/.docs/models/index.md +1 -1
  47. package/.docs/models/providers/modal.md +73 -0
  48. package/.docs/models/providers.md +1 -0
  49. package/.docs/reference/acp/acp-agent.md +3 -3
  50. package/.docs/reference/acp/create-acp-tool.md +2 -2
  51. package/.docs/reference/agent-controller/agent-controller-class.md +36 -36
  52. package/.docs/reference/agent-controller/session.md +6 -6
  53. package/.docs/reference/agents/agent.md +7 -7
  54. package/.docs/reference/agents/channels.md +3 -3
  55. package/.docs/reference/agents/durable-agent.md +3 -3
  56. package/.docs/reference/agents/generate.md +3 -3
  57. package/.docs/reference/agents/getDefaultOptions.md +1 -1
  58. package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
  59. package/.docs/reference/agents/listScorers.md +1 -1
  60. package/.docs/reference/agents/listSkills.md +1 -1
  61. package/.docs/reference/agents/listSuspendedRuns.md +2 -2
  62. package/.docs/reference/ai-sdk/chat-route.md +1 -1
  63. package/.docs/reference/ai-sdk/network-route.md +1 -1
  64. package/.docs/reference/ai-sdk/to-ai-sdk-messages.md +1 -1
  65. package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +1 -1
  66. package/.docs/reference/ai-sdk/to-ai-sdk-v5-messages.md +1 -1
  67. package/.docs/reference/ai-sdk/workflow-route.md +1 -1
  68. package/.docs/reference/ai-sdk/workflow-snapshot-to-stream.md +2 -2
  69. package/.docs/reference/auth/auth0.md +1 -1
  70. package/.docs/reference/auth/fga.md +2 -2
  71. package/.docs/reference/auth/google.md +2 -2
  72. package/.docs/reference/auth/okta.md +1 -1
  73. package/.docs/reference/auth/workos.md +2 -2
  74. package/.docs/reference/browser/agent-browser.md +2 -2
  75. package/.docs/reference/browser/browser-viewer.md +3 -3
  76. package/.docs/reference/browser/mastra-browser.md +3 -3
  77. package/.docs/reference/browser/stagehand-browser.md +4 -4
  78. package/.docs/reference/channels/slack-provider.md +2 -2
  79. package/.docs/reference/cli/create-mastra.md +1 -1
  80. package/.docs/reference/cli/mastra.md +23 -23
  81. package/.docs/reference/client-js/agents.md +9 -9
  82. package/.docs/reference/client-js/memory.md +2 -2
  83. package/.docs/reference/client-js/workflows.md +1 -1
  84. package/.docs/reference/coding-agent/build-base-prompt.md +2 -2
  85. package/.docs/reference/coding-agent/create-coding-agent.md +2 -2
  86. package/.docs/reference/configuration.md +6 -6
  87. package/.docs/reference/core/getMCPServer.md +1 -1
  88. package/.docs/reference/core/getScorer.md +1 -1
  89. package/.docs/reference/datasets/addItem.md +1 -1
  90. package/.docs/reference/datasets/listItems.md +1 -1
  91. package/.docs/reference/deployer/netlify.md +4 -4
  92. package/.docs/reference/deployer/vercel.md +7 -7
  93. package/.docs/reference/editor/agent-builder/agent-builder-options.md +4 -4
  94. package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +6 -6
  95. package/.docs/reference/editor/agent-builder/builder-models.md +3 -3
  96. package/.docs/reference/editor/blob-store-provider.md +1 -1
  97. package/.docs/reference/editor/browser-provider.md +3 -3
  98. package/.docs/reference/editor/filesystem-provider.md +4 -4
  99. package/.docs/reference/editor/mastra-editor.md +5 -5
  100. package/.docs/reference/editor/processor-provider.md +3 -3
  101. package/.docs/reference/editor/sandbox-provider.md +4 -4
  102. package/.docs/reference/editor/storage-browser-ref.md +6 -6
  103. package/.docs/reference/editor/storage-workspace-ref.md +4 -4
  104. package/.docs/reference/editor/tool-provider.md +1 -1
  105. package/.docs/reference/evals/answer-relevancy.md +4 -4
  106. package/.docs/reference/evals/bias.md +3 -3
  107. package/.docs/reference/evals/checks.md +3 -3
  108. package/.docs/reference/evals/completeness.md +5 -5
  109. package/.docs/reference/evals/content-similarity.md +5 -5
  110. package/.docs/reference/evals/context-precision.md +2 -2
  111. package/.docs/reference/evals/context-recall.md +8 -8
  112. package/.docs/reference/evals/context-relevance.md +4 -4
  113. package/.docs/reference/evals/create-scorer.md +1 -1
  114. package/.docs/reference/evals/faithfulness.md +3 -3
  115. package/.docs/reference/evals/filter-run.md +2 -2
  116. package/.docs/reference/evals/hallucination.md +6 -6
  117. package/.docs/reference/evals/keyword-coverage.md +6 -6
  118. package/.docs/reference/evals/mastra-scorer.md +2 -2
  119. package/.docs/reference/evals/noise-sensitivity.md +5 -5
  120. package/.docs/reference/evals/prompt-alignment.md +5 -5
  121. package/.docs/reference/evals/rubric.md +1 -1
  122. package/.docs/reference/evals/run-evals.md +3 -3
  123. package/.docs/reference/evals/scorer-utils.md +4 -4
  124. package/.docs/reference/evals/textual-difference.md +4 -4
  125. package/.docs/reference/evals/tool-call-accuracy.md +1 -1
  126. package/.docs/reference/evals/toxicity.md +4 -4
  127. package/.docs/reference/evals/trajectory-accuracy.md +10 -10
  128. package/.docs/reference/file-based-agents/instructions.md +2 -2
  129. package/.docs/reference/file-based-agents/logger.md +1 -1
  130. package/.docs/reference/file-based-agents/observability.md +1 -1
  131. package/.docs/reference/file-based-agents/processors.md +1 -1
  132. package/.docs/reference/file-based-agents/skills.md +1 -1
  133. package/.docs/reference/file-based-agents/storage.md +1 -1
  134. package/.docs/reference/file-based-agents/studio.md +1 -1
  135. package/.docs/reference/file-based-agents/subagents.md +1 -1
  136. package/.docs/reference/file-based-agents/tools.md +1 -1
  137. package/.docs/reference/file-based-agents/workspace.md +1 -1
  138. package/.docs/reference/logging/pino-logger.md +3 -3
  139. package/.docs/reference/memory/clone-utilities.md +1 -1
  140. package/.docs/reference/memory/cloneThread.md +3 -3
  141. package/.docs/reference/memory/listThreads.md +1 -1
  142. package/.docs/reference/memory/memory-class.md +1 -1
  143. package/.docs/reference/memory/observational-memory.md +11 -11
  144. package/.docs/reference/memory/recall.md +2 -2
  145. package/.docs/reference/memory/serialized-memory-config.md +4 -4
  146. package/.docs/reference/memory/summarizeConversation.md +3 -3
  147. package/.docs/reference/memory/summarizeThread.md +3 -3
  148. package/.docs/reference/observability/feedback.md +1 -1
  149. package/.docs/reference/observability/metrics/automatic-metrics.md +7 -7
  150. package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
  151. package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +3 -3
  152. package/.docs/reference/observability/tracing/exporters/default-exporter.md +1 -1
  153. package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +4 -4
  154. package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +1 -1
  155. package/.docs/reference/observability/tracing/interfaces.md +1 -1
  156. package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +1 -1
  157. package/.docs/reference/observability/tracing/span-filtering.md +1 -1
  158. package/.docs/reference/processors/cost-guard-processor.md +1 -1
  159. package/.docs/reference/processors/pii-detector.md +1 -1
  160. package/.docs/reference/processors/processor-interface.md +12 -12
  161. package/.docs/reference/processors/prompt-injection-detector.md +1 -1
  162. package/.docs/reference/processors/provider-history-compat.md +1 -1
  163. package/.docs/reference/processors/regex-filter-processor.md +1 -1
  164. package/.docs/reference/processors/response-cache.md +8 -8
  165. package/.docs/reference/processors/system-prompt-scrubber.md +1 -1
  166. package/.docs/reference/processors/token-limiter-processor.md +1 -1
  167. package/.docs/reference/processors/tool-search-processor.md +7 -7
  168. package/.docs/reference/processors/unicode-normalizer.md +1 -1
  169. package/.docs/reference/project-structure.md +1 -1
  170. package/.docs/reference/pubsub/base.md +4 -4
  171. package/.docs/reference/pubsub/google-cloud-pubsub.md +2 -2
  172. package/.docs/reference/pubsub/lease-provider.md +4 -4
  173. package/.docs/reference/pubsub/redis-streams.md +1 -1
  174. package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
  175. package/.docs/reference/rag/chunk.md +5 -5
  176. package/.docs/reference/rag/database-config.md +2 -2
  177. package/.docs/reference/rag/metadata-filters.md +2 -2
  178. package/.docs/reference/schedules/overview.md +1 -1
  179. package/.docs/reference/server/register-api-route.md +1 -1
  180. package/.docs/reference/server/routes.md +1 -1
  181. package/.docs/reference/signals/signal-provider.md +8 -8
  182. package/.docs/reference/storage/clickhouse.md +4 -4
  183. package/.docs/reference/storage/cloudflare-d1.md +4 -4
  184. package/.docs/reference/storage/convex.md +4 -4
  185. package/.docs/reference/storage/dsql.md +2 -2
  186. package/.docs/reference/storage/dynamodb.md +7 -7
  187. package/.docs/reference/storage/lance.md +1 -1
  188. package/.docs/reference/storage/mongodb.md +1 -1
  189. package/.docs/reference/storage/mssql.md +1 -1
  190. package/.docs/reference/storage/postgresql.md +1 -1
  191. package/.docs/reference/storage/retention.md +33 -33
  192. package/.docs/reference/storage/spanner.md +8 -8
  193. package/.docs/reference/streaming/ChunkType.md +2 -2
  194. package/.docs/reference/streaming/agents/MastraModelOutput.md +1 -1
  195. package/.docs/reference/streaming/agents/stream.md +1 -1
  196. package/.docs/reference/streaming/agents/streamUntilIdle.md +2 -2
  197. package/.docs/reference/streaming/workflows/observeStream.md +1 -1
  198. package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
  199. package/.docs/reference/streaming/workflows/stream.md +1 -1
  200. package/.docs/reference/streaming/workflows/timeTravelStream.md +2 -2
  201. package/.docs/reference/templates/overview.md +1 -1
  202. package/.docs/reference/tools/brightdata.md +1 -1
  203. package/.docs/reference/tools/create-tool.md +1 -1
  204. package/.docs/reference/tools/graph-rag-tool.md +1 -1
  205. package/.docs/reference/tools/mcp-client.md +13 -13
  206. package/.docs/reference/tools/mcp-server.md +20 -20
  207. package/.docs/reference/tools/submit-plan-tool.md +1 -1
  208. package/.docs/reference/tools/tavily.md +1 -1
  209. package/.docs/reference/tools/vector-query-tool.md +4 -4
  210. package/.docs/reference/vectors/astra.md +1 -1
  211. package/.docs/reference/vectors/chroma.md +2 -2
  212. package/.docs/reference/vectors/convex.md +2 -2
  213. package/.docs/reference/vectors/couchbase.md +4 -4
  214. package/.docs/reference/vectors/libsql.md +1 -1
  215. package/.docs/reference/vectors/mongodb.md +1 -1
  216. package/.docs/reference/vectors/pg.md +4 -4
  217. package/.docs/reference/vectors/qdrant.md +2 -2
  218. package/.docs/reference/vectors/s3vectors.md +4 -4
  219. package/.docs/reference/vectors/turbopuffer.md +1 -1
  220. package/.docs/reference/voice/aws-nova-sonic.md +1 -1
  221. package/.docs/reference/voice/azure.md +1 -1
  222. package/.docs/reference/voice/google-gemini-live.md +4 -4
  223. package/.docs/reference/voice/inworld-realtime.md +7 -7
  224. package/.docs/reference/voice/livekit.md +13 -13
  225. package/.docs/reference/voice/mistral.md +1 -1
  226. package/.docs/reference/voice/openai-realtime.md +1 -1
  227. package/.docs/reference/voice/sarvam.md +1 -1
  228. package/.docs/reference/voice/voice.addTools.md +1 -1
  229. package/.docs/reference/voice/voice.events.md +1 -1
  230. package/.docs/reference/voice/voice.getSpeakers.md +2 -2
  231. package/.docs/reference/voice/voice.on.md +2 -2
  232. package/.docs/reference/voice/xai-realtime.md +2 -2
  233. package/.docs/reference/workflows/run-methods/cancel.md +1 -1
  234. package/.docs/reference/workflows/run-methods/startAsync.md +1 -1
  235. package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
  236. package/.docs/reference/workflows/workflow-methods/foreach.md +1 -1
  237. package/.docs/reference/workflows/workflow-methods/sleep.md +1 -1
  238. package/.docs/reference/workflows/workflow-state-reader.md +2 -2
  239. package/.docs/reference/workspace/apple-container-sandbox.md +2 -2
  240. package/.docs/reference/workspace/daytona-sandbox.md +3 -3
  241. package/.docs/reference/workspace/docker-sandbox.md +2 -2
  242. package/.docs/reference/workspace/e2b-sandbox.md +2 -2
  243. package/.docs/reference/workspace/files-sdk-filesystem.md +3 -3
  244. package/.docs/reference/workspace/google-drive-filesystem.md +4 -4
  245. package/.docs/reference/workspace/local-filesystem.md +2 -2
  246. package/.docs/reference/workspace/local-sandbox.md +2 -2
  247. package/.docs/reference/workspace/modal-sandbox.md +1 -1
  248. package/.docs/reference/workspace/platform-filesystem.md +3 -3
  249. package/.docs/reference/workspace/platform-sandbox.md +2 -2
  250. package/.docs/reference/workspace/process-manager.md +1 -1
  251. package/.docs/reference/workspace/railway-sandbox.md +4 -4
  252. package/.docs/reference/workspace/s3-filesystem.md +1 -1
  253. package/.docs/reference/workspace/sandbox.md +1 -1
  254. package/.docs/reference/workspace/vercel-sandbox.md +1 -1
  255. package/.docs/reference/workspace/workspace-class.md +10 -10
  256. package/CHANGELOG.md +7 -0
  257. package/package.json +5 -5
@@ -20,7 +20,7 @@ export const mastra = new Mastra({
20
20
  })
21
21
  ```
22
22
 
23
- > **Note:** You can omit the constructor parameters if you have the appropriately named environment variables (`AUTH0_DOMAIN` and `AUTH0_AUDIENCE`) set. In that case, use `new MastraAuthAuth0()` without any arguments.
23
+ > **Note:** You can omit the constructor parameters if the required environment variables (`AUTH0_DOMAIN` and `AUTH0_AUDIENCE`) are set. In that case, use `new MastraAuthAuth0()` without any arguments.
24
24
 
25
25
  ## Constructor parameters
26
26
 
@@ -61,7 +61,7 @@ Returns: `Promise<T[]>`
61
61
 
62
62
  Authorizes a non-user system actor, such as an autonomous or scheduled agent. Optional.
63
63
 
64
- System actors skip the user-centric `require()` path, so implement `requireActor` to enforce per-agent least privilege for them. Throw `FGADeniedError` to deny. When a provider doesn't implement `requireActor`, Mastra preserves the trusted-actor bypass (allow after the tenant-scope check), so adding it is backward compatible.
64
+ System actors skip the user-centric `require()` path, so implement `requireActor` to enforce per-agent least privilege for them. Throw `FGADeniedError` to deny. When a provider doesn't implement `requireActor`, Mastra preserves the trusted-actor bypass (allow after the tenant-scope check), so adding the method remains backward compatible.
65
65
 
66
66
  Treat `actor.permissions` as an untrusted claim. Resolve the agent's authoritative grants from a trusted source keyed by `actor.agentId`, rather than trusting the inline values. See [System actors](https://mastra.ai/docs/server/auth/fga).
67
67
 
@@ -110,7 +110,7 @@ The `params` argument passed to `check`, `require`, and `requireActor`.
110
110
 
111
111
  ## `ActorSignal`
112
112
 
113
- Identifies a call made by a trusted non-user actor rather than an authenticated end user. It is either `true` (the anonymous system shorthand) or an object that names the acting agent and carries the grants a provider can enforce.
113
+ Identifies a call made by a trusted non-user actor rather than an authenticated end user. It's either `true` (the anonymous system shorthand) or an object that names the acting agent and carries the grants a provider can enforce.
114
114
 
115
115
  **actorKind** (`'system'`): Marks the object form of the signal.
116
116
 
@@ -24,7 +24,7 @@ export const mastra = new Mastra({
24
24
  })
25
25
  ```
26
26
 
27
- > **Note:** You can omit the constructor parameters if you have the appropriately named environment variables set. In that case, use `new MastraAuthGoogle()` without any arguments.
27
+ > **Note:** You can omit the constructor parameters if the required environment variables are set. In that case, use `new MastraAuthGoogle()` without any arguments.
28
28
 
29
29
  ### Constructor parameters
30
30
 
@@ -72,7 +72,7 @@ The following environment variables are automatically used when constructor opti
72
72
 
73
73
  `MastraAuthGoogle` authenticates requests in the following order:
74
74
 
75
- 1. **Session cookie**: When SSO is enabled, reads the encrypted session cookie and decrypts it. If the session is valid and not expired, the user is authenticated.
75
+ 1. **Session cookie.** With SSO enabled, the provider reads and decrypts the encrypted session cookie. A valid, unexpired session authenticates the user.
76
76
  2. **Google ID token fallback**: If no valid session cookie is present, verifies the `Authorization` header token against Google's JWKS endpoint.
77
77
 
78
78
  After authentication, `authorizeUser` checks that the user has a valid Google user ID, the token-derived expiration hasn't passed, and the user's verified `hd` claim matches `allowedDomains` when domains are configured.
@@ -24,7 +24,7 @@ export const mastra = new Mastra({
24
24
  })
25
25
  ```
26
26
 
27
- > **Note:** You can omit the constructor parameters if you have the appropriately named environment variables set. In that case, use `new MastraAuthOkta()` without any arguments.
27
+ > **Note:** You can omit the constructor parameters if the required environment variables are set. In that case, use `new MastraAuthOkta()` without any arguments.
28
28
 
29
29
  ### Constructor parameters
30
30
 
@@ -20,7 +20,7 @@ export const mastra = new Mastra({
20
20
  })
21
21
  ```
22
22
 
23
- > **Note:** You can omit the constructor parameters if you have the appropriately named environment variables (`WORKOS_API_KEY` and `WORKOS_CLIENT_ID`) set. In that case, use `new MastraAuthWorkos()` without any arguments.
23
+ > **Note:** You can omit the constructor parameters if the required environment variables (`WORKOS_API_KEY` and `WORKOS_CLIENT_ID`) are set. In that case, use `new MastraAuthWorkos()` without any arguments.
24
24
 
25
25
  ## Constructor parameters
26
26
 
@@ -56,7 +56,7 @@ By default, `MastraAuthWorkos` authorizes any authenticated WorkOS user whose re
56
56
  2. **User Retrieval**: User information is extracted from the verified token
57
57
  3. **Authorization Decision**: Access is granted if the resolved user contains the required identifiers
58
58
 
59
- This means that by default, `MastraAuthWorkos` acts as an authentication provider rather than a role gate.
59
+ `MastraAuthWorkos` acts as an authentication provider rather than a role gate by default.
60
60
 
61
61
  ## FGA membership loading
62
62
 
@@ -107,7 +107,7 @@ Navigate to a URL.
107
107
 
108
108
  | Parameter | Type | Description |
109
109
  | ----------- | ----------------------------------------------- | ----------------------------------------------- |
110
- | `url` | `string` | URL to navigate to |
110
+ | `url` | `string` | URL to open |
111
111
  | `waitUntil` | `"load" \| "domcontentloaded" \| "networkidle"` | When to consider navigation complete (optional) |
112
112
  | `timeout` | `number` | Navigation timeout in ms (optional) |
113
113
 
@@ -358,7 +358,7 @@ Execute JavaScript in the page context. Use as an escape hatch when other tools
358
358
 
359
359
  ### `browser_screenshot`
360
360
 
361
- Capture a screenshot of the current page as PNG (viewport by default; set `fullPage: true` for full-page capture). Returns image content that vision-capable models can interpret directly. Use `browser_snapshot` when you only need text or structured data.
361
+ Capture a screenshot of the current page as PNG (viewport by default. Set `fullPage: true` for full-page capture). Returns image content that vision-capable models can interpret directly. Use `browser_snapshot` when you only need text or structured data.
362
362
 
363
363
  ```text
364
364
  // Viewport only (default)
@@ -227,6 +227,6 @@ browse skills install
227
227
 
228
228
  ## Related
229
229
 
230
- - [BrowserViewer guide](https://mastra.ai/docs/browser/browser-viewer) setup and usage walkthrough
231
- - [MastraBrowser](https://mastra.ai/reference/browser/mastra-browser) base class API reference
232
- - [Workspace overview](https://mastra.ai/docs/workspace/overview) workspace configuration
230
+ - [BrowserViewer guide](https://mastra.ai/docs/browser/browser-viewer): Setup and usage walkthrough
231
+ - [MastraBrowser](https://mastra.ai/reference/browser/mastra-browser): Base class API reference
232
+ - [Workspace overview](https://mastra.ai/docs/workspace/overview): Workspace configuration
@@ -2,7 +2,7 @@
2
2
 
3
3
  # MastraBrowser class
4
4
 
5
- The `MastraBrowser` class is the abstract base class for browser automation providers. It defines the common interface for launching browsers, managing thread isolation, streaming screencasts, and handling input events.
5
+ The `MastraBrowser` class is the abstract base class for browser automation providers. Its common interface covers browser launch and thread isolation, plus screencast streaming and input events.
6
6
 
7
7
  You don't instantiate `MastraBrowser` directly. Instead, use a provider implementation:
8
8
 
@@ -135,7 +135,7 @@ const hasSession = browser.hasThreadSession('thread-123')
135
135
 
136
136
  #### `closeThreadSession(threadId)`
137
137
 
138
- Closes a specific thread's browser session. For 'thread' scope, this closes that thread's browser instance. For 'shared' scope, this clears the thread's state.
138
+ Closes a specific thread's browser session. With 'thread' scope, it closes that thread's browser instance. With 'shared' scope, it clears the thread state.
139
139
 
140
140
  ```typescript
141
141
  await browser.closeThreadSession('thread-123')
@@ -145,7 +145,7 @@ await browser.closeThreadSession('thread-123')
145
145
 
146
146
  #### `getTools()`
147
147
 
148
- Returns the browser tools for use with agents. Each provider returns different tools based on its paradigm.
148
+ Returns the browser tools for use with agents. Each provider returns different tools based on its model.
149
149
 
150
150
  ```typescript
151
151
  const tools = browser.getTools()
@@ -79,7 +79,7 @@ Core tools:
79
79
  | ---------------------- | ------------------------------------------------------------------------------------- |
80
80
  | `stagehand_act` | Perform actions using natural language instructions |
81
81
  | `stagehand_extract` | Extract structured data from pages |
82
- | `stagehand_observe` | Discover actionable elements on a page |
82
+ | `stagehand_observe` | Discover useful elements on a page |
83
83
  | `stagehand_navigate` | Navigate to a URL |
84
84
  | `stagehand_tabs` | Manage browser tabs |
85
85
  | `stagehand_screenshot` | Capture a screenshot as PNG (viewport by default; set `fullPage: true` for full page) |
@@ -171,7 +171,7 @@ interface ExtractResult<T = unknown> {
171
171
 
172
172
  ### `stagehand_observe`
173
173
 
174
- Discover actionable elements on a page. Returns a list of elements with their selectors and descriptions.
174
+ Discover useful elements on a page. Returns a list of elements with their selectors and descriptions.
175
175
 
176
176
  ```text
177
177
  // Find specific elements
@@ -222,7 +222,7 @@ Navigate to a URL.
222
222
 
223
223
  | Parameter | Type | Description |
224
224
  | ----------- | ----------------------------------------------- | ----------------------------------------------- |
225
- | `url` | `string` | URL to navigate to (required) |
225
+ | `url` | `string` | URL to open (required) |
226
226
  | `waitUntil` | `"load" \| "domcontentloaded" \| "networkidle"` | When to consider navigation complete (optional) |
227
227
 
228
228
  ### `stagehand_tabs`
@@ -245,7 +245,7 @@ Manage browser tabs.
245
245
 
246
246
  ### `stagehand_screenshot`
247
247
 
248
- Capture a screenshot of the current page as PNG (viewport by default; set `fullPage: true` for full-page capture). Returns image content that vision-capable models can interpret directly. Use `stagehand_observe` or `stagehand_extract` when you only need text or structured data.
248
+ Capture a screenshot of the current page as PNG (viewport by default. Set `fullPage: true` for full-page capture). Returns image content that vision-capable models can interpret directly. Use `stagehand_observe` or `stagehand_extract` when you only need text or structured data.
249
249
 
250
250
  ```text
251
251
  // Viewport only (default)
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Usage example
8
8
 
9
- Register the provider on the `Mastra` constructor. The refresh token is single-use and rotates on startup; the resulting access tokens are persisted to `Mastra.storage`.
9
+ Register the provider on the `Mastra` constructor. The refresh token is single-use and rotates on startup. The resulting access tokens are persisted to `Mastra.storage`.
10
10
 
11
11
  ```typescript
12
12
  import { Mastra } from '@mastra/core/mastra'
@@ -171,7 +171,7 @@ slack.setBaseUrl('https://abc123.trycloudflare.com')
171
171
 
172
172
  #### `initialize()`
173
173
 
174
- Recreates a `SlackAdapter` for each active installation in storage and injects `AgentChannels` into the corresponding agent so it receives Slack events on startup. Doesn't auto-provision new apps; use `connect()` to create one. Mastra calls this automatically, so you rarely call it directly.
174
+ Recreates a `SlackAdapter` for each active installation in storage and injects `AgentChannels` into the corresponding agent so it receives Slack events on startup. Doesn't auto-provision new apps. Use `connect()` to create one. Mastra calls this automatically, so you rarely call it directly.
175
175
 
176
176
  ```typescript
177
177
  await slack.initialize()
@@ -60,7 +60,7 @@ yarn dlx create-mastra@latest my-mastra-project --llm anthropic
60
60
  bun x create-mastra@latest my-mastra-project --llm anthropic
61
61
  ```
62
62
 
63
- Omit `--llm` to select the provider and optionally enter its API key interactively. The interactive setup also offers to connect your project to the Mastra platform. If enabled, the command opens the browser authentication flow, creates a platform project with the same name as the local project, and writes `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` to `.env`.
63
+ Omit `--llm` to select the provider and optionally enter its API key interactively. The interactive setup also offers to connect your project to the Mastra platform. If enabled, the command opens the browser authentication flow and creates a platform project with the same name as the local project. It then writes `MASTRA_PLATFORM_ACCESS_TOKEN` and `MASTRA_PROJECT_ID` to `.env`.
64
64
 
65
65
  ### Template
66
66
 
@@ -32,7 +32,7 @@ Comma-separated list of custom arguments to pass to the Node.js process, e.g. `-
32
32
 
33
33
  #### `--request-context-presets`
34
34
 
35
- Path to a JSON file containing named [request context](https://mastra.ai/docs/server/request-context) presets. When provided, a dropdown displays in Studio's request context editor, letting you quickly switch between preset configurations.
35
+ Path to a JSON file containing [request context](https://mastra.ai/docs/server/request-context) presets. When provided, a dropdown displays in Studio's request context editor, letting you quickly switch between preset configurations.
36
36
 
37
37
  ```bash
38
38
  mastra dev --request-context-presets ./presets.json
@@ -49,7 +49,7 @@ The file must be a JSON object where each key is a preset name and each value is
49
49
 
50
50
  ### Configs
51
51
 
52
- You can set certain environment variables to modify the behavior of `mastra dev`.
52
+ You can set environment variables to modify the behavior of `mastra dev`.
53
53
 
54
54
  #### Skip peer dependency check
55
55
 
@@ -121,7 +121,7 @@ Under the hood Mastra's Rollup server locates your Mastra entry file and bundles
121
121
 
122
122
  The output in `.mastra` can be deployed to any cloud server using [`mastra start`](#mastra-start).
123
123
 
124
- If you're deploying to a [serverless platform](https://mastra.ai/docs/deployment/cloud-providers) you need to install the correct deployer in order to receive the correct output in `.mastra`.
124
+ If you're deploying to a [serverless platform](https://mastra.ai/docs/deployment/cloud-providers) you need to install the correct deployer to receive the correct output in `.mastra`.
125
125
 
126
126
  It accepts [common flags](#common-flags).
127
127
 
@@ -133,7 +133,7 @@ Bundle the Studio UI with the build.
133
133
 
134
134
  ### Configs
135
135
 
136
- You can set certain environment variables to modify the behavior of `mastra build`.
136
+ You can set environment variables to modify the behavior of `mastra build`.
137
137
 
138
138
  #### Skip peer dependency check
139
139
 
@@ -199,7 +199,7 @@ The API route prefix of the Mastra API server. Defaults to `/api`.
199
199
 
200
200
  #### `--request-context-presets`
201
201
 
202
- Path to a JSON file containing named [request context](https://mastra.ai/docs/server/request-context) presets. Works the same as the [`mastra dev` flag](#--request-context-presets).
202
+ Path to a JSON file containing [request context](https://mastra.ai/docs/server/request-context) presets. Works the same as the [`mastra dev` flag](#--request-context-presets).
203
203
 
204
204
  ```bash
205
205
  mastra studio --request-context-presets ./presets.json
@@ -207,7 +207,7 @@ mastra studio --request-context-presets ./presets.json
207
207
 
208
208
  ## `mastra deploy`
209
209
 
210
- Builds and deploys your project to a named environment on Mastra platform. This is the recommended command for all new deploys and replaces both [`mastra studio deploy`](#mastra-studio-deploy) and [`mastra server deploy`](#mastra-server-deploy), which continue to work but should no longer be used for new setups.
210
+ Builds and deploys your project to the Mastra platform environment selected by `--env`. This is the recommended command for all new deploys and replaces both [`mastra studio deploy`](#mastra-studio-deploy) and [`mastra server deploy`](#mastra-server-deploy), which continue to work but should no longer be used for new setups.
211
211
 
212
212
  Requires authentication via [`mastra auth login`](#mastra-auth-login) or a `MASTRA_API_TOKEN` environment variable.
213
213
 
@@ -217,7 +217,7 @@ mastra deploy --env staging
217
217
  mastra deploy --env production --region eu
218
218
  ```
219
219
 
220
- The command runs `mastra build`, zips the output, uploads it to the selected environment, and then polls the deploy status while streaming build logs until the deploy reaches a terminal state.
220
+ The command runs `mastra build` and zips the output before uploading it to the selected environment. It then polls the deploy status while streaming build logs until the deploy reaches a terminal state.
221
221
 
222
222
  Organization, project, and environment are resolved in order from: environment variable (`MASTRA_ORG_ID`, `MASTRA_PROJECT_ID`), CLI flag (`--org`, `--project`, `--env`), `.mastra-project.json` config file, current org from credentials, and lastly interactive prompt. On first deploy, the CLI saves the resolved org and project IDs to `.mastra-project.json` so subsequent deploys skip the prompts.
223
223
 
@@ -294,9 +294,9 @@ mastra deploy --env staging --yes
294
294
 
295
295
  ## `mastra env`
296
296
 
297
- Manages environments on Mastra platform. Environments are named deploy targets (for example `production`, `staging`, `preview-42`) that belong to a project. The current organization is resolved from stored credentials.
297
+ Manages environments on Mastra platform. Environments are deploy targets (for example `production`, `staging`, `preview-42`) that belong to a project. The current organization is resolved from stored credentials.
298
298
 
299
- Every subcommand resolves its project from, in order: the `MASTRA_PROJECT_ID` environment variable, the `--project <name|slug|id>` flag, or the `.mastra-project.json` file written by [`mastra deploy`](#mastra-deploy) in the current directory. Run from your project directory and you never need to name the project.
299
+ Every subcommand resolves its project in a fixed order. It first checks the `MASTRA_PROJECT_ID` environment variable and the `--project <name|slug|id>` flag. It then reads the `.mastra-project.json` file written by [`mastra deploy`](#mastra-deploy) in the current directory. Run from your project directory and you never need to name the project.
300
300
 
301
301
  ### `mastra env list`
302
302
 
@@ -356,7 +356,7 @@ mastra env restart <env>
356
356
 
357
357
  ### `mastra env vars pull`
358
358
 
359
- Pulls an environment's env vars into a local env file (default: `.env`). The file contains the merged set a deploy actually runs with: vars stored on the environment (for example, added in the dashboard's environment editor) plus project-level vars, with project values winning on conflict. Managed vars injected by attached databases are listed as comments (names only) since their values are platform-managed secrets.
359
+ Pulls an environment's env vars into a local env file (default: `.env`). The file contains the merged set used by a deploy. It combines vars stored on the environment (for example, added in the dashboard's environment editor) with project-level vars. Project values win on conflict. Managed vars injected by attached databases are listed as comments (names only) since their values are platform-managed secrets.
360
360
 
361
361
  ```bash
362
362
  mastra env vars pull
@@ -373,7 +373,7 @@ File to write. Defaults to `.env`.
373
373
 
374
374
  Manages databases attached to a project on Mastra platform. Databases are provisioned from a managed provider (for example Turso or Neon) and inject their connection env vars into deploys automatically.
375
375
 
376
- A database is either **environment-scoped** (its env vars only go to one environment) or **shared** (project-scoped: its env vars go to all environments). Environment-scoped is the default for `mastra env db create` pass an environment argument, or let the CLI pick or prompt for one. Pass `--shared` on create to attach a shared database instead. For other subcommands (`list`, `delete`, `keys`), pass the environment argument to work with environment-scoped databases and omit it for shared databases.
376
+ A database is either **environment-scoped** (its env vars only go to one environment) or **shared** (project-scoped: its env vars go to all environments). Environment-scoped is the default for `mastra env db create`: pass an environment argument, or let the CLI pick or prompt for one. Pass `--shared` on create to attach a shared database instead. For other subcommands (`list`, `delete`, `keys`), pass the environment argument to work with environment-scoped databases and omit it for shared databases.
377
377
 
378
378
  Creating and deleting databases requires the `admin` role in the organization.
379
379
 
@@ -392,7 +392,7 @@ Emit machine-readable JSON.
392
392
 
393
393
  ### `mastra env db create`
394
394
 
395
- Provisions a managed database, attaches it, and polls until it's ready. Provisioning errors are printed with the provider's error detail.
395
+ Provisions and attaches a managed database, then polls until it's ready. Provisioning errors are printed with the provider's error detail.
396
396
 
397
397
  By default the database is scoped to a single environment: pass an environment argument to pick it, or omit the argument to have the CLI pick for you. When the project has one environment, that environment is used. When it has several, the CLI prompts you to select one interactively; in non-interactive contexts (CI, `--json`) an environment argument is required. Pass `--shared` to attach a project-scoped database that's shared by every environment instead.
398
398
 
@@ -419,7 +419,7 @@ Provider region ID for shared databases. Ignored for environment-scoped database
419
419
 
420
420
  #### `--shared`
421
421
 
422
- Attach as a project-scoped database that's shared by every environment. Cannot be combined with an environment argument.
422
+ Attach as a project-scoped database that's shared by every environment. Can't be combined with an environment argument.
423
423
 
424
424
  #### `--no-wait`
425
425
 
@@ -475,7 +475,7 @@ Emit machine-readable JSON.
475
475
 
476
476
  ## `mastra studio deploy`
477
477
 
478
- > **Info:** `mastra studio deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which supports named environments (`--env staging`, `--env production`) on a single project. New setups should use `mastra deploy`.
478
+ > **Info:** `mastra studio deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which supports environments (`--env staging`, `--env production`) on a single project. New setups should use `mastra deploy`.
479
479
 
480
480
  Builds and deploys your project to Mastra platform. Requires authentication via [`mastra auth login`](#mastra-auth-login) or a `MASTRA_API_TOKEN` environment variable.
481
481
 
@@ -483,11 +483,11 @@ Builds and deploys your project to Mastra platform. Requires authentication via
483
483
  mastra studio deploy
484
484
  ```
485
485
 
486
- The command runs `mastra build`, zips the output, reads an env file from the project directory, and uploads everything to the platform. After uploading, it polls the deploy status and streams build logs until the deploy reaches a terminal state.
486
+ The command runs `mastra build` and zips the output. It reads an env file from the project directory before uploading everything to the platform. After uploading, it polls the deploy status and streams build logs until the deploy reaches a terminal state.
487
487
 
488
488
  The deploy command auto-loads the project's `.env` file. If `MASTRA_PROJECT_ID` points to a project that was provisioned for Observability, the deploy links to that project instead of creating a new one. Deploying Studio to an observability-only project converts it into a Studio project on the platform side.
489
489
 
490
- The CLI requires at least one `.env` or `.env.*` file (excluding `.env.example`) in the project directory and fails with `Error: No env file found for deploy.` if none exists. When multiple env files are present, the CLI prompts you to pick one (defaulting to `.env.production`); pass `--env-file` to choose explicitly. With `--yes` and multiple env files, you must pass `--env-file` or the deploy errors.
490
+ The CLI requires at least one `.env` or `.env.*` file (excluding `.env.example`) in the project directory and fails with `Error: No env file found for deploy.` if none exists. When multiple env files are present, the CLI prompts you to pick one (defaulting to `.env.production`). Pass `--env-file` to choose explicitly. With `--yes` and multiple env files, you must pass `--env-file` or the deploy errors.
491
491
 
492
492
  Organization and project are resolved in order from: Environment variable flag, `.mastra-project.json` config file, current org from credentials, and lastly interactive prompt. On first deploy, the CLI saves the resolved IDs to `.mastra-project.json` so subsequent deploys skip the prompts.
493
493
 
@@ -581,7 +581,7 @@ Shows diagnosis results and suggested fixes for a failed Studio deploy.
581
581
  mastra studio deploy suggestions [deploy-id]
582
582
  ```
583
583
 
584
- If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. If the deploy is healthy, no suggestions are shown.
584
+ If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. Suggestions appear only when the diagnosis finds a problem.
585
585
 
586
586
  ### `mastra studio projects`
587
587
 
@@ -593,7 +593,7 @@ Creates a new project through an interactive prompt. This command doesn't accept
593
593
 
594
594
  ## `mastra server deploy`
595
595
 
596
- > **Info:** `mastra server deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which deploys a single project to multiple named environments instead of separate Studio and Server commands. New setups should use `mastra deploy`.
596
+ > **Info:** `mastra server deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which deploys a single project to multiple environments instead of separate Studio and Server commands. New setups should use `mastra deploy`.
597
597
 
598
598
  Builds and deploys your project to Server on Mastra platform. Works the same as [`mastra studio deploy`](#mastra-studio-deploy) with the same flags, arguments, and resolution logic.
599
599
 
@@ -611,7 +611,7 @@ Shows diagnosis results and suggested fixes for a failed Server deploy.
611
611
  mastra server deploy suggestions [deploy-id]
612
612
  ```
613
613
 
614
- If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. If the deploy is healthy, no suggestions are shown.
614
+ If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. Suggestions appear only when the diagnosis finds a problem.
615
615
 
616
616
  ## `mastra server pause`
617
617
 
@@ -649,7 +649,7 @@ Same flags as [`mastra server pause`](#mastra-server-pause): **`--org`**, **`--p
649
649
  mastra server restart
650
650
  ```
651
651
 
652
- Fails if a deployment is still active for this project (running, building, deploying, etc.); that's a platform restriction so you can't restart while another deploy is in progress.
652
+ Fails if a deployment is still active for this project (running, building, deploying, etc.). That's a platform restriction so you can't restart while another deploy is in progress.
653
653
 
654
654
  ## `mastra server env`
655
655
 
@@ -892,7 +892,7 @@ Configure your code editor with Mastra's MCP server. Choose from: `"cursor" | "c
892
892
 
893
893
  #### `--observability`
894
894
 
895
- Enable Observability on the Mastra platform. The CLI prompts you to select an existing platform project or create a new one, writes the required environment variables, and configures the observability exporters.
895
+ Enable Observability on the Mastra platform. The CLI prompts you to select an existing platform project or create a new one. It then writes the required environment variables and configures the observability exporters.
896
896
 
897
897
  #### `--no-observability`
898
898
 
@@ -906,7 +906,7 @@ Set the platform project name to use when Mastra Observability is enabled.
906
906
 
907
907
  Runs database migrations to update your storage schema. This command is useful when upgrading Mastra versions that include storage schema changes.
908
908
 
909
- The command bundles your project, connects to your configured storage backend, and executes any pending migrations. Currently supports:
909
+ The command bundles your project and connects to your configured storage backend. It then executes any pending migrations. Currently supports:
910
910
 
911
911
  - **Duplicate spans migration**: Removes duplicate `(traceId, spanId)` entries and adds a unique constraint to ensure data integrity.
912
912
  - **ClickHouse legacy-to-vNext span migration**: Copies historical spans from the legacy `mastra_ai_spans` table to the vNext `mastra_span_events` schema. Runs in batches to stay within memory limits. See the [ClickHouse storage reference](https://mastra.ai/reference/storage/clickhouse) for details.
@@ -1417,7 +1417,7 @@ curl -sS "https://observability.mastra.ai/api/observability/traces/<trace-id>/sp
1417
1417
 
1418
1418
  #### `mastra api score create`
1419
1419
 
1420
- Creates an observability score. The input uses the server score body shape; inspect it with `--schema`.
1420
+ Creates an observability score. The input uses the server score body shape. Inspect it with `--schema`.
1421
1421
 
1422
1422
  ```bash
1423
1423
  mastra api score create <input>
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Agents API
4
4
 
5
- The Agents API provides methods to interact with Mastra AI agents, including generating responses, streaming interactions, and managing agent tools.
5
+ The Agents API provides methods to interact with Mastra AI agents, including generating responses and streaming interactions. It also provides methods for managing agent tools.
6
6
 
7
7
  ## Getting all agents
8
8
 
@@ -155,7 +155,7 @@ for await (const part of uiMessageStream) {
155
155
 
156
156
  ### `sendMessage()`
157
157
 
158
- Send user-authored input to an active agent run or idle memory thread. Use this with `subscribeToThread()` so the client can render the stream that wakes from, or receives, the message.
158
+ Send user-authored input to an active agent run or idle memory thread. Use this with `subscribeToThread()` so the client can render the stream that wakes from, or receives the message.
159
159
 
160
160
  ```typescript
161
161
  const agent = mastraClient.getAgent('support-agent')
@@ -285,7 +285,7 @@ await subscription.processDataStream({
285
285
 
286
286
  ### `streamUntilIdle()`
287
287
 
288
- Stream a response and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. The server re-enters the agentic loop on each task completion so the LLM can react to results in the same call. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call falls through to a plain `stream()`.
288
+ Stream a response and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. The server re-enters the agentic loop on each task completion so the LLM can react to results in the same call. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call uses a plain `stream()`.
289
289
 
290
290
  ```typescript
291
291
  const response = await agent.streamUntilIdle('Research solana for me', {
@@ -307,7 +307,7 @@ response.processDataStream({
307
307
 
308
308
  ### `resumeStreamUntilIdle()`
309
309
 
310
- Resume a suspended agent stream with custom data and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. Use this to continue execution after a suspension point, such as a workflow suspend within an agent. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call falls through to a plain `resumeStream()`:
310
+ Resume a suspended agent stream with custom data and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. Use this to continue execution after a suspension point, such as a workflow suspend within an agent. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call uses a plain `resumeStream()`:
311
311
 
312
312
  ```typescript
313
313
  const response = await agent.resumeStreamUntilIdle(
@@ -366,7 +366,7 @@ response.processDataStream({
366
366
 
367
367
  ### `listSuspendedRuns()`
368
368
 
369
- List suspended runs for the agent from storage runs waiting on a tool-call approval or on a tool that suspended. Discovery is backed by storage, so it works after a server restart and across server instances. Pass the returned `runId` to `approveToolCall()`, `declineToolCall()`, or `resumeStream()`.
369
+ List suspended runs for the agent from storage: runs waiting on a tool-call approval or on a tool that suspended. Discovery is backed by storage, so it works after a server restart and across server instances. Pass the returned `runId` to `approveToolCall()`, `declineToolCall()`, or `resumeStream()`.
370
370
 
371
371
  ```typescript
372
372
  const { runs, total } = await agent.listSuspendedRuns({
@@ -655,9 +655,9 @@ const screenshotTool = createTool({
655
655
 
656
656
  ### Tracing client tools
657
657
 
658
- When `@mastra/observability` is installed and configured on the server, a client-side tool records a `CLIENT_TOOL_CALL` span as a child of the current `AGENT_RUN` span. The server creates that span when the model emits the client tool call, injects a W3C trace carrier into the outgoing tool-call chunk, and ends the span once the tool arguments are available. Without server-side observability configured, client tool tracing is a no-op.
658
+ When `@mastra/observability` is installed and configured on the server, a client-side tool records a `CLIENT_TOOL_CALL` span as a child of the current `AGENT_RUN` span. The server creates that span when the model emits the client tool call and injects a W3C trace carrier into the outgoing tool-call chunk. It ends the span once the tool arguments are available. Without server-side observability configured, client tool tracing is a no-op.
659
659
 
660
- The client SDK also measures the wall-clock duration of each client tool's `execute` function and ships it back to the server, where it's emitted as a `mastra_tool_duration_ms` metric with `toolType: "client"`.
660
+ The client SDK also measures the wall-clock duration of each client tool's `execute` function and sends it back to the server, where it's emitted as a `mastra_tool_duration_ms` metric with `toolType: "client"`.
661
661
 
662
662
  For richer telemetry from inside your tool's `execute` function, use the `observe` helper on the execution context to add child spans and structured logs:
663
663
 
@@ -680,9 +680,9 @@ const fetchUserTool = createTool({
680
680
  })
681
681
  ```
682
682
 
683
- `observe` is always available when no tracing context is active (e.g. running outside a traced agent), `span` runs the function directly and `log` is a no-op. No null-checking needed.
683
+ `observe` is always available: when no tracing context is active (e.g. running outside a traced agent), `span` runs the function directly and `log` is a no-op. No null-checking needed.
684
684
 
685
- The SDK serializes everything the collector buffered as OTLP/JSON and ships it back in the next request body. The server's `@mastra/observability` package validates that the spans belong to the correct trace (preventing cross-trace injection) and forwards each span/log into the same observability bus that server-side telemetry uses. Your existing exporters pick them up automatically after observability is configured.
685
+ The SDK serializes everything the collector buffered as OTLP/JSON and sends it back in the next request body. The server's `@mastra/observability` package validates that the spans belong to the correct trace (preventing cross-trace injection) and forwards each span/log into the same observability bus that server-side telemetry uses. Your existing exporters pick them up automatically after observability is configured.
686
686
 
687
687
  ## Stored agents
688
688
 
@@ -168,7 +168,7 @@ const result = await thread.listMessages({
168
168
  })
169
169
  ```
170
170
 
171
- Metadata filters match shallow scalar values only: `string`, finite `number`, `boolean`, and `null`. Every key-value pair must match with AND semantics. `null` matches an explicit `null` value, not a missing metadata key. Metadata keys must start with a letter or underscore, may contain only alphanumeric characters and underscores, must be 128 characters or fewer, and can't use reserved prototype keys such as `__proto__`, `constructor`, or `prototype`. Performance depends on the server storage backend, and arbitrary metadata filters may scan candidate messages.
171
+ Metadata filters match shallow scalar values only: `string`, finite `number`, `boolean`, and `null`. Every key-value pair must match with AND semantics. `null` matches only keys explicitly set to `null`. Metadata keys must start with a letter or underscore and contain only alphanumeric or underscore characters. The limit is 128 characters. Reserved prototype keys such as `__proto__`, `constructor`, and `prototype` aren't allowed. Performance depends on the server storage backend, and arbitrary metadata filters may scan candidate messages.
172
172
 
173
173
  ### Delete Messages
174
174
 
@@ -226,7 +226,7 @@ await mastraClient.updateWorkingMemory({
226
226
  // Returns: { success: true }
227
227
  ```
228
228
 
229
- **Note:** For resource-scoped working memory, you must provide the `resourceId` parameter. This allows the memory to persist across all conversation threads for that user.
229
+ For resource-scoped working memory, you must provide the `resourceId` parameter. It allows the memory to persist across all conversation threads for that user.
230
230
 
231
231
  ### Get Memory Status
232
232
 
@@ -142,7 +142,7 @@ await run.resume({
142
142
  })
143
143
  ```
144
144
 
145
- When a [`.foreach()`](https://mastra.ai/reference/workflows/workflow-methods/foreach) step suspends across multiple iterations, pass `forEachIndex` (zero-based; `0` targets the first iteration) to resume one iteration at a time. Iterations you don't target remain suspended.
145
+ When a [`.foreach()`](https://mastra.ai/reference/workflows/workflow-methods/foreach) step suspends across multiple iterations, pass `forEachIndex` (zero-based. `0` targets the first iteration) to resume one iteration at a time. Iterations you don't target remain suspended.
146
146
 
147
147
  ```typescript
148
148
  await run.resume({
@@ -2,11 +2,11 @@
2
2
 
3
3
  # buildBasePrompt()
4
4
 
5
- `buildBasePrompt()` builds the shared base system prompt for a coding agent the behavioral instructions that make the agent a good coding assistant. It takes a `PromptContext` describing the current environment (project, platform, git branch, mode, model) and returns the prompt as a string.
5
+ `buildBasePrompt()` builds the shared base system prompt for a coding agent: the behavioral instructions that make the agent a good coding assistant. It takes a `PromptContext` describing the current environment (project, platform, git branch, mode, model) and returns the prompt as a string.
6
6
 
7
7
  Product-specific strings are parameterized through `productName`, `coAuthorName`, and `coAuthorEmail`, so you can rebrand the prompt and commit trailer without forking it. They default to `"Mastra Code"` / `"noreply@mastra.ai"`, so existing callers keep identical output.
8
8
 
9
- Use this with [`createCodingAgent()`](https://mastra.ai/reference/coding-agent/create-coding-agent) when you build dynamic instructions for the agent.
9
+ Use this with [`createCodingAgent()`](https://mastra.ai/reference/coding-agent/create-coding-agent) when you build runtime-defined instructions for the agent.
10
10
 
11
11
  ## Usage example
12
12
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  `createCodingAgent()` builds a coding [`Agent`](https://mastra.ai/reference/agents/agent) with portable defaults for the pieces a coding agent always needs: a local workspace, the task-list signal provider, network-retry error processors, and the goal judge prompt. Supply only `model`, `instructions`, and `tools` to get a working agent, or override any default.
6
6
 
7
- The returned value is a standard `Agent`, so it works anywhere an `Agent` does including as the agent passed to an [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class).
7
+ The returned value is a standard `Agent`, so it works anywhere an `Agent` does: including as the agent passed to an [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class).
8
8
 
9
9
  ## Usage example
10
10
 
@@ -70,7 +70,7 @@ new Workspace({
70
70
  })
71
71
  ```
72
72
 
73
- To opt out for example when the workspace is injected at the [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class) level pass `workspace: undefined` explicitly:
73
+ To opt out (for example, when the workspace is injected at the [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class) level), pass `workspace: undefined` explicitly:
74
74
 
75
75
  ```typescript
76
76
  const agent = createCodingAgent({
@@ -242,7 +242,7 @@ export const mastra = new Mastra({
242
242
 
243
243
  **Type:** `Record<string, MastraMemory>`
244
244
 
245
- A registry of memory instances that can be referenced by agents. Memory gives agents coherence across interactions by retaining relevant information from past conversations. Mastra supports three types of memory: message history for recent messages, working memory for persistent user-specific details, and semantic recall for retrieving older messages based on relevance.
245
+ A registry of memory instances that can be referenced by agents. Memory gives agents coherence across interactions by retaining relevant information from past conversations. Mastra supports message history for recent messages and working memory for persistent user-specific details. Semantic recall retrieves older messages based on relevance.
246
246
 
247
247
  Visit the [Memory documentation](https://mastra.ai/docs/memory/overview) to learn more.
248
248
 
@@ -343,7 +343,7 @@ export const mastra = new Mastra({
343
343
 
344
344
  **Type:** `Record<string, Scorer>`
345
345
 
346
- Scorers assess the quality of agent responses and workflow outputs. They provide quantifiable metrics for measuring agent quality using model-graded, rule-based, and statistical methods. Use scorers to track performance, compare approaches, and identify areas for improvement.
346
+ Scorers assess the quality of agent responses and workflow outputs. They provide quantifiable metrics for measuring agent quality using model-graded, rule-based, and statistical methods. Use scorers to track performance and compare approaches. They can also identify areas for improvement.
347
347
 
348
348
  Visit the [Scorers documentation](https://mastra.ai/docs/evals/overview) to learn more.
349
349
 
@@ -505,11 +505,11 @@ const mastra = new Mastra({
505
505
  **Type:** `boolean | string[]`\
506
506
  **Default:** `true`
507
507
 
508
- When `mastra build` is run, Mastra bundles your project into the `.mastra/output` directory. This option controls which packages are excluded from the bundle (marked as "external") and installed separately through a package manager. This is useful when the internal Mastra bundler ([Rollup](https://rollupjs.org/configuration-options/#external)) has trouble bundling certain packages.
508
+ When `mastra build` is run, Mastra bundles your project into the `.mastra/output` directory. This option controls which packages are excluded from the bundle (marked as "external") and installed separately through a package manager. This is useful when the internal Mastra bundler ([Rollup](https://rollupjs.org/configuration-options/#external)) has trouble bundling packages.
509
509
 
510
510
  By default, `mastra build` sets this option to `true`.
511
511
 
512
- Here's an overview of what the different values mean:
512
+ The values have these meanings:
513
513
 
514
514
  - `true`: All dependencies listed in your project's `package.json` are marked as external
515
515
  - `false`: No dependencies are marked as external; everything is bundled together
@@ -784,7 +784,7 @@ export const mastra = new Mastra({
784
784
 
785
785
  Custom error handler called when an unhandled error occurs. Use this to customize error responses, log errors to external services like Sentry, or implement custom error formatting.
786
786
 
787
- This hook is supported by all server adapters. The `c` parameter provides a Hono-compatible context object for non-Hono adapters (Koa, Express, Fastify), a shim is provided with commonly used methods like `c.json()` and `c.req.path`.
787
+ This hook is supported by all server adapters. The `c` parameter provides a Hono-compatible context object: for non-Hono adapters (Koa, Express, Fastify), a shim is provided with commonly used methods like `c.json()` and `c.req.path`.
788
788
 
789
789
  ```typescript
790
790
  import { Mastra } from '@mastra/core'
@@ -813,7 +813,7 @@ export const mastra = new Mastra({
813
813
 
814
814
  Custom handler called when a request fails Zod schema validation. Use this to customize validation error responses, change the status code, or format errors to match your API standards.
815
815
 
816
- Return a `{ status, body }` object to override the default `400` response, or `undefined` to fall through to the default behavior. This hook is supported by all server adapters (Hono, Express, Fastify, Koa).
816
+ Return a `{ status, body }` object to override the default `400` response, or `undefined` to use the default behavior. This hook is supported by all server adapters (Hono, Express, Fastify, Koa).
817
817
 
818
818
  The `context` parameter indicates which part of the request failed validation:
819
819
 
@@ -30,7 +30,7 @@ const serverById = mastra.getMCPServerById('my-mcp-server')
30
30
 
31
31
  ## Parameters
32
32
 
33
- **registryKey** (`string`): The registry key used when registering the MCP server in the mcpServers configuration object. This is the key in the key-value pair, not the server's intrinsic id property.
33
+ **registryKey** (`string`): The registry key used when registering the MCP server in the mcpServers configuration object. It is the configuration key in the key-value pair, not the server's intrinsic id property.
34
34
 
35
35
  ## Returns
36
36
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # getScorer()
4
4
 
5
- The `getScorer()` method retrieves a specific scorer that was registered with the Mastra instance using its registration key. This method provides type-safe access to scorers and throws an error if the requested scorer isn't found.
5
+ The `getScorer()` method retrieves a specific scorer that was registered with the Mastra instance using its registration key. The method provides type-safe access to scorers and throws an error if the requested scorer isn't found.
6
6
 
7
7
  ## Usage example
8
8