Skip to main content
Glama
botwallet-co

BotWallet MCP Server

by botwallet-co

botwallet_can_i_afford

Check if you have sufficient balance for a payment by showing fees, total cost, and remaining balance, and identify approval requirements before proceeding.

Instructions

Pre-flight check before paying. Shows the fee, total cost, and your balance after payment. Also warns if the payment requires owner approval or exceeds limits. Always call this before botwallet_pay if unsure about your balance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesRecipient username
amountYesAmount in USD

Implementation Reference

  • The handler for botwallet_can_i_afford which executes the affordability check via the SDK.
    async handler(args, ctx) {
      try {
        const { to, amount } = args as { to: string; amount: number };
        const result = await ctx.sdk.canIAfford({ to, amount });
        return formatResult(result);
      } catch (e) {
        return formatToolError(e);
      }
    },
  • Input schema definition for botwallet_can_i_afford.
    inputSchema: z.object({
      to: UsernameSchema.describe('Recipient username'),
      amount: AmountSchema.describe('Amount in USD'),
    }),
  • Tool registration for botwallet_can_i_afford inside the spendingTools array.
    canIAfford,

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/botwallet-co/mcp'

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