GetSimInfoTool

class GetSimInfoTool(context: Context) : McpTool

Returns SIM card details from android.telephony.TelephonyManager. simSerialNumber (ICCID) needs READ_PHONE_STATE/privileged access and is null on API 29+ for non-privileged apps; SecurityException is caught and yields null. Carrier name and country ISO need no permission. Output: sim_serial (nullable), carrier_name, country_iso, and slot_index — which actually carries the default subscriptionId (public API 30+; the method didn't exist earlier), NOT the physical SIM slot, and is 0 below API 30 or on error.

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