Skip to main content
Glama
rahulkr
by rahulkr

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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)}"
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While it mentions the emulator constraint, it doesn't describe what happens after sending (e.g., success/failure response, delivery confirmation, error conditions), whether there are rate limits, or authentication requirements. The description provides minimal behavioral context beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just 7 words, with zero wasted language. It's front-loaded with the core action and includes the critical constraint in parentheses. Every word serves a purpose, making this optimally efficient for an AI agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (sending messages with 3 parameters), no annotations, but with an output schema available, the description provides minimal but sufficient context for basic usage. The emulator constraint is important context, but more behavioral information would be helpful since this appears to be a testing/development tool among many device control siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter documentation. The description doesn't mention any parameters at all, failing to explain what 'phone_number', 'message', or 'device_serial' represent or their expected formats. However, with only 3 parameters and an output schema available, the baseline is 3 as the agent can infer basic usage from parameter names alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Send an SMS') and the target ('to the emulator'), with the parenthetical '(emulator only)' providing important scope limitation. However, it doesn't distinguish this tool from potential alternatives like 'simulate_call' or other communication tools, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context with '(emulator only)', suggesting this tool should only be used with emulated devices rather than physical ones. However, it provides no explicit guidance on when to choose this over other communication tools like 'simulate_call' or when not to use it, leaving the agent to infer appropriate contexts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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