create-mcp-use-app 0.14.10 → 0.14.11

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.
@@ -45,6 +45,11 @@ const fruits = [
45
45
  { fruit: "lemon", color: "bg-[#feeecd] dark:bg-[#feeecd]/10" },
46
46
  ];
47
47
 
48
+ const fruitRowSchema = z.object({
49
+ fruit: z.string(),
50
+ color: z.string(),
51
+ });
52
+
48
53
  server.tool(
49
54
  {
50
55
  name: "search-tools",
@@ -52,6 +57,17 @@ server.tool(
52
57
  schema: z.object({
53
58
  query: z.string().optional().describe("Search query to filter fruits"),
54
59
  }),
60
+ // Hosts (e.g. ChatGPT) expect explicit hints. Use openWorldHint: true for HTTP/API calls;
61
+ // destructiveHint: true when deleting or overwriting user data.
62
+ annotations: {
63
+ readOnlyHint: true,
64
+ destructiveHint: false,
65
+ openWorldHint: false,
66
+ },
67
+ outputSchema: z.object({
68
+ query: z.string(),
69
+ results: z.array(fruitRowSchema),
70
+ }),
55
71
  widget: {
56
72
  name: "product-search-result",
57
73
  invoking: "Searching...",
@@ -82,6 +98,11 @@ server.tool(
82
98
  schema: z.object({
83
99
  fruit: z.string().describe("The fruit name"),
84
100
  }),
101
+ annotations: {
102
+ readOnlyHint: true,
103
+ destructiveHint: false,
104
+ openWorldHint: false,
105
+ },
85
106
  outputSchema: z.object({
86
107
  fruit: z.string(),
87
108
  color: z.string(),
@@ -41,6 +41,12 @@ server.tool(
41
41
  schema: z.object({
42
42
  city: z.string().describe("The city to fetch the weather for"),
43
43
  }),
44
+ // Demo stub — no network. If you call an external weather API, set openWorldHint: true.
45
+ annotations: {
46
+ readOnlyHint: true,
47
+ destructiveHint: false,
48
+ openWorldHint: false,
49
+ },
44
50
  },
45
51
  async ({ city }) => {
46
52
  return text(`The weather in ${city} is sunny`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mcp-use-app",
3
- "version": "0.14.10",
3
+ "version": "0.14.11",
4
4
  "type": "module",
5
5
  "description": "Create MCP-Use apps with one command",
6
6
  "author": "mcp-use, Inc.",