@assistant-ui/mcp-docs-server 0.1.1 → 0.1.3

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.
@@ -1012,25 +1012,25 @@ export default nextConfig;
1012
1012
  "ai": "^4.3.16",
1013
1013
  "class-variance-authority": "^0.7.1",
1014
1014
  "clsx": "^2.1.1",
1015
- "lucide-react": "^0.511.0",
1015
+ "lucide-react": "^0.515.0",
1016
1016
  "next": "15.3.3",
1017
1017
  "ollama-ai-provider": "^1.2.0",
1018
1018
  "react": "19.1.0",
1019
1019
  "react-dom": "19.1.0",
1020
1020
  "remark-gfm": "^4.0.1",
1021
- "tailwind-merge": "^3.3.0",
1022
- "tw-animate-css": "^1.3.3",
1023
- "zod": "^3.25.49"
1021
+ "tailwind-merge": "^3.3.1",
1022
+ "tw-animate-css": "^1.3.4",
1023
+ "zod": "^3.25.64"
1024
1024
  },
1025
1025
  "devDependencies": {
1026
1026
  "@assistant-ui/x-buildutils": "workspace:*",
1027
- "@types/node": "^22",
1027
+ "@types/node": "^24",
1028
1028
  "@types/react": "^19",
1029
1029
  "@types/react-dom": "^19",
1030
1030
  "eslint": "^9",
1031
1031
  "eslint-config-next": "15.3.3",
1032
1032
  "postcss": "^8",
1033
- "tailwindcss": "^4.1.8",
1033
+ "tailwindcss": "^4.1.10",
1034
1034
  "typescript": "^5"
1035
1035
  }
1036
1036
  }
@@ -1585,24 +1585,24 @@ export default nextConfig;
1585
1585
  "clsx": "^2.1.1",
1586
1586
  "embla-carousel-autoplay": "^8.6.0",
1587
1587
  "embla-carousel-react": "^8.6.0",
1588
- "lucide-react": "^0.511.0",
1588
+ "lucide-react": "^0.515.0",
1589
1589
  "nanoid": "5.1.5",
1590
1590
  "next": "15.3.3",
1591
1591
  "react": "19.1.0",
1592
1592
  "react-dom": "19.1.0",
1593
- "tailwind-merge": "^3.3.0",
1594
- "tw-animate-css": "^1.3.3",
1595
- "zod": "^3.25.49"
1593
+ "tailwind-merge": "^3.3.1",
1594
+ "tw-animate-css": "^1.3.4",
1595
+ "zod": "^3.25.64"
1596
1596
  },
1597
1597
  "devDependencies": {
1598
1598
  "@assistant-ui/x-buildutils": "workspace:*",
1599
- "@types/node": "^22.15.29",
1600
- "@types/react": "^19.1.6",
1601
- "@types/react-dom": "^19.1.5",
1599
+ "@types/node": "^24.0.1",
1600
+ "@types/react": "^19.1.8",
1601
+ "@types/react-dom": "^19.1.6",
1602
1602
  "eslint": "^9",
1603
1603
  "eslint-config-next": "15.3.3",
1604
- "postcss": "^8.5.4",
1605
- "tailwindcss": "^4.1.8",
1604
+ "postcss": "^8.5.5",
1605
+ "tailwindcss": "^4.1.10",
1606
1606
  "typescript": "^5.8.3"
1607
1607
  }
1608
1608
  }
@@ -1024,24 +1024,24 @@ export default nextConfig;
1024
1024
  "ai": "^4.3.16",
1025
1025
  "class-variance-authority": "^0.7.1",
1026
1026
  "clsx": "^2.1.1",
1027
- "lucide-react": "^0.511.0",
1027
+ "lucide-react": "^0.515.0",
1028
1028
  "next": "15.3.3",
1029
1029
  "react": "19.1.0",
1030
1030
  "react-dom": "19.1.0",
1031
1031
  "remark-gfm": "^4.0.1",
1032
- "tailwind-merge": "^3.3.0",
1033
- "tw-animate-css": "^1.3.3",
1034
- "zod": "^3.25.49"
1032
+ "tailwind-merge": "^3.3.1",
1033
+ "tw-animate-css": "^1.3.4",
1034
+ "zod": "^3.25.64"
1035
1035
  },
1036
1036
  "devDependencies": {
1037
1037
  "@assistant-ui/x-buildutils": "workspace:*",
1038
- "@types/node": "^22",
1038
+ "@types/node": "^24",
1039
1039
  "@types/react": "^19",
1040
1040
  "@types/react-dom": "^19",
1041
1041
  "eslint": "^9",
1042
1042
  "eslint-config-next": "15.3.3",
1043
1043
  "postcss": "^8",
1044
- "tailwindcss": "^4.1.8",
1044
+ "tailwindcss": "^4.1.10",
1045
1045
  "typescript": "^5"
1046
1046
  }
1047
1047
  }
@@ -1106,25 +1106,25 @@ export default nextConfig;
1106
1106
  "class-variance-authority": "^0.7.1",
1107
1107
  "clsx": "^2.1.1",
1108
1108
  "jsonwebtoken": "^9.0.2",
1109
- "lucide-react": "^0.511.0",
1109
+ "lucide-react": "^0.515.0",
1110
1110
  "nanoid": "5.1.5",
1111
1111
  "next": "15.3.3",
1112
1112
  "react": "19.1.0",
1113
1113
  "react-dom": "19.1.0",
1114
1114
  "remark-gfm": "^4.0.1",
1115
- "tailwind-merge": "^3.3.0",
1116
- "tw-animate-css": "^1.3.3"
1115
+ "tailwind-merge": "^3.3.1",
1116
+ "tw-animate-css": "^1.3.4"
1117
1117
  },
1118
1118
  "devDependencies": {
1119
1119
  "@assistant-ui/x-buildutils": "workspace:*",
1120
1120
  "@types/jsonwebtoken": "^9.0.9",
1121
- "@types/node": "^22",
1121
+ "@types/node": "^24",
1122
1122
  "@types/react": "^19",
1123
1123
  "@types/react-dom": "^19",
1124
1124
  "eslint": "^9",
1125
1125
  "eslint-config-next": "15.3.3",
1126
1126
  "postcss": "^8",
1127
- "tailwindcss": "^4.1.8",
1127
+ "tailwindcss": "^4.1.10",
1128
1128
  "typescript": "^5"
1129
1129
  }
1130
1130
  }
@@ -1008,23 +1008,23 @@ export default nextConfig;
1008
1008
  "@radix-ui/react-tooltip": "^1.2.7",
1009
1009
  "class-variance-authority": "^0.7.1",
1010
1010
  "clsx": "^2.1.1",
1011
- "lucide-react": "^0.511.0",
1011
+ "lucide-react": "^0.515.0",
1012
1012
  "next": "15.3.3",
1013
1013
  "react": "19.1.0",
1014
1014
  "react-dom": "19.1.0",
1015
1015
  "remark-gfm": "^4.0.1",
1016
- "tailwind-merge": "^3.3.0",
1017
- "tw-animate-css": "^1.3.3"
1016
+ "tailwind-merge": "^3.3.1",
1017
+ "tw-animate-css": "^1.3.4"
1018
1018
  },
1019
1019
  "devDependencies": {
1020
1020
  "@assistant-ui/x-buildutils": "workspace:*",
1021
- "@types/node": "^22",
1021
+ "@types/node": "^24",
1022
1022
  "@types/react": "^19",
1023
1023
  "@types/react-dom": "^19",
1024
1024
  "eslint": "^9",
1025
1025
  "eslint-config-next": "15.3.3",
1026
1026
  "postcss": "^8",
1027
- "tailwindcss": "^4.1.8",
1027
+ "tailwindcss": "^4.1.10",
1028
1028
  "typescript": "^5"
1029
1029
  }
1030
1030
  }
@@ -1232,7 +1232,7 @@ export default nextConfig;
1232
1232
  "@assistant-ui/react-markdown": "workspace:*",
1233
1233
  "@ffmpeg/ffmpeg": "^0.12.15",
1234
1234
  "@ffmpeg/util": "^0.12.2",
1235
- "@hookform/resolvers": "^5.0.1",
1235
+ "@hookform/resolvers": "^5.1.1",
1236
1236
  "@radix-ui/react-avatar": "^1.1.10",
1237
1237
  "@radix-ui/react-icons": "^1.3.2",
1238
1238
  "@radix-ui/react-label": "^2.1.7",
@@ -1244,28 +1244,28 @@ export default nextConfig;
1244
1244
  "class-variance-authority": "^0.7.1",
1245
1245
  "clsx": "^2.1.1",
1246
1246
  "json-schema-to-zod": "^2.6.1",
1247
- "lucide-react": "^0.511.0",
1247
+ "lucide-react": "^0.515.0",
1248
1248
  "next": "15.3.3",
1249
1249
  "react": "19.1.0",
1250
1250
  "react-dom": "19.1.0",
1251
- "react-hook-form": "^7.57.0",
1252
- "react-resizable-panels": "^3.0.2",
1251
+ "react-hook-form": "^7.58.0",
1252
+ "react-resizable-panels": "^3.0.3",
1253
1253
  "remark-gfm": "^4.0.1",
1254
- "tailwind-merge": "^3.3.0",
1255
- "tw-animate-css": "^1.3.3",
1256
- "zod": "^3.25.49",
1254
+ "tailwind-merge": "^3.3.1",
1255
+ "tw-animate-css": "^1.3.4",
1256
+ "zod": "^3.25.64",
1257
1257
  "zod-to-json-schema": "^3.24.5",
1258
1258
  "zustand": "^5.0.5"
1259
1259
  },
1260
1260
  "devDependencies": {
1261
1261
  "@assistant-ui/x-buildutils": "workspace:*",
1262
- "@types/node": "^22",
1262
+ "@types/node": "^24",
1263
1263
  "@types/react": "^19",
1264
1264
  "@types/react-dom": "^19",
1265
1265
  "eslint": "^9",
1266
1266
  "eslint-config-next": "15.3.3",
1267
1267
  "postcss": "^8",
1268
- "tailwindcss": "^4.1.8",
1268
+ "tailwindcss": "^4.1.10",
1269
1269
  "typescript": "^5.8.3"
1270
1270
  }
1271
1271
  }
@@ -1727,33 +1727,33 @@ export default nextConfig;
1727
1727
  "@assistant-ui/react": "workspace:*",
1728
1728
  "@assistant-ui/react-langgraph": "workspace:*",
1729
1729
  "@assistant-ui/react-markdown": "workspace:*",
1730
- "@langchain/langgraph-sdk": "^0.0.81",
1730
+ "@langchain/langgraph-sdk": "^0.0.84",
1731
1731
  "@radix-ui/react-slot": "^1.2.3",
1732
1732
  "@radix-ui/react-tooltip": "^1.2.7",
1733
1733
  "class-variance-authority": "^0.7.1",
1734
1734
  "clsx": "^2.1.1",
1735
1735
  "js-cookie": "^3.0.5",
1736
1736
  "jsonwebtoken": "^9.0.2",
1737
- "lucide-react": "^0.511.0",
1737
+ "lucide-react": "^0.515.0",
1738
1738
  "nanoid": "5.1.5",
1739
1739
  "next": "15.3.3",
1740
1740
  "react": "19.1.0",
1741
1741
  "react-dom": "19.1.0",
1742
1742
  "remark-gfm": "^4.0.1",
1743
- "tailwind-merge": "^3.3.0",
1744
- "tw-animate-css": "^1.3.3"
1743
+ "tailwind-merge": "^3.3.1",
1744
+ "tw-animate-css": "^1.3.4"
1745
1745
  },
1746
1746
  "devDependencies": {
1747
1747
  "@assistant-ui/x-buildutils": "workspace:*",
1748
1748
  "@types/js-cookie": "^3.0.6",
1749
1749
  "@types/jsonwebtoken": "^9.0.9",
1750
- "@types/node": "^22",
1750
+ "@types/node": "^24",
1751
1751
  "@types/react": "^19",
1752
1752
  "@types/react-dom": "^19",
1753
1753
  "eslint": "^9",
1754
1754
  "eslint-config-next": "15.3.3",
1755
1755
  "postcss": "^8",
1756
- "tailwindcss": "^4.1.8",
1756
+ "tailwindcss": "^4.1.10",
1757
1757
  "typescript": "^5.8.3"
1758
1758
  }
1759
1759
  }
@@ -1118,24 +1118,24 @@ export default nextConfig;
1118
1118
  "ai": "^4.3.16",
1119
1119
  "class-variance-authority": "^0.7.1",
1120
1120
  "clsx": "^2.1.1",
1121
- "lucide-react": "^0.511.0",
1121
+ "lucide-react": "^0.515.0",
1122
1122
  "next": "15.3.3",
1123
- "openai": "^5.0.2",
1123
+ "openai": "^5.3.0",
1124
1124
  "react": "19.1.0",
1125
1125
  "react-dom": "19.1.0",
1126
1126
  "remark-gfm": "^4.0.1",
1127
- "tailwind-merge": "^3.3.0",
1128
- "tw-animate-css": "^1.3.3"
1127
+ "tailwind-merge": "^3.3.1",
1128
+ "tw-animate-css": "^1.3.4"
1129
1129
  },
1130
1130
  "devDependencies": {
1131
1131
  "@assistant-ui/x-buildutils": "workspace:*",
1132
- "@types/node": "^22",
1132
+ "@types/node": "^24",
1133
1133
  "@types/react": "^19",
1134
1134
  "@types/react-dom": "^19",
1135
1135
  "eslint": "^9",
1136
1136
  "eslint-config-next": "15.3.3",
1137
1137
  "postcss": "^8",
1138
- "tailwindcss": "^4.1.8",
1138
+ "tailwindcss": "^4.1.10",
1139
1139
  "typescript": "^5"
1140
1140
  }
1141
1141
  }
@@ -1654,7 +1654,7 @@ export default nextConfig;
1654
1654
  "@assistant-ui/react-ai-sdk": "workspace:*",
1655
1655
  "@assistant-ui/react-hook-form": "workspace:*",
1656
1656
  "@assistant-ui/react-markdown": "workspace:*",
1657
- "@hookform/resolvers": "^5.0.1",
1657
+ "@hookform/resolvers": "^5.1.1",
1658
1658
  "@radix-ui/react-avatar": "^1.1.10",
1659
1659
  "@radix-ui/react-icons": "^1.3.2",
1660
1660
  "@radix-ui/react-label": "^2.1.7",
@@ -1666,28 +1666,28 @@ export default nextConfig;
1666
1666
  "class-variance-authority": "^0.7.1",
1667
1667
  "clsx": "^2.1.1",
1668
1668
  "json-schema-to-zod": "^2.6.1",
1669
- "lucide-react": "^0.511.0",
1669
+ "lucide-react": "^0.515.0",
1670
1670
  "next": "15.3.3",
1671
1671
  "react": "19.1.0",
1672
1672
  "react-dom": "19.1.0",
1673
- "react-hook-form": "^7.57.0",
1674
- "react-resizable-panels": "^3.0.2",
1673
+ "react-hook-form": "^7.58.0",
1674
+ "react-resizable-panels": "^3.0.3",
1675
1675
  "remark-gfm": "^4.0.1",
1676
- "tailwind-merge": "^3.3.0",
1677
- "tw-animate-css": "^1.3.3",
1678
- "zod": "^3.25.49",
1676
+ "tailwind-merge": "^3.3.1",
1677
+ "tw-animate-css": "^1.3.4",
1678
+ "zod": "^3.25.64",
1679
1679
  "zod-to-json-schema": "^3.24.5",
1680
1680
  "zustand": "^5.0.5"
1681
1681
  },
1682
1682
  "devDependencies": {
1683
1683
  "@assistant-ui/x-buildutils": "workspace:*",
1684
- "@types/node": "^22",
1684
+ "@types/node": "^24",
1685
1685
  "@types/react": "^19",
1686
1686
  "@types/react-dom": "^19",
1687
1687
  "eslint": "^9",
1688
1688
  "eslint-config-next": "15.3.3",
1689
1689
  "postcss": "^8",
1690
- "tailwindcss": "^4.1.8",
1690
+ "tailwindcss": "^4.1.10",
1691
1691
  "typescript": "^5.8.3"
1692
1692
  }
1693
1693
  }
@@ -1099,25 +1099,25 @@ export default nextConfig;
1099
1099
  "ai": "^4.3.16",
1100
1100
  "class-variance-authority": "^0.7.1",
1101
1101
  "clsx": "^2.1.1",
1102
- "lucide-react": "^0.511.0",
1102
+ "lucide-react": "^0.515.0",
1103
1103
  "nanoid": "5.1.5",
1104
1104
  "next": "15.3.3",
1105
1105
  "react": "19.1.0",
1106
1106
  "react-dom": "19.1.0",
1107
1107
  "remark-gfm": "^4.0.1",
1108
- "tailwind-merge": "^3.3.0",
1109
- "tw-animate-css": "^1.3.3",
1110
- "zod": "^3.25.49"
1108
+ "tailwind-merge": "^3.3.1",
1109
+ "tw-animate-css": "^1.3.4",
1110
+ "zod": "^3.25.64"
1111
1111
  },
1112
1112
  "devDependencies": {
1113
1113
  "@assistant-ui/x-buildutils": "workspace:*",
1114
- "@types/node": "^22",
1114
+ "@types/node": "^24",
1115
1115
  "@types/react": "^19",
1116
1116
  "@types/react-dom": "^19",
1117
1117
  "eslint": "^9",
1118
1118
  "eslint-config-next": "15.3.3",
1119
1119
  "postcss": "^8",
1120
- "tailwindcss": "^4.1.8",
1120
+ "tailwindcss": "^4.1.10",
1121
1121
  "typescript": "^5.8.3"
1122
1122
  }
1123
1123
  }
@@ -4,14 +4,12 @@ title: makeAssistantToolUI
4
4
 
5
5
  import { ParametersTable } from "@/components/docs";
6
6
 
7
- # `makeAssistantToolUI`
8
-
9
7
  The `makeAssistantToolUI` utility is used to register a tool UI component with the Assistant.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```tsx
14
- import { makeAssistantToolUI } from "assistant-ui/react";
12
+ import { makeAssistantToolUI } from "@assistant-ui/react";
15
13
 
16
14
  const MyToolUI = makeAssistantToolUI({
17
15
  toolName: "myTool",
@@ -23,9 +21,7 @@ const MyToolUI = makeAssistantToolUI({
23
21
 
24
22
  ## API
25
23
 
26
- ### `makeAssistantToolUI(tool)`
27
-
28
- #### Parameters
24
+ ### Parameters
29
25
 
30
26
  <ParametersTable
31
27
  type="AssistantToolUIProps<TArgs, TResult>"
@@ -37,29 +33,87 @@ const MyToolUI = makeAssistantToolUI({
37
33
  },
38
34
  {
39
35
  name: "render",
40
- type: "function",
41
- description: "A function that renders the tool UI. It receives an object with the following properties: `args` (any): The arguments passed to the tool. `result` (any): The result of the tool execution. `status` (\"requires_action\" | \"in_progress\" | \"complete\" | \"error\"): The status of the tool execution.",
36
+ type: "ComponentType<ToolCallContentPartProps<TArgs, TResult>>",
37
+ description: "A React component that renders the tool UI. Receives the following props:",
38
+ required: true,
39
+ children: [
40
+ {
41
+ type: "ToolCallContentPartProps<TArgs, TResult>",
42
+ parameters: [
43
+ {
44
+ name: "type",
45
+ type: "\"tool-call\"",
46
+ description: "The content part type",
47
+ },
48
+ {
49
+ name: "toolCallId",
50
+ type: "string",
51
+ description: "Unique identifier for this tool call",
52
+ },
53
+ {
54
+ name: "toolName",
55
+ type: "string",
56
+ description: "The name of the tool being called",
57
+ },
58
+ {
59
+ name: "args",
60
+ type: "TArgs",
61
+ description: "The arguments passed to the tool",
62
+ },
63
+ {
64
+ name: "argsText",
65
+ type: "string",
66
+ description: "String representation of the arguments",
67
+ },
68
+ {
69
+ name: "result",
70
+ type: "TResult | undefined",
71
+ description: "The result of the tool execution (if complete)",
72
+ },
73
+ {
74
+ name: "isError",
75
+ type: "boolean | undefined",
76
+ description: "Whether the result is an error",
77
+ },
78
+ {
79
+ name: "status",
80
+ type: "ToolCallContentPartStatus",
81
+ description: "The execution status object with a type property: \"running\", \"complete\", \"incomplete\", or \"requires_action\"",
82
+ },
83
+ {
84
+ name: "addResult",
85
+ type: "(result: TResult | ToolResponse<TResult>) => void",
86
+ description: "Function to add a result (useful for human-in-the-loop tools)",
87
+ },
88
+ {
89
+ name: "artifact",
90
+ type: "unknown",
91
+ description: "Optional artifact data associated with the tool call",
92
+ },
93
+ ],
94
+ },
95
+ ],
42
96
  },
43
97
  ]}
44
98
  />
45
99
 
46
- #### Returns
100
+ ### Returns
47
101
 
48
102
  A React functional component that should be included in your component tree. This component doesn't render anything itself, but it registers the tool UI with the Assistant.
49
103
 
50
104
  ## Example
51
105
 
52
106
  ```tsx
53
- import { makeAssistantToolUI } from "assistant-ui/react";
54
- import { AssistantRuntimeProvider } from "assistant-ui/react";
107
+ import { makeAssistantToolUI } from "@assistant-ui/react";
108
+ import { AssistantRuntimeProvider } from "@assistant-ui/react";
55
109
 
56
110
  const GetWeatherUI = makeAssistantToolUI({
57
111
  toolName: "get_weather",
58
112
  render: ({ args, result, status }) => {
59
- if (status === "requires_action") return <p>Getting weather for {args.location}...</p>;
60
- if (status === "in_progress") return <p>Loading...</p>;
61
- if (status === "error") return <p>Error getting weather.</p>;
62
- if (status === "complete") return <p>The weather is {result.weather}.</p>;
113
+ if (status.type === "requires_action") return <p>Getting weather for {args.location}...</p>;
114
+ if (status.type === "running") return <p>Loading...</p>;
115
+ if (status.type === "incomplete" && status.reason === "error") return <p>Error getting weather.</p>;
116
+ if (status.type === "complete") return <p>The weather is {result.weather}.</p>;
63
117
  return null;
64
118
  },
65
119
  });
@@ -2,6 +2,8 @@
2
2
  title: makeAssistantTool
3
3
  ---
4
4
 
5
+ import { ParametersTable } from "@/components/docs";
6
+
5
7
  `makeAssistantTool` creates a React component that provides a tool to the assistant. This is useful for defining reusable tools that can be composed into your application.
6
8
 
7
9
  ## Usage
@@ -23,7 +25,10 @@ const submitForm = tool({
23
25
  });
24
26
 
25
27
  // Create a tool component
26
- const SubmitFormTool = makeAssistantTool(submitForm);
28
+ const SubmitFormTool = makeAssistantTool({
29
+ ...submitForm,
30
+ toolName: "submitForm"
31
+ });
27
32
 
28
33
  // Use in your component
29
34
  function Form() {
@@ -40,9 +45,96 @@ function Form() {
40
45
 
41
46
  ### Parameters
42
47
 
43
- - `tool`: A tool definition created using the `tool()` helper function
44
- - `parameters`: Zod schema defining the tool's parameters
45
- - `execute`: Function that implements the tool's behavior
48
+ <ParametersTable
49
+ type="AssistantToolProps<TArgs, TResult>"
50
+ parameters={[
51
+ {
52
+ name: "toolName",
53
+ type: "string",
54
+ description: "The unique identifier for the tool",
55
+ required: true,
56
+ },
57
+ {
58
+ name: "parameters",
59
+ type: "StandardSchemaV1<TArgs> | JSONSchema7",
60
+ description: "Schema defining the tool's parameters (typically a Zod schema)",
61
+ required: true,
62
+ },
63
+ {
64
+ name: "execute",
65
+ type: "(args: TArgs, context: ToolExecutionContext) => TResult | Promise<TResult>",
66
+ description: "Function that implements the tool's behavior (required for frontend tools)",
67
+ required: true,
68
+ },
69
+ {
70
+ name: "description",
71
+ type: "string",
72
+ description: "Optional description of the tool's purpose",
73
+ },
74
+ {
75
+ name: "render",
76
+ type: "ComponentType<ToolCallContentPartProps<TArgs, TResult>>",
77
+ description: "Optional custom UI component for rendering the tool execution. Receives the following props:",
78
+ children: [
79
+ {
80
+ type: "ToolCallContentPartProps<TArgs, TResult>",
81
+ parameters: [
82
+ {
83
+ name: "type",
84
+ type: "\"tool-call\"",
85
+ description: "The content part type",
86
+ },
87
+ {
88
+ name: "toolCallId",
89
+ type: "string",
90
+ description: "Unique identifier for this tool call",
91
+ },
92
+ {
93
+ name: "toolName",
94
+ type: "string",
95
+ description: "The name of the tool being called",
96
+ },
97
+ {
98
+ name: "args",
99
+ type: "TArgs",
100
+ description: "The arguments passed to the tool",
101
+ },
102
+ {
103
+ name: "argsText",
104
+ type: "string",
105
+ description: "String representation of the arguments",
106
+ },
107
+ {
108
+ name: "result",
109
+ type: "TResult | undefined",
110
+ description: "The result of the tool execution (if complete)",
111
+ },
112
+ {
113
+ name: "isError",
114
+ type: "boolean | undefined",
115
+ description: "Whether the result is an error",
116
+ },
117
+ {
118
+ name: "status",
119
+ type: "ToolCallContentPartStatus",
120
+ description: "The execution status object with a type property: \"running\", \"complete\", \"incomplete\", or \"requires_action\"",
121
+ },
122
+ {
123
+ name: "addResult",
124
+ type: "(result: TResult | ToolResponse<TResult>) => void",
125
+ description: "Function to add a result (useful for human-in-the-loop tools)",
126
+ },
127
+ {
128
+ name: "artifact",
129
+ type: "unknown",
130
+ description: "Optional artifact data associated with the tool call",
131
+ },
132
+ ],
133
+ },
134
+ ],
135
+ },
136
+ ]}
137
+ />
46
138
 
47
139
  ### Returns
48
140
 
@@ -76,14 +168,20 @@ const sendEmail = tool({
76
168
  body: z.string(),
77
169
  }),
78
170
  execute: async (params) => {
79
- // Implementation
171
+ // Tool logic
80
172
  return { sent: true };
81
173
  },
82
174
  });
83
175
 
84
176
  // Create tool components
85
- const EmailValidator = makeAssistantTool(validateEmail);
86
- const EmailSender = makeAssistantTool(sendEmail);
177
+ const EmailValidator = makeAssistantTool({
178
+ ...validateEmail,
179
+ toolName: "validateEmail"
180
+ });
181
+ const EmailSender = makeAssistantTool({
182
+ ...sendEmail,
183
+ toolName: "sendEmail"
184
+ });
87
185
 
88
186
  // Use together
89
187
  function EmailForm() {
@@ -54,7 +54,10 @@ const submitForm = tool({
54
54
  },
55
55
  });
56
56
 
57
- const SubmitFormTool = makeAssistantTool(submitForm);
57
+ const SubmitFormTool = makeAssistantTool({
58
+ ...submitForm,
59
+ toolName: "submitForm"
60
+ });
58
61
 
59
62
  // Use in your component
60
63
  function Form() {
@@ -122,7 +122,10 @@ const analyzeTransaction = tool({
122
122
  });
123
123
 
124
124
  // Create a tool component
125
- const TransactionAnalyzer = makeAssistantTool(analyzeTransaction);
125
+ const TransactionAnalyzer = makeAssistantTool({
126
+ ...analyzeTransaction,
127
+ toolName: "analyzeTransaction",
128
+ });
126
129
 
127
130
  function SmartTransactionHistory() {
128
131
  // Previous instructions...
@@ -47,7 +47,10 @@ const weatherTool = tool({
47
47
  });
48
48
 
49
49
  // Register the tool
50
- const WeatherTool = makeAssistantTool(weatherTool);
50
+ const WeatherTool = makeAssistantTool({
51
+ ...weatherTool,
52
+ toolName: "getWeather"
53
+ });
51
54
 
52
55
  // Create the UI
53
56
  const WeatherToolUI = makeAssistantToolUI<
@@ -52,7 +52,10 @@ const weatherTool = tool({
52
52
  });
53
53
 
54
54
  // Create the component
55
- const WeatherTool = makeAssistantTool(weatherTool);
55
+ const WeatherTool = makeAssistantTool({
56
+ ...weatherTool,
57
+ toolName: "getWeather"
58
+ });
56
59
 
57
60
  // Place the tool component inside AssistantRuntimeProvider
58
61
  function App() {
@@ -214,7 +217,10 @@ const screenshotTool = tool({
214
217
  }
215
218
  });
216
219
 
217
- const ScreenshotTool = makeAssistantTool(screenshotTool);
220
+ const ScreenshotTool = makeAssistantTool({
221
+ ...screenshotTool,
222
+ toolName: "screenshot"
223
+ });
218
224
  ```
219
225
 
220
226
  ### Backend Tools
@@ -267,7 +273,10 @@ const calculateTool = tool({
267
273
  }
268
274
  });
269
275
 
270
- const CalculateTool = makeAssistantTool(calculateTool);
276
+ const CalculateTool = makeAssistantTool({
277
+ ...calculateTool,
278
+ toolName: "calculate"
279
+ });
271
280
 
272
281
  // Backend: Use frontendTools to receive client tools
273
282
  import { frontendTools } from "@assistant-ui/react-ai-sdk";
@@ -329,7 +338,10 @@ const refundTool = tool({
329
338
  }
330
339
  });
331
340
 
332
- const RefundTool = makeAssistantTool(refundTool);
341
+ const RefundTool = makeAssistantTool({
342
+ ...refundTool,
343
+ toolName: "requestRefund"
344
+ });
333
345
  ```
334
346
 
335
347
  ### MCP (Model Context Protocol) Tools
@@ -393,7 +405,10 @@ const travelPlannerTool = tool({
393
405
  }
394
406
  });
395
407
 
396
- const TravelPlannerTool = makeAssistantTool(travelPlannerTool);
408
+ const TravelPlannerTool = makeAssistantTool({
409
+ ...travelPlannerTool,
410
+ toolName: "planTrip"
411
+ });
397
412
  ```
398
413
 
399
414
  ### Conditional Tool Availability
@@ -461,7 +476,10 @@ const resilientTool = tool({
461
476
  }
462
477
  });
463
478
 
464
- const ResilientTool = makeAssistantTool(resilientTool);
479
+ const ResilientTool = makeAssistantTool({
480
+ ...resilientTool,
481
+ toolName: "fetchWithRetries"
482
+ });
465
483
  ```
466
484
 
467
485
  ## Best Practices
@@ -7,9 +7,7 @@ import { Tabs, Tab } from "fumadocs-ui/components/tabs";
7
7
 
8
8
  `@assistant-ui/mcp-docs-server` provides direct access to assistant-ui's documentation and examples in Cursor, Windsurf, VSCode, Zed, Claude Code, or any other IDE or tool that supports MCP.
9
9
 
10
- It has access to comprehensive documentation and complete code examples which your IDE can read to help you build conversational UI components with assistant-ui.
11
-
12
- The MCP server tools have been designed to allow an agent to query the specific information it needs to complete an assistant-ui related task - for example: implementing chat components, integrating with different runtimes, or understanding component architecture.
10
+ The MCP server tools have been designed to allow an agent to query the specific information it needs to complete an assistant-ui related task - for example: implementing chat components, integrating with different runtimes, understanding component architecture, and troubleshooting issues.
13
11
 
14
12
  ## How it works
15
13
 
@@ -381,7 +381,7 @@ Tools are executed automatically by the runtime. The model adapter receives tool
381
381
 
382
382
  ```tsx
383
383
  import { useLocalRuntime } from "@assistant-ui/react";
384
- import { AssistantCloud } from "@assistant-ui/cloud";
384
+ import { AssistantCloud } from "assistant-cloud";
385
385
 
386
386
  const cloud = new AssistantCloud({
387
387
  apiKey: process.env.ASSISTANT_CLOUD_API_KEY,
@@ -1,4 +1,4 @@
1
- import { logger, IS_PREPARE_MODE, MDX_EXTENSION, DOCS_PATH, MAX_FILE_SIZE, CODE_EXAMPLES_PATH, MD_EXTENSION } from './chunk-C7O7EFKU.js';
1
+ import { logger, IS_PREPARE_MODE, MDX_EXTENSION, DOCS_PATH, MAX_FILE_SIZE, CODE_EXAMPLES_PATH, MD_EXTENSION } from './chunk-M2RKUM66.js';
2
2
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
4
  import { z } from 'zod';
@@ -31,7 +31,7 @@ var logger = {
31
31
  console.error(`[ERROR] ${message}`, ...args);
32
32
  },
33
33
  warn: (message, ...args) => {
34
- console.error(`[WARN] ${message}`, ...args);
34
+ console.warn(`[WARN] ${message}`, ...args);
35
35
  }
36
36
  };
37
37
 
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { runServer, server } from './chunk-CZCDQ3YH.js';
1
+ export { runServer, server } from './chunk-JS4PWCVA.js';
@@ -1,4 +1,4 @@
1
- import { ROOT_DIR, logger, EXAMPLES_PATH } from '../chunk-C7O7EFKU.js';
1
+ import { ROOT_DIR, logger, EXAMPLES_PATH } from '../chunk-M2RKUM66.js';
2
2
  import { rm, mkdir, readdir, readFile, writeFile, copyFile } from 'fs/promises';
3
3
  import { join, extname, relative } from 'path';
4
4
 
package/dist/stdio.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { runServer } from './chunk-CZCDQ3YH.js';
2
+ import { runServer } from './chunk-JS4PWCVA.js';
3
3
 
4
4
  // src/stdio.ts
5
5
  void runServer().catch((error) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assistant-ui/mcp-docs-server",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "MCP server for assistant-ui documentation and examples",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -8,18 +8,18 @@
8
8
  "assistant-ui-mcp": "./dist/stdio.js"
9
9
  },
10
10
  "dependencies": {
11
- "@modelcontextprotocol/sdk": "^1.12.1",
12
- "zod": "^3.25.57",
11
+ "@modelcontextprotocol/sdk": "^1.12.3",
12
+ "zod": "^3.25.64",
13
13
  "gray-matter": "^4.0.3",
14
14
  "cross-env": "^7.0.3"
15
15
  },
16
16
  "devDependencies": {
17
- "@types/node": "^24.0.0",
17
+ "@types/node": "^24.0.1",
18
18
  "tsup": "^8.5.0",
19
- "tsx": "^4.19.4",
19
+ "tsx": "^4.20.3",
20
20
  "typescript": "^5.8.3",
21
21
  "vitest": "^3.2.3",
22
- "eslint": "^9.28.0"
22
+ "eslint": "^9.29.0"
23
23
  },
24
24
  "files": [
25
25
  "dist",