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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query |
Implementation Reference
- src/services/dexscreener.ts:131-137 (handler)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 } ); }
- src/types/index.ts:78-80 (schema)TypeScript type definition for the input parameters of the search_pairs tool, specifying the required 'query' string.export type SearchParams = { query: string; };
- src/index.ts:282-295 (schema)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'], }, },