SendMessageTool

class SendMessageTool(context: Context) : McpTool

Sends an SMS to to with text body via SmsManager (version-checked: system service on API 31+, else getDefault()). The recipient must match phoneRegex or an error is returned; bodies over 160 chars are split with divideMessage/sendMultipartTextMessage. Requires SEND_SMS. Output on success: sent (true), echoed to, and body_length; failures return an error with the exception message.

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