listSupportedFeeds
Retrieve all available blockchain networks and their corresponding price feed identifiers from Chainlink's decentralized oracle system.
Instructions
Returns a Markdown list of all supported chains and their price feed names
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:235-258 (handler)The handler function for the listSupportedFeeds tool. It generates a Markdown-formatted list of all supported chains and their available price feed names by iterating over the feedsData object.async () => { try { // Prepare Markdown list const markdownList = Object.keys(feedsData).map((chain) => { const feedNames = feedsData[chain].feeds.map((feed) => feed.name).join(','); return `- ${chain}: ${feedNames}`; }).join('\n'); return { content: [{ type: 'text', text: markdownList }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error.message}` }], isError: true }; } }
- index.js:228-228 (schema)Zod schema definition for the listSupportedFeeds tool, which requires no input parameters.const listSupportedFeedsSchema = z.object({}).describe('No parameters required');
- index.js:231-259 (registration)Registration of the listSupportedFeeds tool via server.tool(), specifying the tool name, description, input schema, and handler function.server.tool( 'listSupportedFeeds', 'Returns a Markdown list of all supported chains and their price feed names', listSupportedFeedsSchema, async () => { try { // Prepare Markdown list const markdownList = Object.keys(feedsData).map((chain) => { const feedNames = feedsData[chain].feeds.map((feed) => feed.name).join(','); return `- ${chain}: ${feedNames}`; }).join('\n'); return { content: [{ type: 'text', text: markdownList }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error.message}` }], isError: true }; } } );