ReadMessagesTool

class ReadMessagesTool(context: Context) : McpTool

Reads SMS from the inbox or sent box via ContentResolver on Telephony.Sms, optionally filtered by address (LIKE substring) and since (yyyy-MM-dd, kept only if it parses), newest first. Requires READ_SMS. Output: messages (list of {id, address, body, date formatted yyyy-MM-dd HH:mm, read}), count, and the resolved box. box is 'inbox' (default) or 'sent'; limit clamps to 1–100 (default 10).

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