# SMS GSM-7 Sanitizer MCP for AI Agents AI Agent Connect

> SMS GSM-7 Sanitizer stops you from overpaying on SMS campaigns. It automatically strips out emojis, smart quotes, and complex Unicode characters that break standard 160-character limits. By forcing text into pure 7-bit ASCII, it ensures your messages stay in a single segment, saving you from the 3x billing surcharges common with providers like Twilio or Zenvia.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_62Hkg8tkVyvv4L9qSbqQlax2IvyrZ64gBaZsZNQn/ai-agent-connect
- **Tags:** text-encoding, gsm7, sms-optimization, string-sanitization, telecom-billing, unicode-conversion

## Description

This Connector stops you from overpaying on SMS campaigns. When you're running an automated marketing flow, your AI agent might think a little rocket icon or a fancy curly quote adds personality. In the world of SMS, that little bit of flair can be a disaster. Most telecom providers use GSM-7 encoding, which has a strict 160-character limit. The moment an emoji or a non-standard character shows up, that limit drops to 70 characters. If your message is 100 characters long but contains one emoji, the provider splits it into two parts, and you get billed for both. This Connector fixes that problem by acting as a final gatekeeper. It scrubs the text to make sure it's perfectly compatible with standard telecom protocols. It handles the heavy lifting of transliterating complex characters into safe, readable ASCII. You can manage these complex encoding rules through the Vinkius catalog, letting your agent handle the heavy lifting while you keep your costs down. It's about making sure your communication actually reaches the recipient exactly how you intended without the hidden fees. You don't have to worry about your agent hallucinating characters that break the system. Instead of manually checking every single message for smart quotes or hidden Unicode characters, you can just let this tool handle it. It's a simple way to ensure your high-volume SMS blasts stay within the 160-character limit, keeping your billing predictable and your messages clean.

## Tools

### sanitize_gsm7
Scans your text to strip emojis and convert Unicode into 7-bit ASCII for standard SMS delivery.

## Prompt Examples

**Prompt:** 
```
Sanitize this SMS: Hey! 🚀 Your code is 1234.
```

**Response:** 
```
SMS GSM-7 Sanitization: `Hey! Your code is 1234.`

**Status:** Success
**Characters:** 21
**Encoding:** GSM-7 Compliant
```

**Prompt:** 
```
Make this safe for Twilio: Please click here for your 'special' discount.
```

**Response:** 
```
SMS GSM-7 Sanitization: `Please click here for your "special" discount.`

**Status:** Success
**Characters:** 40
**Encoding:** GSM-7 Compliant
```

**Prompt:** 
```
Strip all Unicode from this alert.
```

**Response:** 
```
SMS GSM-7 Sanitization: Message is safe to send.
```

## Capabilities

### Strip emojis
Removes all graphical icons and zero-width characters from your text.

### Transliterate accents
Converts complex Unicode characters into plain 7-bit ASCII.

### Enforce character limits
Ensures your message fits within the standard 160-character GSM-7 window.

### Prevent multi-part charges
Stops telecom providers from splitting your messages into multiple paid segments.

### Clean smart quotes
Replaces curly quotes and other stylistic punctuation with standard straight marks.

## Use Cases

### Automated Marketing Campaigns
A brand sends a discount code via an AI agent. The Connector ensures that phrases like Free Shipping 🚀 don't trigger extra costs by stripping the emoji.

### Server Alert Notifications
A developer sets up a server alert. The Connector strips out complex symbols so the notification stays in one segment and is easy to read.

### Customer Support Replies
An AI handles customer replies and uses the tool to keep responses concise and compatible with older phones that don't support Unicode.

### Bulk Broadcasts
A company sends 10k alerts. The tool prevents the split-message bug that usually happens when an LLM includes a smart quote.

## Benefits

- Stop overpaying on Twilio bills by ensuring messages stay under the 160-character GSM-7 limit using sanitize_gsm7.
- Guarantee message delivery by using sanitize_gsm7 to remove characters that cause encoding errors.
- Save time on manual text checking by letting your agent handle Unicode transliteration automatically.
- Maintain brand consistency by converting fancy quotes into standard marks that every phone can read.
- Reduce technical debt by building a reliable gatekeeper for all outbound SMS communications.

## How It Works

The bottom line is you get guaranteed 160-character compatibility for every SMS you send.

1. Provide the AI with a draft of your SMS message.
2. The Connector scans the text for non-GSM-7 characters and complex Unicode.
3. You get back a cleaned, ASCII-compliant string ready for immediate sending.

## Frequently Asked Questions

**How does SMS GSM-7 Sanitizer save me money?**
It prevents your messages from being split into multiple segments. By ensuring your text stays within the 160-character GSM-7 limit, you avoid the 3x surcharges many providers charge for multi-part SMS.

**Does it remove all emojis?**
Yes, it aggressively strips out all emojis and zero-width characters to ensure your message is compatible with standard telecom encoding.

**Will it break my text?**
No, it doesn't delete your content. It transliterates complex characters, like accents, into safe ASCII equivalents so they remain readable.

**Is it for Twilio?**
It works perfectly with Twilio, Zenvia, and any other service that uses standard GSM-7 encoding for SMS delivery.

**How does it handle accents?**
It converts complex accents and symbols into safe 7-bit ASCII. This ensures that characters like 'é' don't trigger a switch to expensive Unicode encoding.

**Can it handle long messages?**
It helps keep messages within the 160-character limit. If your message is too long, it will still be processed, but the tool's main job is ensuring encoding doesn't shrink that limit further.

**Why does an emoji cost more?**
Emojis force the telecom provider to use UCS-2 encoding, which cuts the character limit from 160 down to 70 per message segment.

**What happens to accented letters?**
Using the `unidecode` algorithm, letters like 'ç' become 'c' and 'ã' become 'a', ensuring strict ASCII compatibility.

**Is this needed for WhatsApp?**
No, WhatsApp handles Unicode perfectly. This is specifically for legacy SMS gateways like Twilio and SNS.