Skip to main content
Glama
openSVM

DexScreener MCP Server

by openSVM

get_pairs_by_token_addresses

Retrieve DEX trading pairs using token addresses to analyze liquidity and market data across multiple blockchains.

Instructions

Get one or multiple pairs by token address (max 30)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenAddressesYesComma-separated token addresses

Implementation Reference

  • The core handler function in DexScreenerService that fetches pairs data from the DexScreener API endpoint `/latest/dex/tokens/${tokenAddresses}` using the internal fetch method with appropriate rate limiting.
    async getPairsByTokenAddresses({ tokenAddresses }: TokenParams): Promise<DexResponse> {
      return this.fetch<DexResponse>(
        `/latest/dex/tokens/${tokenAddresses}`,
        dexRateLimiter
      );
    }
  • MCP tool registration schema defining the input schema for get_pairs_by_token_addresses, specifying tokenAddresses as a required string parameter.
    get_pairs_by_token_addresses: {
      description: 'Get one or multiple pairs by token address (max 30)',
      inputSchema: {
        type: 'object',
        properties: {
          tokenAddresses: {
            type: 'string',
            description: 'Comma-separated token addresses',
          },
        },
        required: ['tokenAddresses'],
      },
    },
  • src/index.ts:331-335 (registration)
    Registration and dispatch logic in the MCP CallToolRequest handler that casts arguments and calls the DexScreenerService.getPairsByTokenAddresses method.
    case 'get_pairs_by_token_addresses': {
      const args = request.params.arguments as { tokenAddresses: string };
      result = await this.dexService.getPairsByTokenAddresses(args);
      break;
    }
  • TypeScript type definition for TokenParams used as input type in the handler function, matching the MCP input schema.
    export type TokenParams = {
      tokenAddresses: string; // Comma-separated addresses
    };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions a limit ('max 30'), which is useful context, but lacks other critical details such as whether this is a read-only operation, potential rate limits, error handling, or the format of returned data. The description is minimal and leaves significant behavioral aspects unspecified.

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 directly states the tool's purpose and a key constraint ('max 30'). It is front-loaded with essential information and contains no unnecessary words or redundancy.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is insufficiently complete. It omits details about the return format (e.g., what data fields are included for pairs), error conditions, or dependencies. For a tool with one parameter but no structured output documentation, more context is needed to guide effective use.

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

Parameters3/5

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

The input schema has 100% description coverage, with the parameter 'tokenAddresses' documented as 'Comma-separated token addresses'. The description adds no additional semantic information beyond what the schema provides, such as examples or constraints on address format. Baseline score of 3 is appropriate since the schema adequately covers the parameter.

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 action ('Get') and resource ('one or multiple pairs'), with the specific mechanism 'by token address'. It distinguishes from siblings like 'get_pairs_by_chain_and_address' by focusing solely on token addresses. However, it doesn't explicitly differentiate from 'search_pairs' which might also involve token addresses.

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 like 'get_pairs_by_chain_and_address' or 'search_pairs'. It mentions a constraint ('max 30') but doesn't explain why this tool is preferred over others for fetching pairs by token addresses.

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/openSVM/dexscreener-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server