Skip to main content
Glama

SMS Segment Counter

sms_segment_count
Read-onlyIdempotent

Count how many SMS segments a text message will use before you send it, which sets what most SMS providers bill. Send the message text exactly as it will go out. Get back the encoding (GSM-7 or UCS-2), the characters, the 7-bit or 16-bit units, the segment count and the limit per segment (160/153 for GSM-7, 70/67 for UCS-2), where each segment starts and ends, every character that forces UCS-2 (with its code point and name, such as a curly apostrophe or an emoji), and the GSM characters that take two units (such as the euro sign and square brackets). Answer fields: ok, verdict, result, rule, does_not, sources, observation, signature, verify. Errors: ok false with the reason (bad input, too large, hourly limit). Free. No model, no network, nothing you send is stored by the tool, and every answer is signed with LLPRO's key (check it at https://llpro.ai/sms-segment-count). Not legal, tax or financial advice.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "message": "<message>"
    },
    "name": "sms_segment_count"
  }
}

Input Schema

NameRequiredDescriptionDefault
messageYesThe SMS text exactly as it will be sent (1 to 2,000 characters; spaces and line breaks count). Used only to count; never stored or echoed back as a whole.
encodingNo'auto' (default): GSM-7 when every character is in the GSM 7-bit alphabet, otherwise UCS-2. 'ucs2': count as UCS-2 even if every character is GSM (some senders always send UCS-2).auto
reference_bitsNoConcatenation header your sender uses for long messages: '8' (8-bit reference number, 6-byte header, the common one) or '16' (16-bit reference, 7-byte header). Default 8.8

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations: free, no model, no network, nothing stored, answers cryptographically signed with a verification URL, and an explicit error taxonomy including an hourly rate limit. Those are operational traits an agent cannot learn from readOnlyHint/idempotentHint and materially affect trust and retry behavior.

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

Conciseness4/5

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

Purpose and billing rationale are front-loaded, then inputs, then outputs, then errors and guarantees — a sensible order. It is long, and the bare list of answer field names (ok, verdict, rule, does_not, signature...) conveys little without definitions, but nearly every clause earns its place.

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

Completeness5/5

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

With no output schema, the description correctly carries the full burden of describing return values: encoding, character and unit counts, segment count, per-segment limits and boundaries, and UCS-2-forcing characters. Combined with the error and storage guarantees, nothing needed to call or interpret it is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the enum and default semantics for encoding and reference_bits are already handled there. The description still adds meaning for 'message' by insisting the text be exact as sent, which is what determines whitespace and Unicode results, and it explains that 'too large' is a real failure mode against the maxLength.

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?

States a precise verb and resource — counting SMS segments for a message before sending — and ties it to why it matters (billing). It is immediately distinguishable from the unrelated sibling tools, and an agent can tell what it returns without opening anything else.

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

Usage Guidelines4/5

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

Gives clear pre-send timing ('before you send it') and an important operating instruction ('send the message text exactly as it will go out'). It does not name alternatives or exclusions, but no plausible competing sibling is implied here, so the guidance is sufficient.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources