Skip to main content
Glama

send_sms

Send SMS messages to Android emulators for testing communication features during development and QA workflows.

Instructions

Send an SMS to the emulator (emulator only)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
phone_numberYes
messageYes
device_serialNo

Implementation Reference

  • The primary handler for the send_sms tool. Decorated with @mcp.tool() for automatic registration and schema inference from type hints. Executes the ADB emulator SMS send command via the run_adb helper.
    @mcp.tool() def send_sms( phone_number: str, message: str, device_serial: str | None = None ) -> str: """Send an SMS to the emulator (emulator only)""" return run_adb([ "emu", "sms", "send", phone_number, message ], device_serial)
  • Core utility helper function that runs ADB commands using subprocess, handles device serial, timeouts, and errors. Directly used by the send_sms handler to execute the 'adb emu sms send' command.
    def run_adb(args: list[str], device_serial: str | None = None, timeout: int = 30) -> str: """Run an ADB command and return output""" cmd = ["adb"] if device_serial: cmd.extend(["-s", device_serial]) cmd.extend(args) try: result = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout) if result.returncode != 0 and result.stderr: return f"Error: {result.stderr}" return result.stdout except subprocess.TimeoutExpired: return "Error: Command timed out" except Exception as e: return f"Error: {str(e)}"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rahulkr/r_adb_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server