@mcp-apps-kit/core
Advanced tools
+1
-1
| { | ||
| "name": "@mcp-apps-kit/core", | ||
| "version": "0.2.4", | ||
| "version": "0.2.5", | ||
| "description": "Server-side framework for building MCP applications", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+15
-9
@@ -82,5 +82,16 @@ # @mcp-apps-kit/core | ||
| Tools can reference a UI resource by ID. Return UI-only payloads in `_meta`. | ||
| Tools can include a UI definition for displaying results. Use `defineUI` for type-safe UI definitions, then reference it from your tool. Return UI-only payloads in `_meta`. | ||
| ```ts | ||
| import { createApp, defineTool, defineUI } from "@mcp-apps-kit/core"; | ||
| import { z } from "zod"; | ||
| // Define UI widget for displaying restaurant list | ||
| const restaurantListUI = defineUI({ | ||
| name: "Restaurant List", | ||
| description: "Displays restaurant search results", | ||
| html: "./dist/widget.html", | ||
| prefersBorder: true, | ||
| }); | ||
| const app = createApp({ | ||
@@ -90,3 +101,3 @@ name: "restaurant-finder", | ||
| tools: { | ||
| search_restaurants: { | ||
| search_restaurants: defineTool({ | ||
| description: "Search for restaurants by location", | ||
@@ -102,10 +113,5 @@ input: z.object({ location: z.string() }), | ||
| }, | ||
| ui: "restaurant-list", | ||
| }, | ||
| ui: restaurantListUI, | ||
| }), | ||
| }, | ||
| ui: { | ||
| "restaurant-list": { | ||
| html: "./dist/widget.html", | ||
| }, | ||
| }, | ||
| }); | ||
@@ -112,0 +118,0 @@ ``` |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
822729
2.69%7567
1.22%434
1.4%