Skip to main content
Glama

whatsapp_send

Send WhatsApp messages using pre-approved templates to phone numbers with country codes. Configure language and parameters for automated communication.

Instructions

Send a WhatsApp message using a pre-approved template ($0.005)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesPhone number with country code (e.g. +15551234567)
templateYes
languageNoen_US
paramsNo

Implementation Reference

  • index.js:50-79 (handler)
    The 'callTool' function is the universal handler that executes the tool logic by fetching the defined endpoint from the IteraTools API.
    async function callTool(endpoint, params) {
      const fetch = (await import('node-fetch')).default;
      const isGet = ['GET'].includes((TOOLS.find(t => t.endpoint === endpoint) || {}).method);
      
      const url = isGet 
        ? `${BASE_URL}${endpoint}?${new URLSearchParams(params)}`
        : `${BASE_URL}${endpoint}`;
      
      const res = await fetch(url, {
        method: isGet ? 'GET' : 'POST',
        headers: {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${API_KEY}`,
        },
        body: isGet ? undefined : JSON.stringify(params),
      });
      
      const text = await res.text();
      let data;
      try { data = JSON.parse(text); } catch { data = { raw: text }; }
      
      if (!res.ok) {
        if (res.status === 402) {
          throw new Error(`Insufficient credits. Add credits at https://iteratools.com. Cost: ${TOOLS.find(t=>t.endpoint===endpoint)?.price || 'see docs'}`);
        }
        throw new Error(`API error ${res.status}: ${text.substring(0, 200)}`);
      }
      
      return data;
    }
  • The 'whatsapp_send' tool definition including its inputSchema and endpoint mapping.
    { name: 'whatsapp_send', description: 'Send a WhatsApp message using a pre-approved template', inputSchema: { type: 'object', properties: { to: { type: 'string', description: 'Phone number with country code (e.g. +15551234567)' }, template: { type: 'string' }, language: { type: 'string', default: 'en_US' }, params: { type: 'array', items: { type: 'string' } } }, required: ['to', 'template'] }, endpoint: '/whatsapp/send', price: '$0.005' },
Behavior3/5

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

No annotations provided, so description carries full burden. Adds valuable cost information ($0.005) and the template requirement constraint. However, missing disclosure on return values, error handling (e.g., invalid template names), rate limits, or whether the operation is idempotent.

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?

Single dense sentence with zero waste. Front-loaded with action verb. Cost information parenthetically included without clutter. Every word earns its place.

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

Completeness3/5

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

Adequate for basic invocation given the tool's moderate complexity, covering the essential constraint (templates) and cost. However, incomplete regarding parameter semantics (especially 'params' array purpose) and lacks description of return values or success/failure indicators, which is notable given no output schema exists.

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

Parameters2/5

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

Schema coverage is only 25% (only 'to' parameter described). Description mentions 'template' but fails to explain the critical 'params' array (likely for template variable substitution), the expected format for 'language' (default en_US suggests locale codes), or provide examples. Insufficient compensation for poor schema coverage.

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?

Clearly states the action (Send), resource (WhatsApp message), and critical constraint (pre-approved template). Includes cost transparency ($0.005). Lacks explicit differentiation from sibling communication tools (e.g., how it differs from email or SMS capabilities), though the WhatsApp specificity helps.

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?

Implies a usage constraint through 'pre-approved template,' hinting that free-form messaging isn't supported. However, lacks explicit guidance on when to use this versus alternatives, prerequisites for template approval, or what happens if templates aren't pre-approved.

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/fredpsantos33/itera-tools-mcp'

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