FastMCP Cloud is here! Join the beta.
fastmcp.resources.types
TextResource
read
read(self) -> str
BinaryResource
read(self) -> bytes
FileResource
validate_absolute_path
validate_absolute_path(cls, path: Path) -> Path
set_binary_from_mime_type
set_binary_from_mime_type(cls, is_binary: bool, info: ValidationInfo) -> bool
read(self) -> str | bytes
HttpResource
DirectoryResource
list_files
list_files(self) -> list[Path]