Skip to main content
Glama

coingeckotokeninfoagent_get_trending_pools

Retrieve trending on-chain pools with token data from CoinGecko. Specify attributes like base_token, quote_token, dex, or network. Supports fetching 1 to 10 pools for detailed insights.

Instructions

Get up to 10 trending on-chain pools with token data from CoinGecko. The 'include' parameter must be one of: base_token, quote_token, dex, or network.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeNoSingle attribute to include: base_token, quote_token, dex, or networkbase_token
poolsNoNumber of pools to return (1-10)

Implementation Reference

  • MCP call_tool handler that dispatches to the specific agent's tool via execute_tool based on the tool name (e.g., coingeckotokeninfoagent_get_trending_pools).
    async def call_tool(name: str, arguments: dict) -> List[types.TextContent]:
        """Call the specified tool with the given arguments."""
        try:
            if name not in self.tool_registry:
                raise ValueError(f"Unknown tool: {name}")
    
            tool_info = self.tool_registry[name]
            result = await self.execute_tool(
                agent_id=tool_info["agent_id"],
                tool_name=tool_info["tool_name"],
                tool_arguments=arguments,
            )
    
            # Convert result to TextContent
            return [types.TextContent(type="text", text=str(result))]
        except Exception as e:
            logger.error(f"Error calling tool {name}: {e}")
            raise ValueError(f"Failed to call tool {name}: {str(e)}") from e
  • Executes the proxied tool call by POSTing to the Mesh API endpoint with the agent_id (coingeckotokeninfoagent) and tool_name (get_trending_pools).
    async def execute_tool(
        self, agent_id: str, tool_name: str, tool_arguments: Dict[str, Any]
    ) -> Dict[str, Any]:
        """Execute a tool on a mesh agent.
    
        Args:
            agent_id: ID of the agent to execute the tool on
            tool_name: Name of the tool to execute
            tool_arguments: Arguments to pass to the tool
    
        Returns:
            Tool execution result
    
        Raises:
            ToolExecutionError: If there's an error executing the tool
        """
        request_data = {
            "agent_id": agent_id,
            "input": {"tool": tool_name, "tool_arguments": tool_arguments},
        }
    
        # Add API key if available
        if Config.HEURIST_API_KEY:
            request_data["api_key"] = Config.HEURIST_API_KEY
    
        try:
            result = await call_mesh_api(
                "mesh_request", method="POST", json=request_data
            )
            return result.get("data", result)  # Prefer the 'data' field if it exists
        except MeshApiError as e:
            # Re-raise API errors with clearer context
            raise ToolExecutionError(str(e)) from e
        except Exception as e:
            logger.error(f"Error calling {agent_id} tool {tool_name}: {e}")
            raise ToolExecutionError(
                f"Failed to call {agent_id} tool {tool_name}: {str(e)}"
            ) from e
  • Configuration defining default supported agents, including CoinGeckoTokenInfoAgent from which the get_trending_pools tool is loaded.
    # Default supported agents
    DEFAULT_AGENTS = [
        "CoinGeckoTokenInfoAgent",
        "DexScreenerTokenInfoAgent",
        "ElfaTwitterIntelligenceAgent",
        "ExaSearchAgent",
        "TwitterInfoAgent",
        "AIXBTProjectInfoAgent",
        "EtherscanAgent",
        "EvmTokenInfoAgent",
        "FundingRateAgent",
        "UnifaiTokenAnalysisAgent",
        "YahooFinanceAgent",
        "ZerionWalletAnalysisAgent"
    ]
  • Dynamically registers tools from agent metadata into tool_registry using tool_id = '{agent_id.lower()}_{tool_name}' (produces 'coingeckotokeninfoagent_get_trending_pools') and stores schema, description, etc.
    for tool in agent_data.get("tools", []):
        if tool.get("type") == "function":
            function_data = tool.get("function", {})
            tool_name = function_data.get("name")
    
            if not tool_name:
                continue
    
            # Create a unique tool ID
            tool_id = f"{agent_id.lower()}_{tool_name}"
    
            # Get parameters or create default schema
            parameters = function_data.get("parameters", {})
            if not parameters:
                parameters = {
                    "type": "object",
                    "properties": {},
                    "required": [],
                }
    
            # Store tool info
            tool_registry[tool_id] = {
                "agent_id": agent_id,
                "tool_name": tool_name,
                "description": function_data.get("description", ""),
                "parameters": parameters,
            }
  • Loads the input schema (parameters) for the tool from the remote agent metadata.
    parameters = function_data.get("parameters", {})
    if not parameters:
        parameters = {
            "type": "object",
            "properties": {},
            "required": [],
        }
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 mentions the data source (CoinGecko) and that it returns 'up to 10' pools, but lacks details on rate limits, authentication needs, error handling, or the structure of the returned data (e.g., what fields are included beyond the 'include' parameter). For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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, efficient sentence that front-loads the core purpose and includes essential parameter guidance. Every word serves a purpose, with no redundancy or unnecessary elaboration, making it easy to parse quickly.

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

Completeness3/5

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

Given the tool's moderate complexity (2 parameters, no annotations, no output schema), the description is adequate but incomplete. It covers the purpose and basic parameter constraints but lacks details on behavioral aspects (e.g., data freshness, error cases) and output format, which are important for an agent to use it effectively without annotations or output schema.

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?

The schema description coverage is 100%, so the schema already fully documents both parameters ('include' and 'pools'). The description adds minimal value by restating the 'include' parameter options and noting the range for 'pools', but does not provide additional context like why to choose specific 'include' values or how they affect the output. This meets the baseline for high schema coverage.

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 verb 'Get' and the resource 'up to 10 trending on-chain pools with token data from CoinGecko', specifying both the action and scope. It distinguishes from siblings like 'get_trending_coins' (which focuses on coins rather than pools) and 'get_token_info' (which retrieves individual token data rather than trending pools).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: to retrieve trending pools with token data from CoinGecko. It does not explicitly state when not to use it or name specific alternatives, but the sibling tools (e.g., 'get_trending_coins' for coins, 'get_token_info' for individual tokens) imply different use cases, though this is not directly addressed in the description.

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

Related 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/heurist-network/heurist-mesh-mcp-server'

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