@ai-sdk/mcp 1.0.0-beta.25 → 1.0.0-beta.27

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
@@ -47,6 +47,7 @@ var SUPPORTED_PROTOCOL_VERSIONS = [
47
47
  "2025-03-26",
48
48
  "2024-11-05"
49
49
  ];
50
+ var ToolMetaSchema = z.optional(z.record(z.string(), z.unknown()));
50
51
  var ClientOrServerImplementationSchema = z.looseObject({
51
52
  name: z.string(),
52
53
  version: z.string()
@@ -106,7 +107,8 @@ var ToolSchema = z.object({
106
107
  z.object({
107
108
  title: z.optional(z.string())
108
109
  }).loose()
109
- )
110
+ ),
111
+ _meta: ToolMetaSchema
110
112
  }).loose();
111
113
  var ListToolsResultSchema = PaginatedResultSchema.extend({
112
114
  tools: z.array(ToolSchema)
@@ -1838,7 +1840,8 @@ var DefaultMCPClient = class {
1838
1840
  name: name3,
1839
1841
  description,
1840
1842
  inputSchema,
1841
- annotations
1843
+ annotations,
1844
+ _meta
1842
1845
  } of listToolsResult.tools) {
1843
1846
  const title = annotations == null ? void 0 : annotations.title;
1844
1847
  if (schemas !== "automatic" && !(name3 in schemas)) {
@@ -1865,7 +1868,7 @@ var DefaultMCPClient = class {
1865
1868
  inputSchema: schemas[name3].inputSchema,
1866
1869
  execute
1867
1870
  });
1868
- tools[name3] = toolWithExecute;
1871
+ tools[name3] = { ...toolWithExecute, _meta };
1869
1872
  }
1870
1873
  return tools;
1871
1874
  } catch (error) {