Skip to main content
Glama

Query Whale Wallets

query_whales

Filter whale wallets by blockchain, minimum balance, token, and activity. Returns wallet address, balance, token holdings, and last activity timestamp.

Instructions

List whale wallets filtered by blockchain, minimum balance, token, and activity. Returns wallet address, balance, token holdings, and last activity timestamp. Cost: $0.014 per query. Source: On-chain analytics, updated hourly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNoFilter by blockchain network
min_balance_usdNoMinimum wallet balance in USD
tokenNoFilter by token symbol (e.g. WETH, USDC)
sortNoSort order (default: balance)
limitNoMaximum results (default 25)

Implementation Reference

  • The async handler function for the 'query_whales' tool. Accepts optional chain, min_balance_usd, token, sort, and limit parameters, calls the Verilex API at /api/v1/whales, formats the response, and returns content with count summary and JSON data.
      async ({ chain, min_balance_usd, token, sort, limit }) => {
        const res = await apiGet<WhaleQueryResponse>("/api/v1/whales", {
          chain,
          min_balance_usd,
          token,
          sort,
          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} whale wallet(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • Input schema for 'query_whales' using Zod validators. Defines optional chain (enum of 5 chains), min_balance_usd (number), token (string), sort (enum: balance/activity/pnl), and limit (1-100 integer).
    inputSchema: {
      chain: z
        .enum(["ethereum", "arbitrum", "polygon", "base", "bsc"])
        .optional()
        .describe("Filter by blockchain network"),
      min_balance_usd: z
        .number()
        .optional()
        .describe("Minimum wallet balance in USD"),
      token: z
        .string()
        .optional()
        .describe("Filter by token symbol (e.g. WETH, USDC)"),
      sort: z
        .enum(["balance", "activity", "pnl"])
        .optional()
        .describe("Sort order (default: balance)"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(100)
        .optional()
        .describe("Maximum results (default 25)"),
    },
  • Registration of the 'query_whales' tool via server.registerTool() with title, description, inputSchema, and the handler function.
    server.registerTool(
      "query_whales",
      {
        title: "Query Whale Wallets",
        description:
          "List whale wallets filtered by blockchain, minimum balance, token, and activity. " +
          "Returns wallet address, balance, token holdings, and last activity timestamp. " +
          "Cost: $0.014 per query. Source: On-chain analytics, updated hourly.",
        inputSchema: {
          chain: z
            .enum(["ethereum", "arbitrum", "polygon", "base", "bsc"])
            .optional()
            .describe("Filter by blockchain network"),
          min_balance_usd: z
            .number()
            .optional()
            .describe("Minimum wallet balance in USD"),
          token: z
            .string()
            .optional()
            .describe("Filter by token symbol (e.g. WETH, USDC)"),
          sort: z
            .enum(["balance", "activity", "pnl"])
            .optional()
            .describe("Sort order (default: balance)"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 25)"),
        },
      },
      async ({ chain, min_balance_usd, token, sort, limit }) => {
        const res = await apiGet<WhaleQueryResponse>("/api/v1/whales", {
          chain,
          min_balance_usd,
          token,
          sort,
          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} whale wallet(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • src/index.ts:49-49 (registration)
    Top-level registration: registerWhaleTools(server) is called in the main server setup to activate all whale tools including query_whales.
    registerWhaleTools(server);
  • Helper function buildUrl used by apiGet to construct the full URL with query parameters for the API call.
    function buildUrl(
      path: string,
      params?: Record<string, string | number | undefined>,
    ): string {
      const url = new URL(path, baseUrl);
      if (params) {
        for (const [k, v] of Object.entries(params)) {
          if (v !== undefined && v !== "") {
            url.searchParams.set(k, String(v));
          }
        }
      }
      return url.toString();
    }
Behavior4/5

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

With no annotations, the description adds useful behavioral details: cost per query, source (on-chain analytics), and update frequency (hourly). It implies a read-only operation. No contradictions.

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 clear sentences plus cost and source info. All information is relevant and front-loaded. No wasted words.

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?

The description covers return fields (address, balance, token holdings, last activity), cost, and source. It omits default sort and pagination details, but the input schema handles those. Without an output schema, this is fairly complete.

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?

Schema coverage is 100%, and each parameter already has a description. The description repeats the filter categories but adds no additional meaning beyond the schema. 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 tool lists whale wallets with specific filters (blockchain, min balance, token, activity). It provides a clear verb-resource pair, but does not explicitly differentiate from sibling tools like lookup_whale or whale_changes.

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?

No guidance on when to use this tool versus alternatives (e.g., lookup_whale for individual whales). The description lists filters but does not specify context or exclusions.

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