Skip to main content
Glama

query_holders

Identify top token holders by analyzing wallet addresses, balances, percentage of supply, and holder labels like exchanges or whales for any token contract.

Instructions

Get the top holders for a token contract address. Returns wallet addresses, balances, percentage of supply, and holder labels (exchange, whale, contract). Cost: $0.04 per query. Source: On-chain token analytics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesToken contract address (e.g. 0xdAC17F958D2ee523a2206206994597C13D831ec7)
chainNoBlockchain network (default: ethereum)
limitNoMaximum results (default 25)

Implementation Reference

  • The handler logic for the "query_holders" tool, which fetches holder data from the API and formats it for the MCP response.
    async ({ token, chain, limit }) => {
      const res = await apiGet<HolderQueryResponse>(
        `/api/v1/holders/${encodeURIComponent(token)}`,
        {
          chain,
          limit: limit ?? 25,
        },
      );
    
      if (!res.ok) {
        return {
          content: [
            {
              type: "text" as const,
              text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
            },
          ],
          isError: true,
        };
      }
    
      const { count, data } = res.data;
      const warn = stalenessWarning(res);
      const summary = `${warn}Found ${count} holder(s) for token ${token}.`;
      const json = JSON.stringify(data, null, 2);
    
      return {
        content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
      };
    },
  • The tool registration and schema definition for "query_holders".
    server.registerTool(
      "query_holders",
      {
        title: "Query Top Holders",
        description:
          "Get the top holders for a token contract address. Returns wallet addresses, " +
          "balances, percentage of supply, and holder labels (exchange, whale, contract). " +
          "Cost: $0.04 per query. Source: On-chain token analytics.",
        inputSchema: {
          token: z
            .string()
            .describe("Token contract address (e.g. 0xdAC17F958D2ee523a2206206994597C13D831ec7)"),
          chain: z
            .enum(["ethereum", "arbitrum", "polygon", "base", "bsc"])
            .optional()
            .describe("Blockchain network (default: ethereum)"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 25)"),
        },
      },

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/carrierone/verilexdata-mcp'

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