Skip to main content
Glama

listSupportedFeedsByChain

Retrieve a comma-separated list of supported Chainlink price feeds for a specific blockchain network, enabling integration with AI agents and autonomous systems.

Instructions

Returns a comma-separated list of price feed names for a specified blockchain network

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that takes a chain parameter, validates it, retrieves the list of feed names from feedsData for that chain, joins them into a comma-separated string, and returns it as text content in the MCP response format. Handles errors by returning an error message.
    async ({ chain }) => { try { // Validate inputs const chainKey = chain.toLowerCase(); listSupportedFeedsByChainSchema.parse({ chain }); // Get feed names as comma-separated string const feedNames = feedsData[chainKey].feeds.map((feed) => feed.name).join(','); return { content: [{ type: 'text', text: feedNames }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error.message}` }], isError: true }; } }
  • Zod schema for the tool input, requiring a 'chain' string parameter validated against keys in feedsData (supported chains).
    const listSupportedFeedsByChainSchema = z.object({ chain: z.string().refine((val) => feedsData[val.toLowerCase()], { message: 'Unsupported chain' }).describe('The blockchain network, e.g., ethereum or base') });
  • index.js:196-225 (registration)
    MCP server.tool registration for 'listSupportedFeedsByChain', including name, description, schema reference, and inline handler function.
    server.tool( 'listSupportedFeedsByChain', 'Returns a comma-separated list of price feed names for a specified blockchain network', listSupportedFeedsByChainSchema, async ({ chain }) => { try { // Validate inputs const chainKey = chain.toLowerCase(); listSupportedFeedsByChainSchema.parse({ chain }); // Get feed names as comma-separated string const feedNames = feedsData[chainKey].feeds.map((feed) => feed.name).join(','); return { content: [{ type: 'text', text: feedNames }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error.message}` }], isError: true }; } } );

Other Tools

Related Tools

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