docs/python-sdk/fastmcp-utilities-mime.mdx
fastmcp.utilities.mimeMIME type constants and helpers for MCP Apps UI resources.
This module has no dependencies on the server or resource packages, so it can be safely imported from anywhere.
resolve_ui_mime_type <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/utilities/mime.py#L10" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>resolve_ui_mime_type(uri: str, explicit_mime_type: str | None) -> str | None
Return the appropriate MIME type for a resource URI.
For ui:// scheme resources, defaults to UI_MIME_TYPE when no
explicit MIME type is provided.
Args:
uri: The resource URI stringexplicit_mime_type: The MIME type explicitly provided by the userReturns: