MediaResourceProvider

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.

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard
open override val requiredTools: Set<String>
Link copied to clipboard
open override val templates: List<McpResourceTemplate>

Functions

Link copied to clipboard
open suspend fun complete(uriTemplate: String, argument: String, value: String, context: CompletionContext): List<String>
Link copied to clipboard
open override fun handles(uri: String): Boolean
Link copied to clipboard
open suspend override fun list(): List<McpResource>
Link copied to clipboard
open suspend override fun read(uri: String): List<ResourceContents>?