Skip to main content
Glama

get_onchain_dex_pool_endpoints

Access endpoints for on-chain DEX and pool analytics to analyze liquidity, trading pairs, OHLCV data, trader statistics, and trading activity across multiple networks and protocols. Gain insights into decentralized exchange ecosystems and trading metrics.

Instructions

Get all endpoints in the "On-Chain DEX & Pool Analytics" category. Endpoints for analyzing decentralized exchange pools, liquidity data, trading pairs, DEX rankings, pool filtering, trending pools, OHLCV data for pools/tokens, trading volume analysis, comprehensive on-chain trading metrics across multiple networks and DEXs, real-time DEX trading analytics, advanced token trading intelligence with DEXScreener-style metrics, trader statistics (makers, buyers, sellers), aggregated trading data by tokens, volume breakdowns, trading activity analysis, exchange platform analysis, comprehensive exchange ecosystem metrics including user statistics, DEX volume analytics across protocols and chains, and options trading analytics with protocol-specific data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Dynamic creation of the 'get_onchain_dex_pool_endpoints' tool including its handler function. The handler fetches tools for the 'On-Chain DEX & Pool Analytics' category using getAllToolsInCategory and returns a formatted list of tool names and descriptions.
    const categoryTools = ToolRegistry.map(category => {
      const categorySchema = z.object({});
      
      const categoryEndpointName = category.name;
      
      return {
        metadata: {
          resource: 'dynamic_tools',
          operation: 'read' as const,
          tags: ['category'],
        },
        tool: {
          name: categoryEndpointName,
          description: `Get all endpoints in the "${category.category}" category. ${category.description}`,
          inputSchema: zodToInputSchema(categorySchema),
        },
        handler: async (
          args: Record<string, unknown> | undefined,
        ): Promise<any> => {
          const toolsInCategory = getAllToolsInCategory(category.category);
          
          return asTextContentResult({
            category: category.category,
            description: category.description,
            tools: toolsInCategory.map((tool ) => ({
              name: tool.name,
              description: tool.description
            })),
          });
        },
      };
    });
    
    return [getEndpointTool, callEndpointTool, ...categoryTools];
  • Registry entry defining the 'get_onchain_dex_pool_endpoints' category name, description, and list of underlying tools it aggregates.
    {
      "category": "On-Chain DEX & Pool Analytics",
      "name": "get_onchain_dex_pool_endpoints",
      "description": "Endpoints for analyzing decentralized exchange pools, liquidity data, trading pairs, DEX rankings, pool filtering, trending pools, OHLCV data for pools/tokens, trading volume analysis, comprehensive on-chain trading metrics across multiple networks and DEXs, real-time DEX trading analytics, advanced token trading intelligence with DEXScreener-style metrics, trader statistics (makers, buyers, sellers), aggregated trading data by tokens, volume breakdowns, trading activity analysis, exchange platform analysis, comprehensive exchange ecosystem metrics including user statistics, DEX volume analytics across protocols and chains, and options trading analytics with protocol-specific data.",
      "tools": [
        "onchain_categories_browser",
        "pools_onchain_categories_browser", 
        "networks_onchain_new_pools_browser",
        "network_networks_onchain_new_pools_browser",
        "networks_onchain_trending_pools_browser",
        "network_networks_onchain_trending_pools_browser",
        "networks_onchain_dexes_browser",
        "pools_networks_onchain_dexes_browser",
        "networks_onchain_pools_browser",
        "address_networks_onchain_pools_browser",
        "pools_networks_onchain_info_browser",
        "timeframe_pools_networks_onchain_ohlcv_browser",
        "pools_networks_onchain_trades_browser",
        "timeframe_tokens_networks_onchain_ohlcv_browser",
        "tokens_networks_onchain_pools_browser", 
        "tokens_networks_onchain_trades_browser",
        "pools_onchain_megafilter_browser",
        "pools_onchain_trending_search_browser",
        "search_onchain_pools_browser",
        "addresses_networks_simple_onchain_token_price_browser",
        "retrieve_token_transactions",
        "fetch_trading_pair_metrics",
        "fetch_multiple_pairs_metrics", 
        "search_filter_pairs",
        "fetch_pair_information",
        "list_token_pairs",
        "fetch_token_pairs_details",
        "retrieve_liquidity_information",
        "fetch_liquidity_lock_details",
        "search_exchange_platforms",
        "describe_onchain_transaction",
        "exchanges_data",
        "exchange_details",
        "exchange_tickers_data", 
        "exchange_volume_chart",
        "exchange_volume_chart_range",
        "derivatives_tickers_data",
        "derivatives_exchanges_data",
        "derivative_exchange_details",
        "network_trending_pools",
        "multi_pools_data",
        "network_exchanges_list",
        "pair_chart_metadata",
        // "token_liquidity_metadata", // not working (getting something went wrong)
        "dex_volumes_overview",
        "dex_volume_specific",
        "dex_volumes_chain_specific", 
        "options_trading_overview",
        "options_trading_by_chain",
        "options_protocol_summary", 
      ]
    },
  • Helper function called by the handler to retrieve the list of supported tools matching the names in the category's tools array.
    export function getAllToolsInCategory(category: string){
      let categoryUsed = ToolRegistry.find(tool => tool.category === category);
      if(!categoryUsed){
        return []
      }
      const allWrappedTools = supportedTools
      // return all the tools from wrapped tools that are in the category (name match)
      let toolsInCategory = [];
      for (const tool of categoryUsed.tools){
        const wrappedTool = allWrappedTools.find(wrappedTool => wrappedTool.name === tool);
        if(wrappedTool){
          toolsInCategory.push(wrappedTool);
        }
        else console.log(`Tool ${tool} not found in wrapped tools`);
      }
      return toolsInCategory;
    }
  • Helper function used by the handler to format the result as MCP text content, with truncation for large responses.
    export function asTextContentResult(result: Object): any {
      // return {data: result}
      // Estimate token count (roughly 4 chars per token)
      const MAX_TOKENS = 25000;
      const CHARS_PER_TOKEN = 4;
      const maxChar = MAX_TOKENS * CHARS_PER_TOKEN; // ~100,000 chars for 25k tokens
      
      const jsonString = JSON.stringify(result, null, 2);
      
      if (jsonString.length > maxChar) {
        // Try to intelligently truncate if it's an array
        if (Array.isArray(result)) {
          const truncatedArray = result.slice(0, Math.floor(result.length * maxChar / jsonString.length));
          const truncatedJson = JSON.stringify({
            results: truncatedArray,
            truncated: true,
            originalLength: result.length,
            returnedLength: truncatedArray.length,
            message: "Response truncated due to size limits. Consider using pagination."
          }, null, 2);
          
          return {
            content: [
              {
                type: 'text',
                text: truncatedJson,
              },
            ],
          };
        }
        
        // For objects with results array
        if (typeof result === 'object' && result !== null && 'results' in result && Array.isArray((result as any).results)) {
          const originalResults = (result as any).results;
          const estimatedItemSize = jsonString.length / originalResults.length;
          const maxItems = Math.floor(maxChar / estimatedItemSize);
          
          const truncatedResult = {
            ...result,
            results: originalResults.slice(0, maxItems),
            truncated: true,
            originalCount: originalResults.length,
            returnedCount: maxItems,
            message: "Response truncated due to size limits. Use pagination parameters (limit/offset) for more results."
          };
          
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(truncatedResult, null, 2),
              },
            ],
          };
        }
        
        // Fallback to simple truncation
        const truncated = jsonString.substring(0, maxChar) + '\n... [TRUNCATED DUE TO SIZE LIMITS]';
        return {
          content: [
            {
              type: 'text',
              text: truncated,
            },
          ],
        };
      }
      
      return {
        content: [
          {
            type: 'text',
            text: jsonString,
          },
        ],
      };
    }
Behavior2/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 describes what data is included (e.g., liquidity data, trading pairs, OHLCV) but lacks behavioral details: no mention of permissions needed, rate limits, pagination, error handling, or response format. For a tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is overly verbose and poorly structured. It starts with a clear purpose but devolves into a run-on list of analytics features (e.g., 'DEXScreener-style metrics', 'options trading analytics') that don't add value beyond the initial category definition. Sentences are not front-loaded with essential information.

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

Completeness2/5

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

Given the tool's complexity (broad analytics scope) and lack of annotations/output schema, the description is incomplete. It catalogs data types but omits critical context: how results are returned, any limitations, or error scenarios. For a tool with rich data potential, this leaves too many unknowns for an agent.

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?

The tool has 0 parameters, and schema description coverage is 100% (empty schema). With no parameters to document, the baseline is 4. The description doesn't need to compensate for any parameter gaps, so it meets expectations.

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's purpose: 'Get all endpoints in the "On-Chain DEX & Pool Analytics" category.' It specifies the resource (endpoints) and category scope, distinguishing it from siblings like 'get_defi_protocol_endpoints' or 'get_market_and_price_endpoints'. However, it doesn't explicitly contrast with all siblings, so it's not a perfect 5.

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. It lists many analytics capabilities but doesn't specify prerequisites, exclusions, or compare to sibling tools like 'get_defi_protocol_endpoints' for similar data. Usage is implied by the category name only.

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/hive-intel/hive-crypto-mcp'

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