@mastra/client-js 1.18.0-alpha.16 → 1.18.0-alpha.18

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 1.18.0-alpha.18
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`4999667`](https://github.com/mastra-ai/mastra/commit/49996678b68356cad7f088430009690406c50fbd)]:
8
+ - @mastra/core@1.33.0-alpha.17
9
+
10
+ ## 1.18.0-alpha.17
11
+
12
+ ### Patch Changes
13
+
14
+ - Fix `MCPTool.execute` sending an empty/undefined request body when called without `data` or `requestContext`. The server's tool-execute endpoint expects an object body (with optional `data`), so calls like `client.getMcpServerTool(serverId, toolId).execute({})` would fail with `Invalid request body`. The SDK now always POSTs a JSON object body, defaulting to `{}` when no parameters are provided. ([#16488](https://github.com/mastra-ai/mastra/pull/16488))
15
+
16
+ - Removed Agent Builder routes from the default generated API route contracts. ([#16499](https://github.com/mastra-ai/mastra/pull/16499))
17
+
18
+ - Updated dependencies [[`cc189cc`](https://github.com/mastra-ai/mastra/commit/cc189cc0128eb7af233476b5e421ec6888bffde7)]:
19
+ - @mastra/core@1.33.0-alpha.16
20
+
3
21
  ## 1.18.0-alpha.16
4
22
 
5
23
  ### Patch Changes
@@ -3,7 +3,7 @@ name: mastra-client-js
3
3
  description: Documentation for @mastra/client-js. Use when working with @mastra/client-js APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/client-js"
6
- version: "1.18.0-alpha.16"
6
+ version: "1.18.0-alpha.18"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.18.0-alpha.16",
2
+ "version": "1.18.0-alpha.18",
3
3
  "package": "@mastra/client-js",
4
4
  "exports": {
5
5
  "RequestContext": {
package/dist/index.cjs CHANGED
@@ -3247,12 +3247,10 @@ var MCPTool = class extends BaseResource {
3247
3247
  execute(params) {
3248
3248
  const body = {};
3249
3249
  if (params.data !== void 0) body.data = params.data;
3250
- if (params.requestContext !== void 0) {
3251
- body.requestContext = params.requestContext;
3252
- }
3250
+ if (params.requestContext !== void 0) body.requestContext = params.requestContext;
3253
3251
  return this.request(`/mcp/${encodeURIComponent(this.serverId)}/tools/${encodeURIComponent(this.toolId)}/execute`, {
3254
3252
  method: "POST",
3255
- body: Object.keys(body).length > 0 ? body : void 0
3253
+ body
3256
3254
  });
3257
3255
  }
3258
3256
  };