@mastra/mcp-docs-server 1.1.39-alpha.11 → 1.1.39-alpha.12
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.
|
@@ -40,11 +40,12 @@ The full set of options is listed in the [backgroundTasks configuration referenc
|
|
|
40
40
|
|
|
41
41
|
## Run a tool in the background
|
|
42
42
|
|
|
43
|
-
Enabling the manager doesn't run anything in the background by itself as every tool defaults to foreground execution.
|
|
43
|
+
Enabling the manager doesn't run anything in the background by itself as every tool defaults to foreground execution. Tools opt in at one of two layers:
|
|
44
44
|
|
|
45
|
-
1. **
|
|
45
|
+
1. **Tool-level config**: the tool itself declares it as background-eligible.
|
|
46
46
|
2. **Agent-level config**: the agent declares which of its tools are background-eligible.
|
|
47
|
-
|
|
47
|
+
|
|
48
|
+
Once a tool has opted in, the LLM can optionally include a `_background` field in the tool arguments to override the resolved config for a specific call (timeout, retries, or to flip the call back to foreground).
|
|
48
49
|
|
|
49
50
|
### Tool-level
|
|
50
51
|
|
|
@@ -103,13 +104,15 @@ When a tool is registered on an agent that has background tasks enabled, the mod
|
|
|
103
104
|
}
|
|
104
105
|
```
|
|
105
106
|
|
|
107
|
+
The `_background` override is a _modifier_ on tools the developer has already opted in at the tool or agent layer — it is not a standalone opt-in. If a tool hasn't been opted in, `_background.enabled: true` from the model is ignored and the tool runs in the foreground. This keeps deterministic, foreground-only tools (calculators, lookups, schema validators) from being silently dispatched as tasks.
|
|
108
|
+
|
|
106
109
|
### Resolution order
|
|
107
110
|
|
|
108
111
|
When a tool call is dispatched, the resolved background config is computed in this priority order:
|
|
109
112
|
|
|
110
|
-
1.
|
|
111
|
-
2.
|
|
112
|
-
3.
|
|
113
|
+
1. Agent-level `backgroundTasks.tools` entry for the tool.
|
|
114
|
+
2. Tool-level `backgroundTasks` config.
|
|
115
|
+
3. LLM `_background.enabled` override (only used to enable background dispatch when the tool was opted in at one of the layers above).
|
|
113
116
|
4. Manager defaults (`defaultTimeoutMs`, `defaultRetries`).
|
|
114
117
|
|
|
115
118
|
If the agent has `backgroundTasks.disabled: true`, every tool call runs synchronously regardless of the layers above.
|
|
@@ -63,7 +63,7 @@ export const mastra = new Mastra({
|
|
|
63
63
|
})
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
**enabled** (`boolean`): Whether background
|
|
66
|
+
**enabled** (`boolean`): Whether the background task manager is available. The manager only initializes when this is true and a storage backend is configured. This is a feature-availability switch — it does not opt any tool into background dispatch. Tools must opt in at the tool or agent layer (see the Background tasks guide). (Default: `false`)
|
|
67
67
|
|
|
68
68
|
**globalConcurrency** (`number`): Maximum number of background tasks running concurrently across all agents. (Default: `10`)
|
|
69
69
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.1.39-alpha.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`ac79462`](https://github.com/mastra-ai/mastra/commit/ac79462b98f1062394c45093aa515b0766f27ee2), [`19281c7`](https://github.com/mastra-ai/mastra/commit/19281c70424f757219782de16c2699743c5e04d0)]:
|
|
8
|
+
- @mastra/core@1.36.0-alpha.5
|
|
9
|
+
|
|
3
10
|
## 1.1.39-alpha.11
|
|
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.1.39-alpha.
|
|
3
|
+
"version": "1.1.39-alpha.12",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"jsdom": "^26.1.0",
|
|
30
30
|
"local-pkg": "^1.1.2",
|
|
31
31
|
"zod": "^4.3.6",
|
|
32
|
-
"@mastra/
|
|
33
|
-
"@mastra/
|
|
32
|
+
"@mastra/mcp": "^1.8.0-alpha.1",
|
|
33
|
+
"@mastra/core": "1.36.0-alpha.5"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@hono/node-server": "^1.19.11",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"tsx": "^4.21.0",
|
|
47
47
|
"typescript": "^6.0.3",
|
|
48
48
|
"vitest": "4.1.5",
|
|
49
|
+
"@internal/lint": "0.0.96",
|
|
49
50
|
"@internal/types-builder": "0.0.71",
|
|
50
|
-
"@mastra/core": "1.36.0-alpha.
|
|
51
|
-
"@internal/lint": "0.0.96"
|
|
51
|
+
"@mastra/core": "1.36.0-alpha.5"
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://mastra.ai",
|
|
54
54
|
"repository": {
|