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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:165-185 (handler)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 }; } }
- index.js:158-158 (schema)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 }; } } );