BrowseFilesTool

class BrowseFilesTool(context: Context) : McpTool

Lists the immediate contents of a directory, sandboxed to external storage via PathValidator (defaults to /sdcard). Directories sort first, then by name. Requires READ_EXTERNAL_STORAGE on API ≤32; uses File API access on API 33+. Output: path, entries (each {name, path, size_bytes, last_modified, is_directory}, size_bytes is null for directories) capped at the limit param, and count.

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