Skip to main content
Glama

search

Search for cryptocurrency tokens, pools, and DEXes across all blockchain networks using names, symbols, or addresses. Find data when you don't know the specific network.

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 that validates the input query, sanitizes it, fetches search results from the DexPaprika API, and formats the response for MCP.
    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);
    }
  • Zod schema defining the input parameter 'query' for the search tool.
    {
      query: z.string().describe('Search term (e.g., "uniswap", "bitcoin", or a token address)')
    },
  • src/index.js:233-247 (registration)
    Registration of the 'search' tool using server.tool(), including name, description, schema, and handler.
    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);
      }
    );
  • Helper function to make API requests to DexPaprika, handles errors like rate limits and removed endpoints. Used by the search handler.
    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;
      }
    }
  • Helper function to format API data into MCP-compatible response format. Used by the search handler.
    function formatMcpResponse(data) {
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data)
          }
        ]
      };
    }
Behavior3/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 mentions the tool searches 'across ALL networks' and is a 'good starting point,' which adds useful context about scope and intent. However, it lacks details on rate limits, authentication needs, or response format, leaving gaps in behavioral understanding for an agent.

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 front-loaded and concise, consisting of two sentences that efficiently convey purpose and usage guidelines without unnecessary details. Every sentence earns its place by providing critical information for tool selection and invocation.

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

Completeness4/5

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

Given the tool's low complexity (1 parameter, 100% schema coverage) and lack of annotations/output schema, the description is reasonably complete. It covers purpose, scope, and usage context well, though it could improve by addressing behavioral aspects like response format or limitations to fully compensate for missing structured data.

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 a clear description. The description adds minimal value beyond the schema by implying the query can target 'name, symbol, or address,' but this is redundant with the schema's example. Baseline 3 is appropriate as the schema does the heavy lifting.

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

Purpose5/5

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

The description clearly states the tool's purpose with specific verbs ('search across ALL networks') and resources ('tokens, pools, and DEXes'), distinguishing it from sibling tools that focus on specific networks or details. It explicitly mentions the scope ('ALL networks') and searchable attributes ('by name, symbol, or address'), making the purpose unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('Good starting point when you don't know the specific network'), which differentiates it from sibling tools like getNetworkDexes or getTokenDetails that require network knowledge. It effectively tells the agent to use this for broad searches and implies alternatives for network-specific queries.

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

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