@mastra/mcp-docs-server 1.3.13-alpha.12 → 1.3.13-alpha.15

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.
@@ -200,6 +200,8 @@ export async function handleRequest(prompt: string, apiKey: string) {
200
200
 
201
201
  Visit [`listTools()`](https://mastra.ai/reference/tools/mcp-client) and [`listToolsets()`](https://mastra.ai/reference/tools/mcp-client) for their full APIs.
202
202
 
203
+ This example finishes within one request. When agent work must continue after the request ends or survive a process restart, use [durable agents](https://mastra.ai/docs/harness/durable-agents) or [background tasks](https://mastra.ai/docs/harness/background-tasks) instead of building your own task tracking. Call-time `toolsets` can't move to another process, so with a durable agent, load per-request MCP tools in the agent's `tools` function from [request context](https://mastra.ai/docs/server/request-context).
204
+
203
205
  ### Tool approval
204
206
 
205
207
  Set `requireToolApproval` on a server to require approval for all its tools:
@@ -10,6 +10,8 @@ Scorers are automated tests that evaluate Agents outputs using model-graded, rul
10
10
 
11
11
  Scorers can run in the cloud to capture real-time results. Scorers can also be part of your CI/CD pipeline for testing and monitoring agents over time.
12
12
 
13
+ Scorers measure a single output. To improve an agent over time, combine them with [datasets](https://mastra.ai/docs/evals/datasets), which store versioned test cases, and [experiments](https://mastra.ai/docs/evals/experiments), which run an agent or workflow against a dataset, optionally score each result, and keep the results for comparison. [Build an eval loop](https://mastra.ai/docs/guides/build-an-eval-loop) walks through using them together.
14
+
13
15
  > **📹 Watch:** Watch [Mastra evals overview](https://www.youtube.com/watch?v=12WN6u2DrBk) for an introduction to evals and how to reason about agent quality.
14
16
 
15
17
  ## Types of scorers
@@ -220,6 +222,8 @@ Once registered, you can score traces interactively within Studio under the **Ob
220
222
 
221
223
  ## Next steps
222
224
 
225
+ - Follow [Build an eval loop](https://mastra.ai/docs/guides/build-an-eval-loop) to compare agent changes with datasets, scorers, and experiments
226
+ - Store test cases in [datasets](https://mastra.ai/docs/evals/datasets) and run them with [experiments](https://mastra.ai/docs/evals/experiments)
223
227
  - Use [Quick Checks](https://mastra.ai/docs/evals/quick-checks) for fast, deterministic assertions on text and tool usage
224
228
  - Add [gates and verdicts](https://mastra.ai/docs/evals/gates-and-verdicts) to enforce hard requirements and quality thresholds
225
229
  - Test [multi-turn conversations](https://mastra.ai/docs/evals/multi-turn) where behavior emerges across sequential turns
@@ -112,6 +112,8 @@ export const startServerTool = createTool({
112
112
 
113
113
  [`LocalSandbox`](https://mastra.ai/reference/workspace/local-sandbox) executes commands on the same machine as your Mastra application. By default, commands run directly on the host with the permissions of the application process.
114
114
 
115
+ `workingDirectory` only sets where commands run. Mastra doesn't copy your project into it. To give an agent its own checkout, run `git clone` or `git worktree add` into a directory outside the source repository.
116
+
115
117
  ```typescript
116
118
  const sandbox = new LocalSandbox({
117
119
  workingDirectory: './workspace',
@@ -215,6 +215,31 @@ await workspace.index('/docs/api.md', apiDocContent, {
215
215
 
216
216
  Manual indexing works well for database records and API responses, or when you need to preprocess, chunk, or annotate content yourself.
217
217
 
218
+ ### Index application content
219
+
220
+ A workspace needs a `filesystem`, `sandbox`, or `skills` provider even when your application reads content and passes it to `workspace.index()`. Without one, the `Workspace` constructor throws `Workspace requires at least a filesystem, sandbox, or skills`.
221
+
222
+ Configuring a filesystem doesn't mean the agent should use it. By default, an agent with this workspace also gets file tools such as `mastra_workspace_read_file` and `mastra_workspace_write_file`. To expose only search, disable all workspace tools and re-enable the search tool:
223
+
224
+ ```typescript
225
+ import { LocalFilesystem, Workspace, WORKSPACE_TOOLS } from '@mastra/core/workspace'
226
+
227
+ const workspace = new Workspace({
228
+ filesystem: new LocalFilesystem({ basePath: './workspace' }),
229
+ bm25: true,
230
+ tools: {
231
+ enabled: false,
232
+ [WORKSPACE_TOOLS.SEARCH.SEARCH]: { enabled: true },
233
+ },
234
+ })
235
+
236
+ for (const document of documents) {
237
+ await workspace.index(document.id, document.content)
238
+ }
239
+ ```
240
+
241
+ Your application keeps calling `workspace.index()` directly. The tool settings only control what the agent can call.
242
+
218
243
  ### Keep files and the index in sync
219
244
 
220
245
  Filesystem and index mutations are independent. Writing, editing, or deleting a file doesn't update its indexed content, and `workspace.index()` doesn't read or change a file.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.3.13-alpha.12",
3
+ "version": "1.3.13-alpha.15",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,8 +26,8 @@
26
26
  "@mastra/mcp-legacy": "npm:@mastra/mcp@^1.18.0",
27
27
  "local-pkg": "^1.2.1",
28
28
  "zod": "^4.6.7",
29
- "@mastra/mcp": "^2.9.0-alpha.3",
30
- "@mastra/core": "1.83.0-alpha.9"
29
+ "@mastra/core": "1.83.0-alpha.11",
30
+ "@mastra/mcp": "^2.9.0-alpha.4"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@hono/node-server": "^2.1.3",