Package-level declarations
Types
Fetches full MediaStore metadata for one item by media_id (the media_type param picks image (default) or video). Requires READ_MEDIA_IMAGES/READ_MEDIA_VIDEO on API 33+, else READ_EXTERNAL_STORAGE. Output: id, name, path, date_taken, date_modified, size_bytes, mime_type, width, height, media_type; videos add duration_seconds/resolution, images add latitude/longitude/description (when present).
Lists MediaStore buckets (album folders) for images and/or videos, aggregating item counts and using the newest item as the cover. The media_type param selects images (default), videos, or all; results sort by descending item count. Requires READ_MEDIA_IMAGES/READ_MEDIA_VIDEO on API 33+, else READ_EXTERNAL_STORAGE. Output: albums (each {bucket_id, album_name, cover_media_id, count}) capped at the limit param, plus count and media_type.
Serves photos and videos as MCP resources: resources/list advertises the RECENT_LIMIT most recent images and videos, and resources/read on a content://media/external/{images,video}/media/<id> URI returns the file as a base64 blob. Items over MAX_BYTES can't be read (use get_media_metadata for those). Needs the same permissions as MediaTools; without them the listing is empty and reads fail as not found. Hidden while get_media_metadata is gated off.
Provider for the MediaStore tools (SearchMediaTool, GetMediaMetadataTool, ListAlbumsTool) covering images and videos.
Searches the MediaStore for images and/or videos by DISPLAY_NAME substring (%, _, \ match literally) and/or DATE_TAKEN range (strict yyyy-MM-dd, device timezone), newest-first, with limit/offset paging. The media_type param selects images, videos, or all (default); all runs one MediaStore.Files query filtered to image and video rows, so both kinds are merged by date and offset pages consistently across them. Requires READ_MEDIA_IMAGES/READ_MEDIA_VIDEO on API 33+, else READ_EXTERNAL_STORAGE. Output: results (each {id, name, path, date_taken, size_bytes, mime_type, width, height, media_type}), count, and media_type.