SearchMediaTool

class SearchMediaTool(context: Context) : McpTool

Searches the MediaStore for images and/or videos by DISPLAY_NAME substring and/or DATE_TAKEN range, newest-first, with limit/offset paging. The media_type param selects images, videos, or all (default). 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.

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