Skip to main content
Glama

get_mint_balances

Retrieve detailed balance breakdowns by mint for managing digital assets through the MCP Money server.

Instructions

Get balance breakdown per mint

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function in MCPWallet class that retrieves mint balances from the NDKCashuWallet instance and returns them as a Map.
    async getMintBalances(): Promise<Map<string, number>> {
      if (!this.wallet) throw new Error('Wallet not initialized');
      
      try {
        const balances = this.wallet.mintBalances;
        let total = 0;
        const balanceMap = new Map<string, number>();
        
        for (const [mintUrl, balance] of Object.entries(balances)) {
          balanceMap.set(mintUrl, balance);
          total += balance;
        }
        return balanceMap;
      } catch (error) {
        console.error('Error getting mint balances:', error);
        return new Map();
      }
    }
  • MCP server tool call handler that invokes wallet.getMintBalances() and formats the response as text for MCP protocol.
    case 'get_mint_balances':
      const balances = await this.wallet.getMintBalances();
      let balanceText = 'Balance per mint:\n';
      let total = 0;
      for (const [mintUrl, balance] of balances) {
        balanceText += `  ${mintUrl}: ${balance} sats\n`;
        total += balance;
      }
      balanceText += `Total: ${total} sats`;
      return { content: [{ type: 'text', text: balanceText }] };
  • wallet.ts:540-548 (registration)
    Registration of the get_mint_balances tool in the static tools list returned by listTools handler.
    {
      name: 'get_mint_balances', 
      description: 'Get balance breakdown per mint',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      }
    },
  • Input schema for the get_mint_balances tool, defining an empty object with no required properties.
    inputSchema: {
      type: 'object',
      properties: {},
      required: []
    }
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. It states what the tool does but doesn't describe behavioral traits such as whether it's read-only, requires authentication, has rate limits, or what the output format looks like. This is inadequate for a tool with zero annotation coverage.

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 with no wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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?

Given the complexity (a read operation with no parameters) and the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'balance breakdown' entails, the return format, or any behavioral context, leaving gaps for the agent to understand the tool fully.

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 0 parameters, and the schema description coverage is 100%, so no parameter information is needed. The description doesn't add parameter semantics, but this is acceptable given the lack of parameters, aligning with the baseline for 0 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 'Get' and the resource 'balance breakdown per mint', making the purpose understandable. However, it doesn't differentiate from the sibling tool 'get_balance', which could cause confusion about when to use each tool.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_balance' or other siblings. The description lacks context about prerequisites, timing, or exclusions, leaving the agent without usage direction.

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/pablof7z/mcp-money'

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