mcp-use TypeScript API
    Preparing search index...

    Interface ToolViewConfig

    Binds a tool to a view directory for MCP Apps rendering.

    A view may have at most one bound tool. That tool owns the resource facts (description, csp, permissions, domain, prefersBorder); a second tool that names the same view is rejected. The view file exports the component, while the framework emits these fields on the view's MCP resource, where hosts read _meta.ui.

    interface ToolViewConfig {
        csp?: McpUiResourceCsp;
        description?: string;
        domain?: string;
        name: string;
        permissions?: McpUiResourcePermissions;
        prefersBorder?: boolean;
    }
    Index
    csp?: McpUiResourceCsp

    CSP domains the host must allow → resource _meta.ui.csp. The framework appends the server origin to connectDomains and the configured assets origin (or server origin) to resourceDomains at emission time. Other author-set fields (frameDomains, baseUriDomains, …) pass through.

    description?: string

    Human-readable description of the view resource → the resource's description on resources/list and resources/read.

    domain?: string

    Dedicated origin hint for hosts that render views on a separate domain → resource _meta.ui.domain.

    name: string

    View directory / registry name, e.g. "product-search-result".

    permissions?: McpUiResourcePermissions

    Sandbox permissions the view needs → resource _meta.ui.permissions.

    prefersBorder?: boolean

    Ask the host to draw a border around the view → resource _meta.ui.prefersBorder.