Skip to main content
Glama
coinpaprika

DexPaprika (CoinPaprika)

Official

getTokenDetails

Retrieve detailed information about specific tokens on blockchain networks using network IDs and token addresses to access comprehensive token data.

Instructions

Get detailed information about a specific token on a network. First use getNetworks to get valid network IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkYesNetwork ID from getNetworks (e.g., "ethereum", "solana")
tokenAddressYesToken address or identifier

Implementation Reference

  • The handler function that fetches token details from the DexPaprika API using the provided network and token address, then formats and returns the response for MCP.
    async ({ network, tokenAddress }) => {
      const data = await fetchFromAPI(`/networks/${network}/tokens/${tokenAddress}`);
      return formatMcpResponse(data);
    }
  • Input schema using Zod for validating the 'network' and 'tokenAddress' parameters.
    {
      network: z.string().describe('Network ID from getNetworks (e.g., "ethereum", "solana")'),
      tokenAddress: z.string().describe('Token address or identifier')
    },
  • src/index.js:154-165 (registration)
    MCP server.tool registration for 'getTokenDetails', including name, description, input schema, and handler function.
    server.tool(
      'getTokenDetails',
      'Get detailed information about a specific token on a network. First use getNetworks to get valid network IDs.',
      {
        network: z.string().describe('Network ID from getNetworks (e.g., "ethereum", "solana")'),
        tokenAddress: z.string().describe('Token address or identifier')
      },
      async ({ network, tokenAddress }) => {
        const data = await fetchFromAPI(`/networks/${network}/tokens/${tokenAddress}`);
        return formatMcpResponse(data);
      }
    );
  • Helper function to format API response data into MCP-compatible content structure.
    function formatMcpResponse(data) {
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data)
          }
        ]
      };
    }
  • Shared helper to make API requests to DexPaprika, including error handling for rate limits and deprecated endpoints.
    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;
      }
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the prerequisite of using getNetworks first, which adds useful context about dependencies. However, it doesn't describe what 'detailed information' includes, potential rate limits, error conditions, or authentication requirements, leaving significant behavioral aspects unspecified.

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 extremely concise with only two sentences, both of which earn their place. The first sentence states the core purpose, and the second provides essential usage guidance. There's no wasted language or unnecessary elaboration.

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 2 parameters with full schema coverage but no annotations and no output schema, the description provides adequate basic context about what the tool does and a prerequisite. However, for a tool that presumably returns detailed token information, the description should ideally specify what kind of information is returned (metadata, pricing, supply, etc.) since there's no output schema to document this.

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 both parameters thoroughly. The description doesn't add any meaningful parameter semantics beyond what's in the schema - it mentions network IDs but doesn't provide additional context about token address formats or validation rules. This meets the baseline for high schema coverage.

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 verb 'Get' and resource 'detailed information about a specific token on a network', making the purpose understandable. However, it doesn't explicitly distinguish this tool from sibling tools like getTokenPools or getTokenMultiPrices, which likely provide different token-related information.

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 explicit guidance to 'First use getNetworks to get valid network IDs', which is helpful context for proper usage. However, it doesn't specify when to use this tool versus alternatives like getTokenPools or getTokenMultiPrices, nor does it mention any exclusions or prerequisites beyond the network ID requirement.

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