Skip to main content
Glama

Query Top Holders

query_holders

Identify top token holders with wallet addresses, balances, percentage of supply, and holder labels (exchange, whale, 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 async handler function for the 'query_holders' tool. Makes an API GET request to /api/v1/holders/{token}, passes chain and limit params, and returns formatted results with holder count and JSON data.
      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}` }],
        };
      },
    );
  • Input schema for 'query_holders' using Zod validation: token (string, required), chain (enum: ethereum/arbitrum/polygon/base/bsc, optional), limit (int 1-100, optional, default 25).
      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)"),
      },
    },
  • Registration of the 'query_holders' tool via server.registerTool(), including title/description metadata, input schema, and the async handler.
    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)"),
        },
      },
      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}` }],
        };
      },
    );
  • src/index.ts:51-51 (registration)
    Top-level registration: registerHolderTools(server) is called to wire up all holder tools including 'query_holders'.
    registerHolderTools(server);
  • The apiGet helper function used by the handler to make HTTP GET requests to the Verilex API, handling response parsing and staleness headers.
    export async function apiGet<T = unknown>(
      path: string,
      params?: Record<string, string | number | undefined>,
    ): Promise<ApiResponse<T>> {
      const url = buildUrl(path, params);
    
      const headers: Record<string, string> = {
        Accept: "application/json",
        "User-Agent": "verilex-mcp-server/0.1.0",
      };
    
      // Forward x402 payment token if present in env (for paid endpoints)
      const paymentToken = process.env.VERILEX_PAYMENT_TOKEN;
      if (paymentToken) {
        headers["X-Payment-Token"] = paymentToken;
      }
    
      const res = await fetch(url, { headers });
      const data = (await res.json()) as T;
    
      const stale = res.headers.get("X-Data-Stale");
      const lastUpdated = res.headers.get("X-Data-Last-Updated");
      const ageSeconds = res.headers.get("X-Data-Age-Seconds");
    
      return {
        ok: res.ok,
        status: res.status,
        data,
        stale: stale === "true",
        lastUpdated: lastUpdated ?? undefined,
        ageSeconds: ageSeconds ? Number(ageSeconds) : undefined,
      };
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses cost and data source, but does not mention side effects, authentication, rate limits, or that the tool is read-only. The behavioral info is adequate but not comprehensive.

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?

Two sentences, front-loaded with purpose, no filler. Cost and source are efficiently appended. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description adequately covers return fields, cost, and source. However, it omits default values for chain (ethereum) and limit (25) which are in the schema but not explicitly stated. Still mostly complete for a straightforward query tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% description coverage, so the schema already documents parameters. The description does not add semantic meaning beyond the schema; it only reinforces the token parameter's purpose. Baseline 3 is appropriate.

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 'top holders for a token contract address', and lists returned fields. However, it does not explicitly differentiate from sibling tools like holder_changes or holder_concentration, though the focus on 'top holders' is distinct.

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?

The description mentions cost per query but provides no guidance on when to use this tool versus alternatives (e.g., holder_stats for summary data, holder_changes for changes). No context on prerequisites or best use cases.

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

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