GetPhoneNumberTool

Returns the device's line-1 phone number via the deprecated TelephonyManager.line1Number. Requires READ_PHONE_STATE (or READ_SMS/READ_PHONE_NUMBERS); even so the value is frequently unavailable (carrier/SIM does not populate it) and SecurityException is caught and treated as null. Output: phone_number (nullable), is_available.

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