ai 4.3.4 → 4.3.5

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/dist/index.mjs CHANGED
@@ -7473,6 +7473,7 @@ var MCPClient = class {
7473
7473
  async tools({
7474
7474
  schemas = "automatic"
7475
7475
  } = {}) {
7476
+ var _a17;
7476
7477
  const tools = {};
7477
7478
  try {
7478
7479
  const listToolsResult = await this.listTools();
@@ -7480,14 +7481,18 @@ var MCPClient = class {
7480
7481
  if (schemas !== "automatic" && !(name17 in schemas)) {
7481
7482
  continue;
7482
7483
  }
7483
- const parameters = schemas === "automatic" ? jsonSchema(inputSchema) : schemas[name17].parameters;
7484
+ const parameters = schemas === "automatic" ? jsonSchema({
7485
+ ...inputSchema,
7486
+ properties: (_a17 = inputSchema.properties) != null ? _a17 : {},
7487
+ additionalProperties: false
7488
+ }) : schemas[name17].parameters;
7484
7489
  const self = this;
7485
7490
  const toolWithExecute = tool({
7486
7491
  description,
7487
7492
  parameters,
7488
7493
  execute: async (args, options) => {
7489
- var _a17;
7490
- (_a17 = options == null ? void 0 : options.abortSignal) == null ? void 0 : _a17.throwIfAborted();
7494
+ var _a18;
7495
+ (_a18 = options == null ? void 0 : options.abortSignal) == null ? void 0 : _a18.throwIfAborted();
7491
7496
  return self.callTool({
7492
7497
  name: name17,
7493
7498
  args,