ListAlbumsTool

class ListAlbumsTool(context: Context) : McpTool

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.

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard
open override val annotations: ToolAnnotations
Link copied to clipboard
open override val description: String
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val parameters: List<ToolParameter>

Functions

Link copied to clipboard
open suspend override fun execute(params: Map<String, Any>): ToolResult