Skip to main content
Glama

danke_balance

Check your current Bitcoin Lightning balance and view earning/spending statistics on the Danke network for micropayments.

Instructions

Check your current sats balance and earning/spending statistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for danke_balance tool. It calls agent.balance() to fetch balance data and returns formatted text showing balance, total received, and total sent statistics.
    async () => {
      try {
        const bal = await agent.balance();
        const text = [
          '💰 Danke Balance',
          `  Balance: ${formatNumber(bal.balance_sats)} sats`,
          `  Received: ${formatNumber(bal.total_received)} sats (from ${formatNumber(bal.dankes_received)} dankes)`,
          `  Sent: ${formatNumber(bal.total_sent)} sats (in ${formatNumber(bal.dankes_sent)} dankes)`,
        ].join('\n');
        return { content: [{ type: 'text', text }] };
      } catch (err) {
        const msg = err instanceof Error ? err.message : String(err);
        return { content: [{ type: 'text', text: `❌ Error: ${msg}` }], isError: true };
      }
    }
  • src/server.ts:75-93 (registration)
    Registration of the danke_balance tool with the MCP server. It registers with name 'danke_balance' and description 'Check your current sats balance and earning/spending statistics.' This tool takes no input parameters.
    server.tool(
      'danke_balance',
      'Check your current sats balance and earning/spending statistics.',
      async () => {
        try {
          const bal = await agent.balance();
          const text = [
            '💰 Danke Balance',
            `  Balance: ${formatNumber(bal.balance_sats)} sats`,
            `  Received: ${formatNumber(bal.total_received)} sats (from ${formatNumber(bal.dankes_received)} dankes)`,
            `  Sent: ${formatNumber(bal.total_sent)} sats (in ${formatNumber(bal.dankes_sent)} dankes)`,
          ].join('\n');
          return { content: [{ type: 'text', text }] };
        } catch (err) {
          const msg = err instanceof Error ? err.message : String(err);
          return { content: [{ type: 'text', text: `❌ Error: ${msg}` }], isError: true };
        }
      }
    );
  • Helper function used by danke_balance (and other tools) to format numbers with locale-specific separators (e.g., 1,234,567).
    function formatNumber(n: number): string {
      return n.toLocaleString('en-US');
    }
Behavior3/5

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

With no annotations, description carries the full burden; it mentions 'earning/spending statistics' indicating the data returned, but omits operational details like caching, rate limits, or read-only safety.

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 sentence, front-loaded with the verb, no redundant words—perfectly sized for a zero-parameter utility.

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

Completeness4/5

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

Adequate for the tool's low complexity; mentions both balance and statistics, providing sufficient expectation of return data despite lacking an output schema.

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?

Schema has 0 parameters, meeting the baseline expectation; description appropriately avoids unnecessary parameter explanation.

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?

States specific action (Check) and resources (sats balance, earning/spending statistics), clearly distinguishing it from transaction tools like send/withdraw, though it doesn't explicitly differentiate from 'profile'.

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?

Provides no guidance on when to use this tool versus alternatives, such as checking balance before using danke_send or danke_withdraw.

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/jordiagi/danke-mcp'

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