Documentation
¶
Index ¶
- Constants
- func DefaultSandboxCSP() string
- func IsAppMIMEType(mime string) bool
- func ToolVisibleToApp(info *mcpServer.MCPToolAppInfo) bool
- func ToolVisibleToModel(info *mcpServer.MCPToolAppInfo) bool
- func ValidateAppToolInvocation(p mcpPolicy.MCPAppsPolicy, tool mcpServer.MCPToolCapability, ...) error
Constants ¶
const ( // AppExtensionID is the MCP extension identifier for MCP Apps. AppExtensionID = "io.modelcontextprotocol/ui" // AppMIMEType is the required MIME type for an MCP Apps UI resource. AppMIMEType = "text/html;profile=mcp-app" VisibilityModel = "model" VisibilityApp = "app" )
Variables ¶
This section is empty.
Functions ¶
func DefaultSandboxCSP ¶
func DefaultSandboxCSP() string
DefaultSandboxCSP returns a restrictive CSP suitable for srcdoc iframes hosting untrusted MCP App HTML. With sandbox="allow-scripts" the iframe has a unique opaque origin, so 'self' refers to that opaque origin.
func IsAppMIMEType ¶
IsAppMIMEType returns true if mime is a valid MCP Apps MIME type, tolerating whitespace and additional parameters after the profile.
func ToolVisibleToApp ¶
func ToolVisibleToApp(info *mcpServer.MCPToolAppInfo) bool
ToolVisibleToApp reports whether the tool may be called by an MCP App.
func ToolVisibleToModel ¶
func ToolVisibleToModel(info *mcpServer.MCPToolAppInfo) bool
ToolVisibleToModel reports whether the tool can be exposed to the LLM. A nil/empty visibility list defaults to model+app, so unknown servers don't accidentally hide tools.
func ValidateAppToolInvocation ¶
func ValidateAppToolInvocation( p mcpPolicy.MCPAppsPolicy, tool mcpServer.MCPToolCapability, appServer mcpServer.ServerID, ) error
ValidateAppToolInvocation is the Artifact-backed MCP App authorization check. It is the target API used by the Artifact Store MCP runtime.
Types ¶
This section is empty.