MCP Apps
    Preparing search index...

    Function supportsContentMimeType

    • Check whether a payload MIME type is included in a set of supported dynamic content MIME types, honoring the ["*"] wildcard.

      Servers use this against the host's negotiated contentMimeTypes extension setting before registering renderer-pattern tools; hosts can use it against a view's declared contentMimeTypes to type-filter payloads.

      Parameters

      • contentMimeTypes: string[] | undefined
      • mimeType: string

      Returns boolean

      // Server: register the renderer-pattern tool only when the host
      // forwards this payload type (handles the ["*"] wildcard)
      if (supportsContentMimeType(uiCap?.contentMimeTypes, A2UI_MIME_TYPE)) {
      // register tool returning marked A2UI payloads
      } else {
      // register text-only or structuredContent-driven variant
      }