Skip to main content
Glama

iota_wallet_balance

Check the IOTA balance of your active wallet to monitor cryptocurrency holdings and verify transaction status.

Instructions

Check IOTA balance for the active wallet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the iota_wallet_balance tool, which calls the wallet helper function with the /balance endpoint.
    server.tool(
      "iota_wallet_balance",
      "Check IOTA balance for the active wallet",
      {},
      async () => text(await wallet("/balance"))
    );
  • Helper function that executes the actual API request to the wallet server.
    async function wallet(path: string, method = "GET", body?: unknown): Promise<string> {
      try {
        const opts: RequestInit = {
          method,
          headers: { "Content-Type": "application/json" },
        };
        if (body) opts.body = JSON.stringify(body);
        const res = await fetch(`${WALLET_SERVER}${path}`, opts);
        if (!res.ok) return `Wallet server error ${res.status}: ${res.statusText}`;
        return await res.text();
      } catch (err: any) {
        return `Wallet server unreachable (${WALLET_SERVER}): ${err.message}. Start the agent-wallet server first.`;

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/Scottcjn/iota-agent-mcp'

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