Skip to main content
Glama

get_scarab_balance

Check SCARAB token balance for any wallet address to monitor staking and governance holdings in the Maiat Protocol.

Instructions

Get the SCARAB token balance for an address. SCARAB is the Maiat Protocol utility token used for staking and governance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesWallet address (0x...) to check SCARAB balance for

Implementation Reference

  • The MCP tool handler for 'get_scarab_balance' in the mcp-server package. It delegates to `sdk.scarab(address)`.
    async ({ address }) => {
      try {
        const data = await sdk.scarab(address);
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(data, null, 2),
            },
          ],
        };
      } catch (err) {
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                error: err instanceof Error ? err.message : String(err),
                address,
              }),
  • Registration of the 'get_scarab_balance' tool in the MCP server.
    server.tool(
      "get_scarab_balance",
      "Get the SCARAB token balance for an address. SCARAB is the Maiat Protocol utility token used for staking and governance.",
      {
        address: z
          .string()
          .describe("Wallet address (0x...) to check SCARAB balance for"),
      },
  • The core business logic function 'getScarabBalance' which interacts with the database.
    export async function getScarabBalance(walletAddress: string): Promise<number> {
      const normalized = walletAddress.toLowerCase();
      const bal = await prisma.scarabBalance.findUnique({
        where: { address: normalized },
      });
      return bal?.balance ?? 0;
    }

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/JhiNResH/maiat-protocol'

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