listSupportedFeeds
Retrieve a Markdown-formatted list of all supported chains and their associated price feed names to integrate decentralized on-chain price data into AI agents and systems.
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 asynchronous handler function that implements the core logic for the 'listSupportedFeeds' tool. It generates a Markdown-formatted list of all supported chains and their price feeds using 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)The 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)The server.tool call that registers the 'listSupportedFeeds' tool with its name, description, schema, and inline 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 }; } } );