The gnubok_connect_bank and gnubok_connect_skatteverket tools now carry definition-level _meta.ui.resourceUri pointing at a new connect-card MCP Apps widget. On claude.ai/Claude Desktop the tool result renders as a card with an "Öppna i webbläsaren" button that sends the host a ui/open-link request from the click handler (the sanctioned new-tab mechanism; custom connectors always get Claude's confirmation modal, so the destination URL is shown in the card). Clients that do not render MCP Apps (Claude Code) keep the connect_url in the structured result as before. Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
20 lines
593 B
TypeScript
20 lines
593 B
TypeScript
import type { UiWidget } from './types'
|
|
import { receiptMatcherWidget } from './receipt-matcher'
|
|
import { vatReviewWidget } from './vat-review'
|
|
import { pendingOperationsWidget } from './pending-operations'
|
|
import { connectCardWidget } from './connect-card'
|
|
|
|
export const uiWidgets: UiWidget[] = [
|
|
receiptMatcherWidget,
|
|
vatReviewWidget,
|
|
pendingOperationsWidget,
|
|
connectCardWidget,
|
|
]
|
|
|
|
export function findUiWidget(uri: string): UiWidget | null {
|
|
return uiWidgets.find((w) => w.uri === uri) ?? null
|
|
}
|
|
|
|
export type { UiWidget } from './types'
|
|
export { WIDGET_MIME_TYPE } from './types'
|