@mastra/mcp-docs-server 0.13.13 → 0.13.14-alpha.1
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/organized/changelogs/%40internal%2Fplayground.md +1 -0
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +9 -9
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +2 -0
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +12 -12
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +34 -34
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +52 -52
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +32 -32
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +27 -27
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +41 -41
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +7 -0
- package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +9 -9
- package/.docs/organized/changelogs/%40mastra%2Flance.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +26 -26
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +35 -35
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +18 -0
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +31 -31
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Frag.md +14 -14
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +8 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +30 -30
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +9 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +10 -10
- package/.docs/organized/changelogs/create-mastra.md +11 -11
- package/.docs/organized/changelogs/mastra.md +36 -36
- package/.docs/organized/code-examples/agent.md +2 -2
- package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +25 -0
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +1 -1
- package/.docs/raw/reference/client-js/mastra-client.mdx +6 -0
- package/.docs/raw/reference/scorers/create-scorer.mdx +1 -1
- package/.docs/raw/reference/scorers/tool-call-accuracy.mdx +211 -0
- package/.docs/raw/scorers/off-the-shelf-scorers.mdx +1 -0
- package/.docs/raw/tools-mcp/mcp-overview.mdx +1 -1
- package/.docs/raw/workflows/control-flow.mdx +2 -0
- package/package.json +5 -5
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-sarvam
|
|
2
2
|
|
|
3
|
+
## 0.10.9-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#6942](https://github.com/mastra-ai/mastra/pull/6942) [`ca8ec2f`](https://github.com/mastra-ai/mastra/commit/ca8ec2f61884b9dfec5fc0d5f4f29d281ad13c01) Thanks [@wardpeet](https://github.com/wardpeet)! - Add zod as peerdeps for all packages
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`943a7f3`](https://github.com/mastra-ai/mastra/commit/943a7f3dbc6a8ab3f9b7bc7c8a1c5b319c3d7f56), [`be49354`](https://github.com/mastra-ai/mastra/commit/be493546dca540101923ec700feb31f9a13939f2), [`d591ab3`](https://github.com/mastra-ai/mastra/commit/d591ab3ecc985c1870c0db347f8d7a20f7360536), [`ba82abe`](https://github.com/mastra-ai/mastra/commit/ba82abe76e869316bb5a9c95e8ea3946f3436fae), [`727f7e5`](https://github.com/mastra-ai/mastra/commit/727f7e5086e62e0dfe3356fb6dcd8bcb420af246), [`82d9f64`](https://github.com/mastra-ai/mastra/commit/82d9f647fbe4f0177320e7c05073fce88599aa95), [`4189486`](https://github.com/mastra-ai/mastra/commit/4189486c6718fda78347bdf4ce4d3fc33b2236e1), [`ca8ec2f`](https://github.com/mastra-ai/mastra/commit/ca8ec2f61884b9dfec5fc0d5f4f29d281ad13c01)]:
|
|
10
|
+
- @mastra/core@0.14.2-alpha.1
|
|
11
|
+
|
|
3
12
|
## 0.10.8
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -289,14 +298,5 @@
|
|
|
289
298
|
- Updated dependencies [344f453]
|
|
290
299
|
- Updated dependencies [0a3ae6d]
|
|
291
300
|
- Updated dependencies [95911be]
|
|
292
|
-
- Updated dependencies [5eb5a99]
|
|
293
|
-
- Updated dependencies [7e632c5]
|
|
294
|
-
- Updated dependencies [1e9fbfa]
|
|
295
|
-
- Updated dependencies [b2ae5aa]
|
|
296
|
-
- Updated dependencies [a7292b0]
|
|
297
|
-
- Updated dependencies [0dcb9f0]
|
|
298
|
-
- @mastra/core@0.10.0-alpha.1
|
|
299
|
-
|
|
300
|
-
## 0.1.14-alpha.0
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 750 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-speechify
|
|
2
2
|
|
|
3
|
+
## 0.10.9-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#6942](https://github.com/mastra-ai/mastra/pull/6942) [`ca8ec2f`](https://github.com/mastra-ai/mastra/commit/ca8ec2f61884b9dfec5fc0d5f4f29d281ad13c01) Thanks [@wardpeet](https://github.com/wardpeet)! - Add zod as peerdeps for all packages
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`943a7f3`](https://github.com/mastra-ai/mastra/commit/943a7f3dbc6a8ab3f9b7bc7c8a1c5b319c3d7f56), [`be49354`](https://github.com/mastra-ai/mastra/commit/be493546dca540101923ec700feb31f9a13939f2), [`d591ab3`](https://github.com/mastra-ai/mastra/commit/d591ab3ecc985c1870c0db347f8d7a20f7360536), [`ba82abe`](https://github.com/mastra-ai/mastra/commit/ba82abe76e869316bb5a9c95e8ea3946f3436fae), [`727f7e5`](https://github.com/mastra-ai/mastra/commit/727f7e5086e62e0dfe3356fb6dcd8bcb420af246), [`82d9f64`](https://github.com/mastra-ai/mastra/commit/82d9f647fbe4f0177320e7c05073fce88599aa95), [`4189486`](https://github.com/mastra-ai/mastra/commit/4189486c6718fda78347bdf4ce4d3fc33b2236e1), [`ca8ec2f`](https://github.com/mastra-ai/mastra/commit/ca8ec2f61884b9dfec5fc0d5f4f29d281ad13c01)]:
|
|
10
|
+
- @mastra/core@0.14.2-alpha.1
|
|
11
|
+
|
|
3
12
|
## 0.10.8
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -289,14 +298,5 @@
|
|
|
289
298
|
- Updated dependencies [d0ee3c6]
|
|
290
299
|
- Updated dependencies [b2ae5aa]
|
|
291
300
|
- Updated dependencies [23f258c]
|
|
292
|
-
- Updated dependencies [a7292b0]
|
|
293
|
-
- Updated dependencies [0dcb9f0]
|
|
294
|
-
- Updated dependencies [2672a05]
|
|
295
|
-
- @mastra/core@0.10.0
|
|
296
|
-
|
|
297
|
-
## 0.2.0-alpha.1
|
|
298
|
-
|
|
299
|
-
### Minor Changes
|
|
300
|
-
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 1104 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# create-mastra
|
|
2
2
|
|
|
3
|
+
## 0.10.24-alpha.1
|
|
4
|
+
|
|
5
|
+
## 0.10.24-alpha.0
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#6948](https://github.com/mastra-ai/mastra/pull/6948) [`a8070e6`](https://github.com/mastra-ai/mastra/commit/a8070e63ab384ae14a214faaf8634c53b7064bc3) Thanks [@taofeeq-deru](https://github.com/taofeeq-deru)! - Preserve run state in workflows after viewing traces
|
|
10
|
+
|
|
11
|
+
## 0.10.23
|
|
12
|
+
|
|
3
13
|
## 0.10.23-alpha.0
|
|
4
14
|
|
|
5
15
|
## 0.10.22
|
|
@@ -288,15 +298,5 @@
|
|
|
288
298
|
- f78f399: Make AgentModelSettings shareable between cloud and playground
|
|
289
299
|
- 57929df: agent network display
|
|
290
300
|
|
|
291
|
-
## 0.10.8-alpha.0
|
|
292
|
-
|
|
293
|
-
### Patch Changes
|
|
294
|
-
|
|
295
|
-
- 4e06e3f: timing not displayed correctly in traces
|
|
296
|
-
- 7e801dd: [MASTRA-4118] fixes issue with agent network loopStream where subsequent messages aren't present in playground on refresh
|
|
297
|
-
- a606c75: show right suspend schema for nested workflow on playground
|
|
298
|
-
- 1760a1c: Use workflow stream in playground instead of watch
|
|
299
|
-
- 038e5ae: Add cancel workflow run
|
|
300
|
-
- ac369c6: Show resume data on workflow graph
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 1242 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# mastra
|
|
2
2
|
|
|
3
|
+
## 0.10.24-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#6942](https://github.com/mastra-ai/mastra/pull/6942) [`ca8ec2f`](https://github.com/mastra-ai/mastra/commit/ca8ec2f61884b9dfec5fc0d5f4f29d281ad13c01) Thanks [@wardpeet](https://github.com/wardpeet)! - Add zod as peerdeps for all packages
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`2b38a60`](https://github.com/mastra-ai/mastra/commit/2b38a60da0c1153028d8241c7748b41c5fb81121), [`943a7f3`](https://github.com/mastra-ai/mastra/commit/943a7f3dbc6a8ab3f9b7bc7c8a1c5b319c3d7f56), [`681252d`](https://github.com/mastra-ai/mastra/commit/681252d20e57fcee6821377dea96cacab3bc230f), [`01be5d3`](https://github.com/mastra-ai/mastra/commit/01be5d358fad8faa101e5c69dfa54562c02cc0af), [`24d9ee3`](https://github.com/mastra-ai/mastra/commit/24d9ee3db1c09d15f27a5d0971b102abcfcf7dfd), [`be49354`](https://github.com/mastra-ai/mastra/commit/be493546dca540101923ec700feb31f9a13939f2), [`d591ab3`](https://github.com/mastra-ai/mastra/commit/d591ab3ecc985c1870c0db347f8d7a20f7360536), [`ba82abe`](https://github.com/mastra-ai/mastra/commit/ba82abe76e869316bb5a9c95e8ea3946f3436fae), [`727f7e5`](https://github.com/mastra-ai/mastra/commit/727f7e5086e62e0dfe3356fb6dcd8bcb420af246), [`82d9f64`](https://github.com/mastra-ai/mastra/commit/82d9f647fbe4f0177320e7c05073fce88599aa95), [`4189486`](https://github.com/mastra-ai/mastra/commit/4189486c6718fda78347bdf4ce4d3fc33b2236e1), [`ca8ec2f`](https://github.com/mastra-ai/mastra/commit/ca8ec2f61884b9dfec5fc0d5f4f29d281ad13c01)]:
|
|
10
|
+
- @mastra/deployer@0.14.2-alpha.1
|
|
11
|
+
- @mastra/core@0.14.2-alpha.1
|
|
12
|
+
- @mastra/mcp@0.10.13-alpha.1
|
|
13
|
+
|
|
14
|
+
## 0.10.24-alpha.0
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [#6938](https://github.com/mastra-ai/mastra/pull/6938) [`0778757`](https://github.com/mastra-ai/mastra/commit/07787570e4addbd501522037bd2542c3d9e26822) Thanks [@dane-ai-mastra](https://github.com/apps/dane-ai-mastra)! - dependencies updates:
|
|
19
|
+
- Updated dependency [`@opentelemetry/auto-instrumentations-node@^0.62.1` ↗︎](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node/v/0.62.1) (from `^0.62.0`, in `dependencies`)
|
|
20
|
+
|
|
21
|
+
- [#6892](https://github.com/mastra-ai/mastra/pull/6892) [`f61b8c6`](https://github.com/mastra-ai/mastra/commit/f61b8c6b35ec96312d9bb52570578d4f0124467d) Thanks [@wardpeet](https://github.com/wardpeet)! - Improve playground build
|
|
22
|
+
|
|
23
|
+
- [#6948](https://github.com/mastra-ai/mastra/pull/6948) [`a8070e6`](https://github.com/mastra-ai/mastra/commit/a8070e63ab384ae14a214faaf8634c53b7064bc3) Thanks [@taofeeq-deru](https://github.com/taofeeq-deru)! - Preserve run state in workflows after viewing traces
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [[`0778757`](https://github.com/mastra-ai/mastra/commit/07787570e4addbd501522037bd2542c3d9e26822), [`e9a36bd`](https://github.com/mastra-ai/mastra/commit/e9a36bd03ed032528b60186a318f563ebf59c01a), [`e38f807`](https://github.com/mastra-ai/mastra/commit/e38f8072853cc803ba48394e1930825129708400), [`bf504a8`](https://github.com/mastra-ai/mastra/commit/bf504a833051f6f321d832cc7d631f3cb86d657b), [`e6f5046`](https://github.com/mastra-ai/mastra/commit/e6f50467aff317e67e8bd74c485c3fbe2a5a6db1), [`de24804`](https://github.com/mastra-ai/mastra/commit/de248044e79b407d211b339ce3ed4dc6e1630704), [`9613558`](https://github.com/mastra-ai/mastra/commit/9613558e6475f4710e05d1be7553a32ee7bddc20)]:
|
|
26
|
+
- @mastra/core@0.14.2-alpha.0
|
|
27
|
+
- @mastra/deployer@0.14.2-alpha.0
|
|
28
|
+
- @mastra/mcp@0.10.13-alpha.0
|
|
29
|
+
|
|
30
|
+
## 0.10.23
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Updated dependencies [[`6e7e120`](https://github.com/mastra-ai/mastra/commit/6e7e1207d6e8d8b838f9024f90bd10df1181ba27), [`4c8956f`](https://github.com/mastra-ai/mastra/commit/4c8956f3110ccf39595e022f127a44a0a5c09c86), [`0f00e17`](https://github.com/mastra-ai/mastra/commit/0f00e172953ccdccadb35ed3d70f5e4d89115869), [`217cd7a`](https://github.com/mastra-ai/mastra/commit/217cd7a4ce171e9a575c41bb8c83300f4db03236), [`a5a23d9`](https://github.com/mastra-ai/mastra/commit/a5a23d981920d458dc6078919992a5338931ef02)]:
|
|
35
|
+
- @mastra/core@0.14.1
|
|
36
|
+
- @mastra/deployer@0.14.1
|
|
37
|
+
|
|
3
38
|
## 0.10.23-alpha.0
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
|
@@ -263,40 +298,5 @@
|
|
|
263
298
|
- Updated dependencies [7b8172f]
|
|
264
299
|
- Updated dependencies [cb36de0]
|
|
265
300
|
- Updated dependencies [d0496e6]
|
|
266
|
-
- Updated dependencies [a82b851]
|
|
267
|
-
- Updated dependencies [ea0c5f2]
|
|
268
|
-
- Updated dependencies [41a0a0e]
|
|
269
|
-
- Updated dependencies [2871020]
|
|
270
|
-
- Updated dependencies [9e792ef]
|
|
271
|
-
- Updated dependencies [94f4812]
|
|
272
|
-
- Updated dependencies [e202b82]
|
|
273
|
-
- Updated dependencies [e00f6a0]
|
|
274
|
-
- Updated dependencies [4a406ec]
|
|
275
|
-
- Updated dependencies [b0e43c1]
|
|
276
|
-
- Updated dependencies [5d377e5]
|
|
277
|
-
- Updated dependencies [1fb812e]
|
|
278
|
-
- Updated dependencies [35c5798]
|
|
279
|
-
- @mastra/core@0.13.0
|
|
280
|
-
- @mastra/deployer@0.13.0
|
|
281
|
-
- @mastra/mcp@0.10.10
|
|
282
|
-
- @mastra/loggers@0.10.6
|
|
283
|
-
|
|
284
|
-
## 0.10.19-alpha.2
|
|
285
301
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
- 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
|
|
289
|
-
- Updated dependencies [cb36de0]
|
|
290
|
-
- Updated dependencies [cb36de0]
|
|
291
|
-
- Updated dependencies [a82b851]
|
|
292
|
-
- Updated dependencies [41a0a0e]
|
|
293
|
-
- Updated dependencies [2871020]
|
|
294
|
-
- Updated dependencies [4a406ec]
|
|
295
|
-
- Updated dependencies [5d377e5]
|
|
296
|
-
- @mastra/core@0.13.0-alpha.2
|
|
297
|
-
- @mastra/deployer@0.13.0-alpha.2
|
|
298
|
-
- @mastra/loggers@0.10.6-alpha.0
|
|
299
|
-
- @mastra/mcp@0.10.10-alpha.0
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
... 5040 more lines hidden. See full changelog in package directory.
|
|
302
|
+
... 5075 more lines hidden. See full changelog in package directory.
|
|
@@ -1113,10 +1113,10 @@ const step2 = createStep({
|
|
|
1113
1113
|
outputSchema: z.object({
|
|
1114
1114
|
result: z.string(),
|
|
1115
1115
|
}),
|
|
1116
|
-
execute: async ({ inputData, mastra,
|
|
1116
|
+
execute: async ({ inputData, mastra, tracingContext }) => {
|
|
1117
1117
|
const agent = mastra.getAgent('chefAgentResponses');
|
|
1118
1118
|
const response = await agent.generate(inputData.result, {
|
|
1119
|
-
|
|
1119
|
+
tracingContext,
|
|
1120
1120
|
});
|
|
1121
1121
|
return {
|
|
1122
1122
|
result: 'suh',
|
|
@@ -47,6 +47,31 @@ Deploy your Mastra applications to Digital Ocean's App Platform and Droplets.
|
|
|
47
47
|
### Configure Resource Settings and Environment Variables
|
|
48
48
|
|
|
49
49
|
- A Node.js build should be detected automatically.
|
|
50
|
+
- **Configure Build Command**: You need to add a custom build command for the app platform to build your Mastra project successfully. Set the build command based on your package manager:
|
|
51
|
+
|
|
52
|
+
<Tabs items={["npm", "pnpm", "yarn", "bun"]}>
|
|
53
|
+
<Tabs.Tab>
|
|
54
|
+
```
|
|
55
|
+
npm run build
|
|
56
|
+
```
|
|
57
|
+
</Tabs.Tab>
|
|
58
|
+
<Tabs.Tab>
|
|
59
|
+
```
|
|
60
|
+
pnpm build
|
|
61
|
+
```
|
|
62
|
+
</Tabs.Tab>
|
|
63
|
+
<Tabs.Tab>
|
|
64
|
+
```
|
|
65
|
+
yarn build
|
|
66
|
+
```
|
|
67
|
+
</Tabs.Tab>
|
|
68
|
+
<Tabs.Tab>
|
|
69
|
+
```
|
|
70
|
+
bun run build
|
|
71
|
+
```
|
|
72
|
+
</Tabs.Tab>
|
|
73
|
+
</Tabs>
|
|
74
|
+
|
|
50
75
|
- Add any required environment variables for your Mastra application. This includes API keys, database URLs, and other configuration values.
|
|
51
76
|
- You may choose to configure the size of your resource here.
|
|
52
77
|
- Other things you may optionally configure include, the region of your resource, the unique app name, and what project the resource belongs to.
|
|
@@ -416,7 +416,7 @@ Mastra automatically handles AI SDK v4 data using its internal `MessageList` cla
|
|
|
416
416
|
For cases where you need to manually convert messages between AI SDK and Mastra formats, use the `convertMessages` utility:
|
|
417
417
|
|
|
418
418
|
```typescript
|
|
419
|
-
import { convertMessages } from '@mastra/core';
|
|
419
|
+
import { convertMessages } from '@mastra/core/agent';
|
|
420
420
|
|
|
421
421
|
// Convert AI SDK v4 messages to v5
|
|
422
422
|
const aiv5Messages = convertMessages(aiv4Messages).to('AIV5.UI');
|
|
@@ -54,6 +54,12 @@ export const mastraClient = new MastraClient({
|
|
|
54
54
|
description: "An object containing custom HTTP headers to include with every request.",
|
|
55
55
|
isOptional: true,
|
|
56
56
|
},
|
|
57
|
+
{
|
|
58
|
+
name: "credentials",
|
|
59
|
+
type: '"omit" | "same-origin" | "include"',
|
|
60
|
+
description: "Credentials mode for requests. See https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials for more info.",
|
|
61
|
+
isOptional: true,
|
|
62
|
+
},
|
|
57
63
|
]}
|
|
58
64
|
/>
|
|
59
65
|
|
|
@@ -79,7 +79,7 @@ This function returns a scorer builder that you can chain step methods onto. See
|
|
|
79
79
|
For better type inference and IntelliSense support, you can specify input/output types when creating scorers:
|
|
80
80
|
|
|
81
81
|
```typescript
|
|
82
|
-
import { createScorer, ScorerRunInputForAgent, ScorerRunOutputForAgent } from '@mastra/core';
|
|
82
|
+
import { createScorer, ScorerRunInputForAgent, ScorerRunOutputForAgent } from '@mastra/core/scorers';
|
|
83
83
|
|
|
84
84
|
// For agent evaluation with full type safety
|
|
85
85
|
const agentScorer = createScorer<ScorerRunInputForAgent, ScorerRunOutputForAgent>({
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Tool Call Accuracy | Scorers | Mastra Docs"
|
|
3
|
+
description: Documentation for the Tool Call Accuracy Scorers in Mastra, which evaluate whether LLM outputs call the correct tools from available options.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tool Call Accuracy Scorers
|
|
7
|
+
|
|
8
|
+
Mastra provides two tool call accuracy scorers for evaluating whether an LLM selects the correct tools from available options:
|
|
9
|
+
|
|
10
|
+
1. **Code-based scorer** - Deterministic evaluation using exact tool matching
|
|
11
|
+
2. **LLM-based scorer** - Semantic evaluation using AI to assess appropriateness
|
|
12
|
+
|
|
13
|
+
For usage examples, see the [Tool Call Accuracy Examples](/examples/scorers/tool-call-accuracy).
|
|
14
|
+
|
|
15
|
+
## Code-Based Tool Call Accuracy Scorer
|
|
16
|
+
|
|
17
|
+
The `createToolCallAccuracyScorerCode()` function from `@mastra/evals/scorers/code` provides deterministic binary scoring based on exact tool matching and supports both strict and lenient evaluation modes, as well as tool calling order validation.
|
|
18
|
+
|
|
19
|
+
### Parameters
|
|
20
|
+
|
|
21
|
+
<PropertiesTable
|
|
22
|
+
content={[
|
|
23
|
+
{
|
|
24
|
+
name: "expectedTool",
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "The name of the tool that should be called for the given task. Ignored when expectedToolOrder is provided.",
|
|
27
|
+
required: false,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "strictMode",
|
|
31
|
+
type: "boolean",
|
|
32
|
+
description: "Controls evaluation strictness. For single tool mode: only exact single tool calls accepted. For order checking mode: tools must match exactly with no extra tools allowed.",
|
|
33
|
+
required: false,
|
|
34
|
+
default: "false",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "expectedToolOrder",
|
|
38
|
+
type: "string[]",
|
|
39
|
+
description: "Array of tool names in the expected calling order. When provided, enables order checking mode and ignores expectedTool parameter.",
|
|
40
|
+
required: false,
|
|
41
|
+
},
|
|
42
|
+
]}
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
This function returns an instance of the MastraScorer class. See the [MastraScorer reference](./mastra-scorer) for details on the `.run()` method and its input/output.
|
|
46
|
+
|
|
47
|
+
### Evaluation Modes
|
|
48
|
+
|
|
49
|
+
The code-based scorer operates in two distinct modes:
|
|
50
|
+
|
|
51
|
+
#### Single Tool Mode
|
|
52
|
+
|
|
53
|
+
When `expectedToolOrder` is not provided, the scorer evaluates single tool selection:
|
|
54
|
+
|
|
55
|
+
- **Standard Mode (strictMode: false)**: Returns `1` if the expected tool is called, regardless of other tools
|
|
56
|
+
- **Strict Mode (strictMode: true)**: Returns `1` only if exactly one tool is called and it matches the expected tool
|
|
57
|
+
|
|
58
|
+
#### Order Checking Mode
|
|
59
|
+
|
|
60
|
+
When `expectedToolOrder` is provided, the scorer validates tool calling sequence:
|
|
61
|
+
|
|
62
|
+
- **Strict Order (strictMode: true)**: Tools must be called in exactly the specified order with no extra tools
|
|
63
|
+
- **Flexible Order (strictMode: false)**: Expected tools must appear in correct relative order (extra tools allowed)
|
|
64
|
+
|
|
65
|
+
### Examples
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
import { createToolCallAccuracyScorerCode } from '@mastra/evals/scorers/code';
|
|
69
|
+
|
|
70
|
+
// Single tool validation
|
|
71
|
+
const scorer = createToolCallAccuracyScorerCode({
|
|
72
|
+
expectedTool: 'weather-tool'
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// Strict single tool (no other tools allowed)
|
|
76
|
+
const strictScorer = createToolCallAccuracyScorerCode({
|
|
77
|
+
expectedTool: 'calculator-tool',
|
|
78
|
+
strictMode: true
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
// Tool order validation
|
|
82
|
+
const orderScorer = createToolCallAccuracyScorerCode({
|
|
83
|
+
expectedTool: 'search-tool', // ignored when order is specified
|
|
84
|
+
expectedToolOrder: ['search-tool', 'weather-tool'],
|
|
85
|
+
strictMode: true // exact match required
|
|
86
|
+
});
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## LLM-Based Tool Call Accuracy Scorer
|
|
90
|
+
|
|
91
|
+
The `createToolCallAccuracyScorerLLM()` function from `@mastra/evals/scorers/llm` uses an LLM to evaluate whether the tools called by an agent are appropriate for the given user request, providing semantic evaluation rather than exact matching.
|
|
92
|
+
|
|
93
|
+
### Parameters
|
|
94
|
+
|
|
95
|
+
<PropertiesTable
|
|
96
|
+
content={[
|
|
97
|
+
{
|
|
98
|
+
name: "model",
|
|
99
|
+
type: "MastraLanguageModel",
|
|
100
|
+
description: "The LLM model to use for evaluating tool appropriateness",
|
|
101
|
+
required: true,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "availableTools",
|
|
105
|
+
type: "Array<{name: string, description: string}>",
|
|
106
|
+
description: "List of available tools with their descriptions for context",
|
|
107
|
+
required: true,
|
|
108
|
+
},
|
|
109
|
+
]}
|
|
110
|
+
/>
|
|
111
|
+
|
|
112
|
+
### Features
|
|
113
|
+
|
|
114
|
+
The LLM-based scorer provides:
|
|
115
|
+
|
|
116
|
+
- **Semantic Evaluation**: Understands context and user intent
|
|
117
|
+
- **Appropriateness Assessment**: Distinguishes between "helpful" and "appropriate" tools
|
|
118
|
+
- **Clarification Handling**: Recognizes when agents appropriately ask for clarification
|
|
119
|
+
- **Missing Tool Detection**: Identifies tools that should have been called
|
|
120
|
+
- **Reasoning Generation**: Provides explanations for scoring decisions
|
|
121
|
+
|
|
122
|
+
### Evaluation Process
|
|
123
|
+
|
|
124
|
+
1. **Extract Tool Calls**: Identifies tools mentioned in agent output
|
|
125
|
+
2. **Analyze Appropriateness**: Evaluates each tool against user request
|
|
126
|
+
3. **Generate Score**: Calculates score based on appropriate vs total tool calls
|
|
127
|
+
4. **Generate Reasoning**: Provides human-readable explanation
|
|
128
|
+
|
|
129
|
+
### Examples
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
import { createToolCallAccuracyScorerLLM } from '@mastra/evals/scorers/llm';
|
|
133
|
+
import { openai } from '@ai-sdk/openai';
|
|
134
|
+
|
|
135
|
+
const llmScorer = createToolCallAccuracyScorerLLM({
|
|
136
|
+
model: openai('gpt-4o-mini'),
|
|
137
|
+
availableTools: [
|
|
138
|
+
{
|
|
139
|
+
name: 'weather-tool',
|
|
140
|
+
description: 'Get current weather information for any location'
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'search-tool',
|
|
144
|
+
description: 'Search the web for information'
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: 'calendar-tool',
|
|
148
|
+
description: 'Check calendar events and scheduling'
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
const result = await llmScorer.run(agentRun);
|
|
154
|
+
console.log(result.score); // 0.0 to 1.0
|
|
155
|
+
console.log(result.reason); // Explanation of the score
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Choosing Between Scorers
|
|
159
|
+
|
|
160
|
+
### Use the Code-Based Scorer When:
|
|
161
|
+
|
|
162
|
+
- You need **deterministic, reproducible** results
|
|
163
|
+
- You want to test **exact tool matching**
|
|
164
|
+
- You need to validate **specific tool sequences**
|
|
165
|
+
- Speed and cost are priorities (no LLM calls)
|
|
166
|
+
- You're running automated tests
|
|
167
|
+
|
|
168
|
+
### Use the LLM-Based Scorer When:
|
|
169
|
+
|
|
170
|
+
- You need **semantic understanding** of appropriateness
|
|
171
|
+
- Tool selection depends on **context and intent**
|
|
172
|
+
- You want to handle **edge cases** like clarification requests
|
|
173
|
+
- You need **explanations** for scoring decisions
|
|
174
|
+
- You're evaluating **production agent behavior**
|
|
175
|
+
|
|
176
|
+
## Scoring Details
|
|
177
|
+
|
|
178
|
+
### Code-Based Scoring
|
|
179
|
+
|
|
180
|
+
- **Binary scores**: Always returns 0 or 1
|
|
181
|
+
- **Deterministic**: Same input always produces same output
|
|
182
|
+
- **Fast**: No external API calls
|
|
183
|
+
|
|
184
|
+
### LLM-Based Scoring
|
|
185
|
+
|
|
186
|
+
- **Fractional scores**: Returns values between 0.0 and 1.0
|
|
187
|
+
- **Context-aware**: Considers user intent and appropriateness
|
|
188
|
+
- **Explanatory**: Provides reasoning for scores
|
|
189
|
+
|
|
190
|
+
## Use Cases
|
|
191
|
+
|
|
192
|
+
### Code-Based Scorer Use Cases
|
|
193
|
+
|
|
194
|
+
- **Unit Testing**: Verify specific tool selection behavior
|
|
195
|
+
- **Regression Testing**: Ensure tool selection doesn't change
|
|
196
|
+
- **Workflow Validation**: Check tool sequences in multi-step processes
|
|
197
|
+
- **CI/CD Pipelines**: Fast, deterministic validation
|
|
198
|
+
|
|
199
|
+
### LLM-Based Scorer Use Cases
|
|
200
|
+
|
|
201
|
+
- **Quality Assurance**: Evaluate production agent behavior
|
|
202
|
+
- **A/B Testing**: Compare different agent implementations
|
|
203
|
+
- **User Intent Alignment**: Ensure tools match user needs
|
|
204
|
+
- **Edge Case Handling**: Evaluate clarification and error scenarios
|
|
205
|
+
|
|
206
|
+
## Related
|
|
207
|
+
|
|
208
|
+
- [Answer Relevancy Scorer](./answer-relevancy)
|
|
209
|
+
- [Completeness Scorer](./completeness)
|
|
210
|
+
- [Faithfulness Scorer](./faithfulness)
|
|
211
|
+
- [Custom Scorers](/docs/scorers/custom-scorers)
|
|
@@ -19,6 +19,7 @@ These scorers evaluate how correct, truthful, and complete your agent's answers
|
|
|
19
19
|
- [`completeness`](/reference/scorers/completeness): Checks if responses include all necessary information (`0-1`, higher is better)
|
|
20
20
|
- [`content-similarity`](/reference/scorers/content-similarity): Measures textual similarity using character-level matching (`0-1`, higher is better)
|
|
21
21
|
- [`textual-difference`](/reference/scorers/textual-difference): Measures textual differences between strings (`0-1`, higher means more similar)
|
|
22
|
+
- [`tool-call-accuracy`](/reference/scorers/tool-call-accuracy): Evaluates whether the LLM selects the correct tool from available options (`0-1`, higher is better)
|
|
22
23
|
|
|
23
24
|
### Output Quality
|
|
24
25
|
|
|
@@ -341,7 +341,7 @@ When a tool includes an `outputSchema`, its `execute` function **must** return a
|
|
|
341
341
|
Here's an example of a tool with an `outputSchema`:
|
|
342
342
|
|
|
343
343
|
```typescript filename="src/tools/structured-tool.ts"
|
|
344
|
-
import { createTool } from '@mastra/core';
|
|
344
|
+
import { createTool } from '@mastra/core/tools';
|
|
345
345
|
import { z } from 'zod';
|
|
346
346
|
|
|
347
347
|
export const structuredTool = createTool({
|
|
@@ -55,6 +55,8 @@ This executes `step1` and `step2` concurrently, then continues to `step3` after
|
|
|
55
55
|
|
|
56
56
|
> See [Parallel Execution with Steps](/examples/workflows/parallel-steps) for more information.
|
|
57
57
|
|
|
58
|
+
> 📹 Watch: How to run steps in parallel and optimize your Mastra workflow → [YouTube (3 minutes)](https://youtu.be/pTSOSWbreE0)
|
|
59
|
+
|
|
58
60
|
## Conditional logic with `.branch()`
|
|
59
61
|
|
|
60
62
|
Execute steps conditionally using `.branch()`:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.14-alpha.1",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"author": "",
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
27
|
+
"@modelcontextprotocol/sdk": "^1.17.3",
|
|
28
28
|
"date-fns": "^4.1.0",
|
|
29
29
|
"exit-hook": "^4.0.0",
|
|
30
30
|
"jsdom": "^26.1.0",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"uuid": "^11.1.0",
|
|
33
33
|
"zod": "^3.25.67",
|
|
34
34
|
"zod-to-json-schema": "^3.24.5",
|
|
35
|
-
"@mastra/core": "0.14.1",
|
|
36
|
-
"@mastra/mcp": "^0.10.
|
|
35
|
+
"@mastra/core": "0.14.2-alpha.1",
|
|
36
|
+
"@mastra/mcp": "^0.10.13-alpha.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@hono/node-server": "^1.17.1",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"tsx": "^4.19.4",
|
|
49
49
|
"typescript": "^5.8.3",
|
|
50
50
|
"vitest": "^3.2.4",
|
|
51
|
-
"@mastra/core": "0.14.1",
|
|
51
|
+
"@mastra/core": "0.14.2-alpha.1",
|
|
52
52
|
"@internal/lint": "0.0.31"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|