Skip to main content
Glama
kukapay

chainlink-feeds-mcp

listSupportedFeedsByChain

Get available Chainlink price feeds for a specific blockchain network to identify supported data sources for decentralized applications.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that destructures the 'chain' parameter, validates it using the schema, retrieves the list of feed names from feedsData for that chain, joins them into a comma-separated string, and returns it as text content. 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 defining the input parameters for the tool: an object with a required 'chain' string that must correspond to a key in feedsData (validated via refine). Includes description.
    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)
    Registers the 'listSupportedFeedsByChain' tool with the MCP server via server.tool(), providing the tool name, description, input schema, and inline asynchronous 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
          };
        }
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns a comma-separated list, which is useful, but it doesn't cover other behavioral aspects such as error handling, rate limits, or authentication requirements. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the key information ('Returns a comma-separated list of price feed names') without any wasted words. It is appropriately sized for the tool's simplicity and zero parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters, no annotations, and no output schema, the description is minimally adequate. It explains what the tool does but lacks details on behavioral traits, usage context, or output format beyond 'comma-separated list'. For a tool in a set with siblings like 'listSupportedFeeds', more context on differentiation would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so the schema already documents this fully. The description adds no parameter information, but with no parameters, the baseline is 4 as it doesn't need to compensate for any gaps. It implies a blockchain network is specified, but this is not reflected in the input schema, which might be a minor oversight.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Returns') and resource ('comma-separated list of price feed names'), and it specifies the target ('for a specified blockchain network'). However, it doesn't explicitly differentiate from sibling tools like 'listSupportedFeeds' or 'listSupportedChains', which appears to be a related functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'listSupportedFeeds' or 'listSupportedChains', nor does it specify prerequisites or exclusions for usage, leaving the agent to infer context from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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