@ai-sdk/mcp 1.0.0-beta.0 → 1.0.0-beta.2

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,19 @@
1
1
  # @ai-sdk/mcp
2
2
 
3
+ ## 1.0.0-beta.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [58920e0]
8
+ - @ai-sdk/provider-utils@4.0.0-beta.22
9
+
10
+ ## 1.0.0-beta.1
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [293a6b7]
15
+ - @ai-sdk/provider-utils@4.0.0-beta.21
16
+
3
17
  ## 1.0.0-beta.0
4
18
 
5
19
  ### Major Changes
package/dist/index.js CHANGED
@@ -124,7 +124,12 @@ var ToolSchema = import_v4.z.object({
124
124
  inputSchema: import_v4.z.object({
125
125
  type: import_v4.z.literal("object"),
126
126
  properties: import_v4.z.optional(import_v4.z.object({}).loose())
127
- }).loose()
127
+ }).loose(),
128
+ annotations: import_v4.z.optional(
129
+ import_v4.z.object({
130
+ title: import_v4.z.optional(import_v4.z.string())
131
+ }).loose()
132
+ )
128
133
  }).loose();
129
134
  var ListToolsResultSchema = PaginatedResultSchema.extend({
130
135
  tools: import_v4.z.array(ToolSchema)
@@ -1678,7 +1683,13 @@ var DefaultMCPClient = class {
1678
1683
  const tools = {};
1679
1684
  try {
1680
1685
  const listToolsResult = await this.listTools();
1681
- for (const { name: name3, description, inputSchema } of listToolsResult.tools) {
1686
+ for (const {
1687
+ name: name3,
1688
+ description,
1689
+ inputSchema,
1690
+ annotations
1691
+ } of listToolsResult.tools) {
1692
+ const title = annotations == null ? void 0 : annotations.title;
1682
1693
  if (schemas !== "automatic" && !(name3 in schemas)) {
1683
1694
  continue;
1684
1695
  }
@@ -1690,6 +1701,7 @@ var DefaultMCPClient = class {
1690
1701
  };
1691
1702
  const toolWithExecute = schemas === "automatic" ? (0, import_provider_utils3.dynamicTool)({
1692
1703
  description,
1704
+ title,
1693
1705
  inputSchema: (0, import_provider_utils3.jsonSchema)({
1694
1706
  ...inputSchema,
1695
1707
  properties: (_a3 = inputSchema.properties) != null ? _a3 : {},
@@ -1698,6 +1710,7 @@ var DefaultMCPClient = class {
1698
1710
  execute
1699
1711
  }) : (0, import_provider_utils3.tool)({
1700
1712
  description,
1713
+ title,
1701
1714
  inputSchema: schemas[name3].inputSchema,
1702
1715
  execute
1703
1716
  });