fix _meta config

This commit is contained in:
Fredrik Jensen 2025-12-06 11:11:46 +01:00
parent 84f757012f
commit 3d82cda68e
3 changed files with 4 additions and 2 deletions

View File

@ -18,7 +18,8 @@ import { createUI } from 'mcp-ui-kit/server';
const dashboardUI = createUI('my-dashboard', import.meta.resolve('./MyComponent.tsx'));
server.registerTool('dashboard', {
description: 'Interactive dashboard'
description: 'Interactive dashboard',
_meta: dashboardUI.meta
}, async () => ({
content: [
{ type: 'text', text: 'Dashboard loaded' },

Binary file not shown.

View File

@ -55,7 +55,7 @@ app.post('/mcp', async (req, res) => {
server.registerTool(
'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 () => ({
content: [
{
@ -76,6 +76,7 @@ app.post('/mcp', async (req, res) => {
'stock_portfolio',
{
description: 'Interactive stock portfolio dashboard. View real-time prices, charts, and analysis for your selected stocks.',
_meta: stockDashboardUI.meta,
inputSchema: {
symbols: z.array(z.string()).default(['AAPL', 'GOOGL', 'MSFT']),
timeframe: z.enum(['1D', '1W', '1M', '3M', '1Y']).default('1M'),