Skip to main content
Glama

DEX Dataset Statistics

dex_stats

Retrieve DEX trading statistics including total trades, pairs tracked, chains, protocols covered, and last update timestamp.

Instructions

Get statistics about the DEX trading dataset: total trades, pairs tracked, chains and protocols covered, last updated. Free endpoint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the dex_stats tool. Calls GET /api/v1/dex/stats and returns JSON-formatted dataset statistics (total trades, pairs tracked, chains, protocols, last updated). No input parameters required.
      async () => {
        const res = await apiGet<DexStatsResponse>("/api/v1/dex/stats");
    
        if (!res.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
              },
            ],
            isError: true,
          };
        }
    
        return {
          content: [
            { type: "text" as const, text: JSON.stringify(res.data, null, 2) },
          ],
        };
      },
    );
  • TypeScript interface DexStatsResponse defining the response shape: dataset name, source, update_frequency, and stats (a generic record).
    interface DexStatsResponse {
      dataset: string;
      source: string;
      update_frequency: string;
      stats: Record<string, unknown>;
    }
  • Registration of dex_stats tool on the MCP server via server.registerTool(). Name: 'dex_stats', title: 'DEX Dataset Statistics', description mentions it's a free endpoint. Input schema is empty (no params).
    server.registerTool(
      "dex_stats",
      {
        title: "DEX Dataset Statistics",
        description:
          "Get statistics about the DEX trading dataset: total trades, pairs tracked, " +
          "chains and protocols covered, last updated. Free endpoint.",
        inputSchema: {},
      },
  • src/index.ts:52-52 (registration)
    Top-level registration: registerDexTools(server) called in index.ts to wire up all DEX tools including dex_stats.
    registerDexTools(server);
Behavior3/5

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

No annotations are provided, so the description carries the full burden. The term 'Get' implies a read-only operation, and a stat endpoint with no parameters is inherently low risk. However, the description does not explicitly state that no data is mutated, nor does it discuss rate limits or authentication. It is adequate but lacks explicit assurances.

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?

The description is a single sentence that front-loads the key purpose (statistics about DEX dataset) and includes specific details. No unnecessary words or repetitions; every phrase earns its place.

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?

For a simple stat tool with no parameters and no output schema, the description provides a reasonable list of what the response includes (total trades, pairs tracked, etc.). It does not specify the response format or structure, but given the simplicity, it is mostly complete. Adding a note about the response type (e.g., JSON object) would elevate it to a 5.

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

Parameters4/5

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

There are no parameters, so the input schema is effectively fully covered. The description does not need to explain parameters beyond what the schema shows. With zero parameters, a baseline of 4 is appropriate, and the description adds no misleading information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves statistics about the DEX trading dataset, listing specific items (total trades, pairs tracked, etc.), and includes the qualifier 'Free endpoint'. This verb ('Get') and resource ('statistics about the DEX trading dataset') are precise, and the context differentiates it from sibling stats tools like contract_stats or crypto_stats.

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 provides no guidance on when to use this tool versus alternatives such as dex_changes or query_dex_trades. The only extra note is 'Free endpoint', which addresses cost but not usage context or conditions. An agent has no way to distinguish when to call this tool over similar stat tools.

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