Skip to main content
Glama

get_supported_networks

Retrieve a list of supported networks available on the bnbchain-mcp server for integration and development purposes.

Instructions

Get list of supported networks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for get_supported_networks tool: retrieves supported networks using getSupportedNetworks() and returns them wrapped in mcpToolRes.success.
    async () => { try { const networks = getSupportedNetworks() return mcpToolRes.success({ supportedNetworks: networks }) } catch (error) { return mcpToolRes.error(error, "fetching supported networks") } }
  • Registers the get_supported_networks tool on the MCP server with description, empty input schema {}, and inline handler function.
    server.tool( "get_supported_networks", "Get list of supported networks", {}, async () => { try { const networks = getSupportedNetworks() return mcpToolRes.success({ supportedNetworks: networks }) } catch (error) { return mcpToolRes.error(error, "fetching supported networks") } } )
  • Core implementation: extracts keys from networkNameMap, filters out short aliases (length > 2), sorts, and returns the list of supported network names.
    export function getSupportedNetworks(): string[] { return Object.keys(networkNameMap) .filter((name) => name.length > 2) // Filter out short aliases .sort() }

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/bnb-chain/bnbchain-mcp'

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