Skip to main content
Glama
palhamel

46elks MCP Server

by palhamel

check_account_balance

Check your 46elks account balance and verify available funds for SMS sending operations.

Instructions

Check 46elks account balance and account information to verify funds availability for SMS sending

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'check_account_balance' tool call. Instantiates ElksClient, fetches account info, and returns formatted text response.
    case 'check_account_balance':
      // Get account information via 46elks
      const elksClientForAccount = new ElksClient();
      const accountInfo = await elksClientForAccount.getAccountInfo();
      
      return {
        content: [
          {
            type: 'text',
            text: formatAccountBalance(accountInfo)
          }
        ]
      };
  • Tool schema definition including name, description, and empty input schema (no parameters required).
    {
      name: 'check_account_balance',
      description: 'Check 46elks account balance and account information to verify funds availability for SMS sending',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      }
    },
  • ElksClient.getAccountInfo() method: Fetches and returns account information (including balance) from 46elks API /Me endpoint.
    async getAccountInfo(): Promise<AccountInfo> {
      try {
        const response = await fetch(`${this.baseUrl}/Me`, {
          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 account info: ${response.status} ${response.statusText} - ${errorText}`);
        }
    
        return await response.json();
      } catch (error) {
        console.error('Failed to get account info:', error);
        throw new Error(`46elks account info failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
  • formatAccountBalance utility: Formats AccountInfo object into a user-friendly text output with balance status.
    export const formatAccountBalance = (accountInfo: AccountInfo): string => {
      const balanceInCurrency = accountInfo.balance / 10000;
      const formattedBalance = `${balanceInCurrency.toFixed(2)} ${accountInfo.currency}`;
      
      let output = `💰 Account Balance Information\n\n`;
      output += `Balance: ${formattedBalance}\n`;
      output += `Account: ${accountInfo.displayname}\n`;
      output += `Mobile: ${accountInfo.mobilenumber}\n`;
      output += `Email: ${accountInfo.email}\n`;
      output += `Currency: ${accountInfo.currency}\n`;
      output += `Account ID: ${accountInfo.id}\n\n`;
      
      // Add balance status indication
      if (balanceInCurrency < 10) {
        output += `⚠️  Low balance warning: Consider adding funds to your account\n`;
        output += `💡 Note: Adding funds must be done through the 46elks web interface at https://dashboard.46elks.com/`;
      } else {
        output += `✅ Balance sufficient for SMS sending`;
      }
      
      return output;
    };
Behavior2/5

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

With no annotations provided, the description carries full burden. It mentions the tool's purpose but doesn't disclose behavioral traits like authentication requirements, rate limits, whether it's read-only or has side effects, or what specific information is returned. The description is functional but lacks operational transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the tool's purpose clearly. It's appropriately sized for a simple tool and front-loads the essential information without unnecessary elaboration.

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 financial checking tool with no annotations and no output schema, the description is insufficient. It doesn't explain what specific account information is returned, the format of the balance, whether this requires special permissions, or how the agent should interpret the results. The context demands more completeness.

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 tool has zero parameters with 100% schema coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't discuss parameters, which is correct for a parameterless tool. Baseline is 4 for zero parameters.

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 verb ('check') and resource ('46elks account balance and account information') with a specific purpose ('to verify funds availability for SMS sending'). It distinguishes from siblings by focusing on account-level information rather than SMS operations, though it doesn't explicitly name alternatives.

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 context ('to verify funds availability for SMS sending'), suggesting this should be used before sending SMS messages. However, it doesn't provide explicit guidance on when to use this versus other tools or mention any prerequisites or exclusions.

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