SearchDownloadsTool

Searches the public Downloads directory (top level only, files excluding directories) for filenames containing a case-insensitive substring, sorted newest-first. Requires READ_EXTERNAL_STORAGE on API ≤32; uses File API access on API 33+.

Scoped-storage limitation: on API 30+ the File API only sees files this app created plus media files (images/video/audio, when the host holds the matching media permission). Non-media files saved by other apps (PDFs, APKs, archives downloaded by a browser, …) are invisible and simply don't appear in the results — there is no permission this module requests that changes that (only MANAGE_EXTERNAL_STORAGE, granted by the user in Settings, lifts it). Output: files (each {name, size_bytes, last_modified, extension}) capped at the limit param, plus count and query.

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 outputSchema: Map<String, Any>
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