Skip to main content
Glama
J-Gal02

ClickSend MCP Server

by J-Gal02

make_tts_call

Convert text to speech and deliver phone calls programmatically using ClickSend's API. Specify recipient number, message content, and voice type to initiate automated voice calls.

Instructions

Make Text-to-Speech calls via ClickSend

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesPhone number in E.164 format
messageYesText content to convert to speech
voiceNoVoice type for TTSfemale

Implementation Reference

  • MCP tool handler for 'make_tts_call': extracts arguments, validates parameters using validateTTSParams, calls ClickSendClient.makeTTSCall, and returns a text content response with the API result.
    case 'make_tts_call': {
      const { to, message, voice } = request.params.arguments as { 
        to: string; 
        message: string; 
        voice?: 'male' | 'female' 
      };
      validateTTSParams(to, message, voice);
      const result = await this.client.makeTTSCall({ to, message, voice });
      return {
        content: [
          {
            type: 'text',
            text: `TTS call initiated successfully: ${JSON.stringify(result)}`
          }
        ]
      };
    }
  • Input schema definition for the 'make_tts_call' tool, specifying properties for 'to', 'message', and optional 'voice' with types and requirements.
    inputSchema: {
      type: 'object',
      properties: {
        to: {
          type: 'string',
          description: 'Phone number in E.164 format'
        },
        message: {
          type: 'string',
          description: 'Text content to convert to speech'
        },
        voice: {
          type: 'string',
          enum: ['female', 'male'],
          default: 'female',
          description: 'Voice type for TTS'
        }
      },
      required: ['to', 'message'],
      additionalProperties: false
    }
  • src/index.ts:83-107 (registration)
    Registration of the 'make_tts_call' tool in the ListTools response, including name, description, and full input schema.
    {
      name: 'make_tts_call',
      description: 'Make Text-to-Speech calls via ClickSend',
      inputSchema: {
        type: 'object',
        properties: {
          to: {
            type: 'string',
            description: 'Phone number in E.164 format'
          },
          message: {
            type: 'string',
            description: 'Text content to convert to speech'
          },
          voice: {
            type: 'string',
            enum: ['female', 'male'],
            default: 'female',
            description: 'Voice type for TTS'
          }
        },
        required: ['to', 'message'],
        additionalProperties: false
      }
    }
  • Core implementation of makeTTSCall in ClickSendClient: constructs TTS payload and sends POST request to ClickSend /voice/send endpoint, handles errors.
    async makeTTSCall(params: TTSMessage) {
      const payload = {
        messages: [
          {
            to: params.to,
            body: params.message,
            voice: params.voice || 'female',
            require_input: 0,
            machine_detection: 0
          }
        ]
      };
    
      try {
        const response = await this.client.post('/voice/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;
      }
    }
  • Validation helper validateTTSParams: checks E.164 phone format, message length (1-1600 chars), and valid voice option ('male' or 'female').
    export function validateTTSParams(to: string, message: string, voice?: 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');
      }
      if (voice && !['male', 'female'].includes(voice)) {
        throw new ValidationError('Invalid voice option. Must be either "male" or "female"');
      }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Make...calls' implies an action that likely incurs costs and has external effects, the description doesn't mention authentication requirements, rate limits, cost implications, or what happens after the call is made. This leaves significant behavioral gaps.

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 5 words, front-loading the essential purpose without any wasted words. Every element earns its place, making it highly efficient for agent comprehension.

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

Completeness2/5

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

For a tool that makes external API calls (likely with cost implications) with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after the call, what success/failure looks like, or any system constraints. The context signals indicate this is a non-trivial operation that needs more complete documentation.

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?

The description provides no parameter information beyond what's already in the schema. However, with 100% schema description coverage, all parameters are well-documented in the structured fields, establishing a baseline score of 3. The description doesn't add any additional context about parameter usage or relationships.

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 ('Make Text-to-Speech calls') and the resource/service ('via ClickSend'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from the sibling tool 'send_sms', which would be needed for 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 Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'send_sms'. There's no mention of use cases, prerequisites, or contextual factors that would help an agent choose between TTS and SMS options.

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

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