Get information about SIM cards in the Android SMS MCP Server

The get_sms_subscriptions tool returns the list of active SIM cards installed in the Android device. Each entry includes a subscription_id that must be passed to send_sms when more than one SIM is present, so the agent can select the correct carrier before sending a message.

Sequence diagram

sequenceDiagram participant A as AI Agent participant S as SMS MCP Server participant P as Mobile Phone Note over A,S: Session initialized, tools listed A->>S: POST /mcp
tools/call → get_sms_subscriptions S->>P: Query active SIM subscriptions P-->>S: SIM slot data (2 subscriptions) S-->>A: 200 OK
JSON: count, subscriptions[] Note over A: Agent selects subscription_id
for the desired carrier

HTTP request

POST /mcp HTTP/1.1
Host: 192.168.0.11:9531
Accept-Encoding: gzip, deflate
Connection: keep-alive
User-Agent: python-httpx/0.28.1
Content-Type: application/json
Accept: application/json, text/event-stream
mcp-protocol-version: 2025-11-25
Content-Length: 104

{
  "jsonrpc": "2.0",
  "id": 17,
  "method": "tools/call",
  "params": {
    "name": "get_sms_subscriptions",
    "arguments": {}
  }
}

Request fields

Field Example value Description
jsonrpc "2.0" JSON-RPC protocol version. Always "2.0".
id 17 Request identifier used to correlate the response.
method "tools/call" The generic MCP method for invoking any tool by name.
params.name "get_sms_subscriptions" The specific tool to invoke on the server.
params.arguments {} This tool requires no input arguments; an empty object is passed.

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 329
Connection: keep-alive

{
  "id": 17,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"count\":2,\"subscriptions\":[{\"subscription_id\":14,\"sim_slot_index\":0,\"carrier_name\":\"vodafone UK\",\"display_name\":\"Orange F\"},{\"subscription_id\":17,\"sim_slot_index\":1,\"carrier_name\":\"EE | Yettel HU\",\"display_name\":\"Yettel HU\"}]}"
      }
    ]
  },
  "jsonrpc": "2.0"
}

The text field contains a JSON-encoded string. When parsed, it produces the following structure:

{
  "count": 2,
  "subscriptions": [
    {
      "subscription_id": 14,
      "sim_slot_index": 0,
      "carrier_name": "vodafone UK",
      "display_name": "Orange F"
    },
    {
      "subscription_id": 17,
      "sim_slot_index": 1,
      "carrier_name": "EE | Yettel HU",
      "display_name": "Yettel HU"
    }
  ]
}

Subscription object fields

Field Example value Description
count 2 Total number of active SIM subscriptions found on the device.
subscription_id 14 Unique Android subscription ID assigned to this SIM. Use this value as the subscription_id argument when calling send_sms.
sim_slot_index 0 Physical SIM slot index (zero-based). Slot 0 is typically the first SIM tray.
carrier_name "vodafone UK" The network carrier name.
display_name "Orange F" The user-defined or operator-provided display name for this SIM card.

To sum it up

When the device has multiple SIM cards, always call get_sms_subscriptions before sending a message to determine the right subscription_id. In the example above, the agent would pass 14 to route the message through the Vodafone UK SIM in slot 0, or 17 to use Yettel HU in slot 1. Proceed to Send an SMS message to see how the chosen ID is used in the tool call.


More information