Skip to main content
Glama
get_supported_chains.py1.21 kB
""" Retrieve list of blockchain networks supported by Odos. """ import json from mcp import types from ...helpers import make_odos_request from ...mcp import mcp @mcp.tool( name="get_supported_chains", description="Get all Chain IDs supported by Odos" ) async def get_supported_chains() -> list[types.TextContent]: """ Gets all supported blockchain networks from Odos API. """ try: response_data = await make_odos_request("/info/chains", method="GET") output = { "message": "Successfully fetched supported chains.", "chains": response_data.get("chains", []), "chainCount": len(response_data.get("chains", [])), } return [types.TextContent(type="text", text=json.dumps(output, indent=2))] except ConnectionError as e: return [ types.TextContent( type="text", text=f"❌ API Error in get_supported_chains: {str(e)}" ) ] except Exception as e: # pylint: disable=broad-except return [ types.TextContent( type="text", text=f"❌ Unexpected Error in get_supported_chains: {str(e)}", ) ]

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/odos-xyz/odos-mcp'

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