FilesResourceProvider

Serves files under external storage as MCP resources at file:///storage/... URIs, inside the same PathValidator sandbox as the file tools. A text file (by extension or content) of at most MAX_TEXT_BYTES that is valid UTF-8 comes back as text, byte-for-byte (line endings untouched); anything else as a base64 blob up to MAX_BYTES, so nothing is silently truncated or altered. Nothing is listed up front — clients find paths with browse_files / search_files. Hidden while read_file is gated off.

Constructors

Link copied to clipboard
constructor()

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 fun list(): List<McpResource>
Link copied to clipboard
open suspend override fun read(uri: String): List<ResourceContents>?