Skip to main content
Glama

get_eth_trend

Analyze Ethereum's price and network activity trends over the past three months with historical data on active and new addresses.

Instructions

Get the ETH trend chart for the past three months. Format: [[date, price, active addresses, new addresses]]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that fetches and returns the ETH trend data from the Desk3 API endpoint.
    async def get_eth_trend() -> list[list]: """ Get the ETH trend chart for the past three months. :return: List of [date, price, active addresses, new addresses] """ url = 'https://mcp.desk3.io/v1/market/eth/trend' try: return request_api('get', url) except Exception as e: raise RuntimeError(f"Failed to fetch ETH trend data: {e}")
  • JSON schema definition for the get_eth_trend tool in the list_tools handler, specifying no required input parameters.
    types.Tool( name="get_eth_trend", description="Get the ETH trend chart for the past three months. Format: [[date, price, active addresses, new addresses]]", inputSchema={ "type": "object", "properties": {}, "required": [], }, ),
  • Registration and execution logic for the get_eth_trend tool in the handle_call_tool function.
    case "get_eth_trend": try: data = await get_eth_trend() return [ types.TextContent( type="text", text=json.dumps(data, indent=2), ) ] except Exception as e: raise RuntimeError(f"Failed to fetch ETH trend data: {e}")
  • Helper function used by get_eth_trend to make authenticated API requests to the Desk3 service.
    def request_api(method: str, url: str, params: dict = None, data: dict = None) -> any: headers = { 'Accepts': 'application/json', 'X-DESK3_PRO_API_KEY': API_KEY, } try: logging.info(f"Requesting {method.upper()} {url} params={params} data={data}") if method.lower() == 'get': response = requests.get(url, headers=headers, params=params) elif method.lower() == 'post': response = requests.post(url, headers=headers, json=data) else: raise ValueError(f"Unsupported HTTP method: {method}") response.raise_for_status() logging.info(f"Response {response.status_code} for {url}") return json.loads(response.text) except Exception as e: logging.error(f"Error during {method.upper()} {url}: {e}") raise

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/desk3/cryptocurrency-mcp-server'

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