fix _meta config
This commit is contained in:
parent
84f757012f
commit
3d82cda68e
@ -18,7 +18,8 @@ import { createUI } from 'mcp-ui-kit/server';
|
|||||||
const dashboardUI = createUI('my-dashboard', import.meta.resolve('./MyComponent.tsx'));
|
const dashboardUI = createUI('my-dashboard', import.meta.resolve('./MyComponent.tsx'));
|
||||||
|
|
||||||
server.registerTool('dashboard', {
|
server.registerTool('dashboard', {
|
||||||
description: 'Interactive dashboard'
|
description: 'Interactive dashboard',
|
||||||
|
_meta: dashboardUI.meta
|
||||||
}, async () => ({
|
}, async () => ({
|
||||||
content: [
|
content: [
|
||||||
{ type: 'text', text: 'Dashboard loaded' },
|
{ type: 'text', text: 'Dashboard loaded' },
|
||||||
|
|||||||
BIN
nanobot.db
BIN
nanobot.db
Binary file not shown.
@ -55,7 +55,7 @@ app.post('/mcp', async (req, res) => {
|
|||||||
|
|
||||||
server.registerTool(
|
server.registerTool(
|
||||||
'weather_dashboard',
|
'weather_dashboard',
|
||||||
{ description: 'Interactive weather dashboard showing current conditions and 5-day forecast for Oslo' },
|
{ description: 'Interactive weather dashboard showing current conditions and 5-day forecast for Oslo', _meta: weatherDashboardUI.meta },
|
||||||
async () => ({
|
async () => ({
|
||||||
content: [
|
content: [
|
||||||
{
|
{
|
||||||
@ -76,6 +76,7 @@ app.post('/mcp', async (req, res) => {
|
|||||||
'stock_portfolio',
|
'stock_portfolio',
|
||||||
{
|
{
|
||||||
description: 'Interactive stock portfolio dashboard. View real-time prices, charts, and analysis for your selected stocks.',
|
description: 'Interactive stock portfolio dashboard. View real-time prices, charts, and analysis for your selected stocks.',
|
||||||
|
_meta: stockDashboardUI.meta,
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
symbols: z.array(z.string()).default(['AAPL', 'GOOGL', 'MSFT']),
|
symbols: z.array(z.string()).default(['AAPL', 'GOOGL', 'MSFT']),
|
||||||
timeframe: z.enum(['1D', '1W', '1M', '3M', '1Y']).default('1M'),
|
timeframe: z.enum(['1D', '1W', '1M', '3M', '1Y']).default('1M'),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user