Skip to main content
Glama
openSVM

DexScreener MCP Server

by openSVM

search_pairs

Find cryptocurrency trading pairs on decentralized exchanges by entering a search query to access real-time market data across multiple blockchains.

Instructions

Search for pairs matching query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query

Implementation Reference

  • The main handler function for the 'search_pairs' tool. It fetches search results from the DexScreener API endpoint '/latest/dex/search' using the provided query parameter, applying rate limiting.
    async searchPairs({ query }: SearchParams): Promise<DexResponse> {
      return this.fetch<DexResponse>(
        '/latest/dex/search',
        dexRateLimiter,
        { q: query }
      );
    }
  • TypeScript type definition for the input parameters of the search_pairs tool, specifying the required 'query' string.
    export type SearchParams = {
      query: string;
    };
  • JSON schema definition for the search_pairs tool provided in the ListTools MCP handler, matching the SearchParams type.
    {
      name: 'search_pairs',
      description: 'Search for pairs matching query',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search query',
          },
        },
        required: ['query'],
      },
    },
  • src/index.ts:337-341 (registration)
    Registration and dispatch logic in the CallTool MCP handler switch statement, which extracts arguments and delegates to the dexService.searchPairs method.
    case 'search_pairs': {
      const args = request.params.arguments as { query: string };
      result = await this.dexService.searchPairs(args);
      break;
    }
  • src/index.ts:282-295 (registration)
    Tool registration in the ListTools MCP handler response, listing the search_pairs tool with its schema and description.
    {
      name: 'search_pairs',
      description: 'Search for pairs matching query',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search query',
          },
        },
        required: ['query'],
      },
    },
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 only states the action ('Search') without details on permissions, rate limits, pagination, or what 'matching query' entails (e.g., fuzzy vs. exact matches). This leaves significant gaps for a search tool with no structured safety or operational hints.

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 with zero waste: 'Search for pairs matching query'. It is appropriately sized and front-loaded, clearly stating the core action without unnecessary elaboration, making it easy to parse quickly.

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 complexity of a search tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'pairs' are, the search behavior, or return values, leaving the agent with insufficient context to use the tool effectively beyond the basic parameter.

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 'query' parameter documented as 'Search query'. The description adds no additional meaning beyond this, such as query syntax or examples. With high schema coverage, the baseline score of 3 is appropriate, as the schema handles the parameter documentation adequately.

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

Purpose3/5

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

The description 'Search for pairs matching query' states a clear verb ('Search') and resource ('pairs'), but it's vague about what 'pairs' refers to in this context. It doesn't distinguish from siblings like 'get_pairs_by_chain_and_address' or 'get_pairs_by_token_addresses', leaving ambiguity about the search scope or criteria.

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'get_pairs_by_chain_and_address' and 'get_pairs_by_token_addresses', the description lacks context for choosing this general search over more specific retrieval methods, offering no explicit when/when-not or alternative references.

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