Skip to main content
Glama
coinpaprika

DexPaprika (CoinPaprika)

Official

search

Search for tokens, pools, and DEXes across all blockchain networks using names, symbols, or addresses to identify assets when the specific network is unknown.

Instructions

Search across ALL networks for tokens, pools, and DEXes by name, symbol, or address. Good starting point when you don't know the specific network.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term (e.g., "uniswap", "bitcoin", or a token address)

Implementation Reference

  • The handler function for the 'search' tool. Validates the query input, sanitizes it, fetches search results from the DexPaprika API /search endpoint, and formats the response using formatMcpResponse.
    async ({ query }) => {
      if (!query.trim()) {
        throw new Error('Search query cannot be empty');
      }
      const sanitizedQuery = encodeURIComponent(query.trim());
      const data = await fetchFromAPI(`/search?query=${sanitizedQuery}`);
      return formatMcpResponse(data);
    }
  • Input schema for the 'search' tool defined using Zod: requires a 'query' string parameter.
    {
      query: z.string().describe('Search term (e.g., "uniswap", "bitcoin", or a token address)')
    },
  • src/index.js:239-253 (registration)
    Registration of the 'search' MCP tool on the server, including name, description, schema, and handler function.
    server.tool(
      'search',
      'Search across ALL networks for tokens, pools, and DEXes by name, symbol, or address. Good starting point when you don\'t know the specific network.',
      {
        query: z.string().describe('Search term (e.g., "uniswap", "bitcoin", or a token address)')
      },
      async ({ query }) => {
        if (!query.trim()) {
          throw new Error('Search query cannot be empty');
        }
        const sanitizedQuery = encodeURIComponent(query.trim());
        const data = await fetchFromAPI(`/search?query=${sanitizedQuery}`);
        return formatMcpResponse(data);
      }
    );
  • fetchFromAPI helper function used by the search handler to make API requests to DexPaprika, handles errors like 410 (deprecated endpoint) and 429 (rate limit).
    async function fetchFromAPI(endpoint) {
      try {
        const response = await fetch(`${API_BASE_URL}${endpoint}`);
        if (!response.ok) {
          if (response.status === 410) {
            throw new Error(
              'This endpoint has been permanently removed. Please use network-specific endpoints instead. ' +
              'For example, use /networks/{network}/pools instead of /pools. ' +
              'Get available networks first using the getNetworks function.'
            );
          }
          if (response.status === 429) {
            throw new Error(
              'Rate limit exceeded. You have reached the maximum number of requests allowed for the free tier. ' +
              'To increase your rate limits and access additional features, please consider upgrading to a paid plan at https://docs.dexpaprika.com/'
            );
          }
          throw new Error(`API request failed with status ${response.status}`);
        }
        return await response.json();
      } catch (error) {
        console.error(`Error fetching from API: ${error.message}`);
        throw error;
      }
    }
  • formatMcpResponse helper function used by the search handler to format API data into MCP-compatible response structure.
    function formatMcpResponse(data) {
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data)
          }
        ]
      };
    }
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. While it mentions the search scope and purpose, it doesn't describe important behavioral traits like whether this is a read-only operation, potential rate limits, authentication requirements, response format, or pagination behavior for a search tool.

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 appropriately sized with two sentences that each earn their place. The first sentence states the purpose and scope, while the second provides usage guidance. There's zero waste or redundancy.

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 annotations, no output schema, and a simple single-parameter input schema, the description is adequate but has clear gaps. It explains what the tool does and when to use it, but doesn't address behavioral aspects like safety, performance, or response format that would be helpful for an AI agent.

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?

Schema description coverage is 100%, so the schema already documents the single 'query' parameter with its description and type. The description adds marginal value by mentioning what can be searched ('name, symbol, or address') and providing examples, but doesn't add significant meaning beyond what the schema provides.

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 searches across all networks for tokens, pools, and DEXes by name, symbol, or address. It specifies the verb ('search'), resources ('tokens, pools, and DEXes'), and scope ('across ALL networks'), but doesn't explicitly differentiate from siblings like getNetworkDexes or getNetworkPools that appear to be network-specific.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: 'Good starting point when you don't know the specific network.' This gives practical guidance, though it doesn't explicitly name alternatives or specify when not to use it (e.g., when you already know the network).

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/coinpaprika/dexpaprika-mcp'

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