get_project_data
Retrieve detailed cryptocurrency project information using token symbols. Access raw JSON data from Mobula API for insights on specific tokens like BTC or ETH.
Instructions
Fetch cryptocurrency project data from Mobula API.
Args:
token_symbol (str): The symbol of the cryptocurrency token (e.g., 'BTC', 'ETH')
Returns:
dict: Raw JSON response from Mobula API containing project details
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token_symbol | Yes |
Implementation Reference
- main.py:11-33 (handler)The handler function for the 'get_project_data' tool, decorated with @mcp.tool() for registration. It fetches project data from the Mobula API using the provided token symbol, handles errors, and returns a JSON dict.@mcp.tool() async def get_project_data(token_symbol: str) -> dict: """ Fetch cryptocurrency project data from Mobula API. Args: token_symbol (str): The symbol of the cryptocurrency token (e.g., 'BTC', 'ETH') Returns: dict: Raw JSON response from Mobula API containing project details """ async with httpx.AsyncClient() as client: try: # Construct API URL with token symbol url = f"https://production-api.mobula.io/api/1/metadata?asset={token_symbol}" response = await client.get(url) response.raise_for_status() # Raise exception for non-200 status return response.json() except httpx.HTTPStatusError as e: return {"error": f"API request failed: {str(e)}"} except Exception as e: return {"error": f"Unexpected error: {str(e)}"}