Skip to main content
Glama
J-Gal02

ClickSend MCP Server

send_sms

Send SMS messages to phone numbers using ClickSend's API. This tool enables programmatic SMS delivery with built-in rate limiting and input validation for reliable communication.

Instructions

Send SMS messages via ClickSend

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesPhone number in E.164 format (e.g. +61423456789)
messageYesMessage content to send

Implementation Reference

  • The core handler function in ClickSendClient that executes the SMS sending logic via the ClickSend API, including payload construction and error handling.
    async sendSMS(params: SMSMessage) { const payload = { messages: [ { source: 'mcp', body: params.message, to: params.to } ] }; try { const response = await this.client.post('/sms/send', payload); return response.data; } catch (error) { if (axios.isAxiosError(error)) { throw new Error(`ClickSend API Error: ${error.response?.data?.message || error.message}`); } throw error; } }
  • src/index.ts:65-82 (registration)
    Registration of the 'send_sms' tool in the ListTools handler, including name, description, and input schema.
    name: 'send_sms', description: 'Send SMS messages via ClickSend', inputSchema: { type: 'object', properties: { to: { type: 'string', description: 'Phone number in E.164 format (e.g. +61423456789)' }, message: { type: 'string', description: 'Message content to send' } }, required: ['to', 'message'], additionalProperties: false } },
  • Server-side dispatch handler for 'send_sms' tool calls, including validation and delegation to client.sendSMS.
    case 'send_sms': { const { to, message } = request.params.arguments as { to: string; message: string }; validateSMSParams(to, message); const result = await this.client.sendSMS({ to, message }); return { content: [ { type: 'text', text: `SMS sent successfully: ${JSON.stringify(result)}` } ] }; }
  • TypeScript interface defining the input parameters for sendSMS.
    export interface SMSMessage { to: string; message: string; }
  • Validation helper function for SMS parameters used in the tool handler.
    export function validateSMSParams(to: string, message: string): void { if (!validatePhoneNumber(to)) { throw new ValidationError('Invalid phone number format. Must be in E.164 format (e.g., +61423456789)'); } if (!validateMessage(message)) { throw new ValidationError('Invalid message. Must be between 1 and 1600 characters'); } }

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/J-Gal02/clicksend-mcp'

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