Skip to main content
Glama

get_defi_protocol_endpoints

Retrieve endpoints for DeFi Protocol Analytics to access TVL data, yield farming metrics, protocol fees, and ecosystem statistics. Enables comprehensive analysis of DeFi platforms using Hive Intelligence.

Instructions

Get all endpoints in the "DeFi Protocol Analytics" category. Endpoints for comprehensive DeFi protocol analysis including Total Value Locked (TVL) data, protocol listings, chain-specific TVL metrics, historical TVL tracking across all chains, protocol fee analysis, yield farming analytics with APY data, detailed protocol information, comprehensive DeFi ecosystem statistics, blockchain network TVL tracking, yield pool management and historical charts, and protocol fee structures across different DeFi platforms.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Defines the registry entry for the 'get_defi_protocol_endpoints' tool, including its category, description, and list of supported sub-tools.
      "category": "DeFi Protocol Analytics",
      "name": "get_defi_protocol_endpoints",
      "description": "Endpoints for comprehensive DeFi protocol analysis including Total Value Locked (TVL) data, protocol listings, chain-specific TVL metrics, historical TVL tracking across all chains, protocol fee analysis, yield farming analytics with APY data, detailed protocol information, comprehensive DeFi ecosystem statistics, blockchain network TVL tracking, yield pool management and historical charts, and protocol fee structures across different DeFi platforms.",
      "tools": [
        // "get_protocols_browser",defi
        // "get_protocol_tvl_browser",defi
        // "get_chain_tvl_browser", defi
        // "get_stablecoins_browser",defi
        // "get_stablecoin_data_browser",defi
        "protocol_info",
        "protocol_list",
        "global_defi_data",
        "defi_protocols_list",
        "defi_protocol_details", 
        "protocol_tvl_current",
        "protocol_fees_data", 
        "blockchain_chains_list",
        "chain_tvl_history",
        "chains_tvl_historical_all",
        "yield_pools_list",
        "yield_pool_details",
        "yield_pool_chart_history",
        "protocol_fees_overview",
        "chain_fees_overview", 
      ]
    },
  • Dynamically creates the MCP tool 'get_defi_protocol_endpoints' (and others) from ToolRegistry. The handler retrieves the list of tools in the DeFi category, extracts their names and descriptions, and formats the response.
    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];
  • Helper function used by the handler to filter and retrieve the full tool definitions (from supportedTools) that match the names listed in the DeFi category.
    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;
    }
  • Defines the empty input schema for category listing tools like 'get_defi_protocol_endpoints' (no parameters required).
    const categorySchema = z.object({});
  • Helper function that formats the handler's result into 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 the full burden of behavioral disclosure. It describes what the tool returns (endpoints in a category) but lacks details on behavior: it doesn't mention if this is a read-only operation, potential rate limits, authentication needs, or the format of the returned data. For a tool with zero annotation coverage, this is a significant gap in transparency.

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. The first sentence states the purpose clearly, but the rest is a long, repetitive list of endpoint types (e.g., 'TVL data, protocol listings, chain-specific TVL metrics...') that doesn't add value beyond the initial category definition. This wastes space and reduces clarity.

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 complexity (a tool to retrieve endpoints) and lack of annotations and output schema, the description is incomplete. It explains what the tool does but fails to cover behavioral aspects like response format, error handling, or operational constraints. For a tool with no structured data support, more context is needed to be fully helpful.

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 input schema has 0 parameters with 100% coverage, so no parameters need documentation. The description doesn't add parameter information, but this is acceptable given the schema's completeness. A baseline of 4 is appropriate as the description doesn't need to compensate for any gaps, and it avoids misleading param details.

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 "DeFi Protocol Analytics" category.' It specifies the verb ('Get') and resource ('endpoints') with a clear category scope. However, it doesn't explicitly differentiate from sibling tools like 'get_token_contract_endpoints' or 'get_onchain_dex_pool_endpoints' beyond the category name, which is why it doesn't reach a perfect score.

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 the types of endpoints included but doesn't mention sibling tools or specify scenarios where this tool is preferred over others, such as for DeFi-specific analytics versus general market data. This leaves the agent without explicit usage context.

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