Commit f0625b5
fix(mcp): use zod/v3 for compatibility with mcp-handler (#290)
The mcp-handler package internally depends on @modelcontextprotocol/[email protected],
which uses zod-to-json-schema that is incompatible with Zod 4. This caused
the `component` parameter in `get_ai_elements_component` tool to not be
exposed in the inputSchema (empty properties object).
Changes:
- Import zod from "zod/v3" instead of "zod" for backward compatibility
- Replace z.enum() with z.string().describe() for better schema generation
- Improve error message to list available components when not found
Co-authored-by: liuhaitian <[email protected]>1 parent b4798cd commit f0625b5
File tree
2 files changed
+15
-3
lines changed- .changeset
- apps/registry/app/api/[transport]
2 files changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
50 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
| |||
0 commit comments