Skip to main content
Glama
jgottlieb84

agentline-mcp

by jgottlieb84

send_sms

Send outbound SMS messages from a provisioned phone number to any recipient in E.164 format. Supports US and international SMS with approved 10DLC campaign for major carriers. Includes inbound SMS capability for two-way communication.

Instructions

Send an outbound SMS from a provisioned number. from_number must be a number you already provisioned; to_number is the recipient in E.164 format (e.g. "+15551234567"). Outbound US SMS, international SMS, and inbound SMS all work — Agentline's 10DLC campaign is approved across all major US carriers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_numberYes
to_numberYes
bodyYes

Implementation Reference

  • The send_sms tool handler: an MCP tool decorated with @mcp.tool() that sends an outbound SMS. Takes from_number, to_number, and body parameters. Calls the Agentline SDK's send_sms() and returns the result, or error/status_code on failure.
    @mcp.tool()
    def send_sms(from_number: str, to_number: str, body: str) -> dict:
        """Send an outbound SMS from a provisioned number. `from_number` must be a
        number you already provisioned; `to_number` is the recipient in E.164 format
        (e.g. "+15551234567"). Outbound US SMS, international SMS, and inbound SMS
        all work — Agentline's 10DLC campaign is approved across all major US carriers.
        """
        try:
            return _client_or_init().send_sms(from_=from_number, to=to_number, body=body)
        except AgentlineError as e:
            return {"error": str(e), "status_code": e.status_code}
  • The send_sms tool is registered via the @mcp.tool() decorator on line 119. The mcp object is a FastMCP instance created on line 47.
    @mcp.tool()
  • _build_client() creates the Agentline SDK client used by send_sms. Reads AGENTLINE_API_KEY and optional AGENTLINE_BASE_URL from environment.
    def _build_client() -> Agentline:
        api_key = os.environ.get("AGENTLINE_API_KEY", "").strip()
        if not api_key:
            print(
                "AGENTLINE_API_KEY is not set. Get a key at https://www.agentline.co "
                "and export it before running this server.",
                file=sys.stderr,
            )
            sys.exit(1)
    
        base_url = os.environ.get("AGENTLINE_BASE_URL", "").strip() or None
        kwargs: dict[str, Any] = {"api_key": api_key}
        if base_url:
            kwargs["base_url"] = base_url
        return Agentline(**kwargs)
  • _client_or_init() is a lazy singleton getter for the Agentline client, used by send_sms (and all other tools) to get the SDK client instance.
    def _client_or_init() -> Agentline:
        global _client
        if _client is None:
            _client = _build_client()
        return _client
Behavior4/5

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

With no annotations, the description discloses key behaviors: `from_number` must be provisioned, `to_number` must be in E.164 format, and details on carrier coverage and 10DLC campaign. This goes beyond the schema but could mention rate limits or length constraints.

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 two sentences with no fluff. It front-loads the main action and then provides necessary context. Every sentence adds value.

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

Completeness4/5

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

Given the tool's simplicity (3 string params, no output schema), the description covers the essential purpose, number format requirements, and carrier scope. It is nearly complete, but missing potential body length limits.

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 coverage is 0%, and the description adds meaning for `from_number` (provisioned) and `to_number` (E.164 format). However, `body` lacks elaboration (e.g., max length). It partially compensates for the lack of schema descriptions.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Send an outbound SMS from a provisioned number.' This is specific and distinguishes it from sibling tools like send_email or make_call.

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 provides context on when to use the tool (e.g., with provisioned numbers and E.164 format) but does not explicitly state when not to use it or mention alternatives among siblings.

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/jgottlieb84/agentline-mcp'

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