Skip to main content
Glama

listSupportedChains

Retrieve all supported blockchain networks for Chainlink price feeds to verify compatibility before querying data.

Instructions

Returns a comma-separated list of all supported blockchain networks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'listSupportedChains' tool. It extracts chain names from feedsData JSON using Object.keys and joins them into a comma-separated string, returning it as text content. Includes error handling.
    async () => { try { // Get all chain names as comma-separated string const chains = Object.keys(feedsData).join(','); return { content: [{ type: 'text', text: chains }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error.message}` }], isError: true }; } }
  • Zod schema definition for the 'listSupportedChains' tool, specifying no input parameters are required.
    const listSupportedChainsSchema = z.object({}).describe('No parameters required');
  • index.js:161-186 (registration)
    Registration of the 'listSupportedChains' tool via server.tool method, providing name, description, schema, and inline handler function.
    server.tool( 'listSupportedChains', 'Returns a comma-separated list of all supported blockchain networks', listSupportedChainsSchema, async () => { try { // Get all chain names as comma-separated string const chains = Object.keys(feedsData).join(','); return { content: [{ type: 'text', text: chains }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error.message}` }], isError: true }; } } );

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/kukapay/chainlink-feeds-mcp'

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