Skip to main content
Glama
kukapay

chainlink-feeds-mcp

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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
        };
      }
    }
  • 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
          };
        }
      }
    );

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