Skip to main content
Glama
palhamel

46elks MCP Server

by palhamel

check_sms_status

Check the delivery status and view details of SMS messages sent through the 46elks API using the message ID returned upon sending.

Instructions

Check delivery status and details of a sent SMS

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYes46elks message ID returned when SMS was sent

Implementation Reference

  • Handler for the 'check_sms_status' tool: validates the message_id parameter, retrieves message details using ElksClient.getMessageById, formats the status information including direction, cost, and timestamps, and returns it as a text response.
    case 'check_sms_status':
      const { message_id } = args as {
        message_id: string;
      };
    
      if (!message_id || typeof message_id !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'message_id is required and must be a string');
      }
    
      // Get message status via 46elks
      const elksClientForStatus = new ElksClient();
      const messageDetails = await elksClientForStatus.getMessageById(message_id);
      
      const cost = messageDetails.cost ? `${messageDetails.cost / 10000} SEK` : 'N/A';
      const date = new Date(messageDetails.created).toLocaleString();
      const messageDirection = messageDetails.direction === 'outbound' ? '📤 Sent' : '📥 Received';
      
      let statusText = `📱 SMS Status Check\n\n`;
      statusText += `${messageDirection} Message\n`;
      statusText += `ID: ${messageDetails.id}\n`;
      statusText += `Status: ${messageDetails.status}\n`;
      statusText += `To: ${messageDetails.to}\n`;
      statusText += `From: ${messageDetails.from}\n`;
      statusText += `Created: ${date}\n`;
      statusText += `Cost: ${cost}\n`;
      statusText += `Message: ${messageDetails.message}`;
      
      return {
        content: [
          {
            type: 'text',
            text: statusText
          }
        ]
      };
  • src/index.ts:86-99 (registration)
    Registration of the 'check_sms_status' tool in the list of available tools, including name, description, and input schema requiring 'message_id'.
    {
      name: 'check_sms_status',
      description: 'Check delivery status and details of a sent SMS',
      inputSchema: {
        type: 'object',
        properties: {
          message_id: {
            type: 'string',
            description: '46elks message ID returned when SMS was sent'
          }
        },
        required: ['message_id']
      }
    },
  • Helper method in ElksClient that performs the API call to retrieve SMS message details by ID from 46elks, handles errors, normalizes the direction field ('outgoing' to 'outbound'), and returns typed ElksMessage.
    async getMessageById(messageId: string): Promise<ElksMessage> {
      const response = await fetch(`${this.baseUrl}/sms/${messageId}`, {
        method: 'GET',
        headers: {
          'Authorization': this.auth,
          'Content-Type': 'application/x-www-form-urlencoded'
        }
      });
    
      if (!response.ok) {
        const errorText = await response.text();
        throw new Error(`Failed to get message: ${response.status} ${response.statusText} - ${errorText}`);
      }
    
      const message = await response.json();
      
      // Convert API response direction terms to our interface
      return {
        ...message,
        direction: message.direction === 'outgoing' ? 'outbound' : 'inbound'
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool checks status and details, but does not disclose behavioral traits such as required permissions, rate limits, error handling, or what specific details are returned (e.g., delivery timestamps, error codes). This leaves gaps for a read operation.

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 a single, efficient sentence that front-loads the core purpose ('Check delivery status and details') without any wasted words. It is appropriately sized for a simple lookup tool.

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?

Given the tool's low complexity (one parameter, read-only operation) and lack of annotations or output schema, the description is minimally adequate. However, it does not fully compensate for missing behavioral context (e.g., what details are returned, error cases), leaving some gaps for an agent to understand the tool's complete behavior.

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?

The input schema has 100% description coverage, clearly documenting the single required 'message_id' parameter. The description adds no parameter-specific information beyond what the schema provides, but with only one parameter and high schema coverage, the baseline is appropriately met without needing extra details.

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?

The description clearly states the specific action ('Check delivery status and details') and the resource ('a sent SMS'), distinguishing it from siblings like 'send_sms' (creation) and 'get_delivery_statistics' (aggregate data). It precisely communicates the tool's function without redundancy.

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?

The description implies usage for checking status of sent SMS messages, but does not explicitly state when to use this tool versus alternatives like 'get_sms_messages' (which might retrieve multiple messages) or 'get_delivery_statistics' (which could provide broader analytics). No exclusions or prerequisites are mentioned.

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/palhamel/46elks-mcp-server'

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