search_pairs
Locate DEX pairs across blockchains by entering a search query to retrieve real-time data on token profiles and market statistics provided by DexScreener API.
Instructions
Search for pairs matching query
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query |
Implementation Reference
- src/services/dexscreener.ts:131-137 (handler)The searchPairs method in DexScreenerService class implements the core logic for searching DEX pairs via the DexScreener API, using a rate-limited fetch to the search endpoint with the provided query.async searchPairs({ query }: SearchParams): Promise<DexResponse> { return this.fetch<DexResponse>( '/latest/dex/search', dexRateLimiter, { q: query } ); }
- src/index.ts:168-180 (schema)Input schema definition for the search_pairs tool declared in the MCP server capabilities.search_pairs: { description: 'Search for pairs matching query', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query', }, }, required: ['query'], }, },
- src/index.ts:283-295 (registration)Tool registration in the listTools request handler, defining name, description, and input schema.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)Dispatch/registration in the callTool request handler switch statement, routing search_pairs calls to dexService.searchPairs.case 'search_pairs': { const args = request.params.arguments as { query: string }; result = await this.dexService.searchPairs(args); break; }