Skip to main content
Glama

getTokenDetails

Retrieve detailed cryptocurrency token information including price, volume, and market data across multiple blockchain networks using DexPaprika's API.

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

  • Handler function that fetches token details from the DexPaprika API endpoint and formats the response for MCP.
    async ({ network, tokenAddress }) => {
      const data = await fetchFromAPI(`/networks/${network}/tokens/${tokenAddress}`);
      return formatMcpResponse(data);
    }
  • Zod schema defining input parameters: network (string) and tokenAddress (string).
    {
      network: z.string().describe('Network ID from getNetworks (e.g., "ethereum", "solana")'),
      tokenAddress: z.string().describe('Token address or identifier')
    },
  • src/index.js:148-159 (registration)
    Registers the getTokenDetails tool using server.tool, including name, description, 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);
      }
    );
  • Shared helper function used by getTokenDetails to make API requests to DexPaprika with error handling.
    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;
      }
    }
  • Shared helper function used by getTokenDetails to format API response for MCP protocol.
    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. It states the tool retrieves 'detailed information' but doesn't specify what details are included (e.g., token name, symbol, decimals, supply), whether it's a read-only operation, potential rate limits, or error conditions. For a tool with no annotation coverage, this leaves significant behavioral gaps.

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 two concise sentences with zero waste. The first sentence states the purpose, and the second provides crucial usage guidance. Every word earns its place, and information is front-loaded effectively.

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 no annotations and no output schema, the description is incomplete. It covers purpose and usage prerequisites well, but lacks details on what 'detailed information' includes, behavioral traits, or response format. For a tool with 2 parameters and no structured output documentation, this leaves the agent guessing about the return values and operational constraints.

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%, with both parameters clearly documented in the schema (network ID and token address). The description adds minimal value beyond the schema by mentioning 'network IDs from getNetworks' and 'token address or identifier', but doesn't provide additional context like format examples beyond what's in the schema. Baseline 3 is appropriate given 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 unambiguous. It distinguishes from siblings like getNetworks (which lists networks) and getTokenPools (which focuses on pools). However, it doesn't explicitly differentiate from getPoolDetails or getTokenPools in terms of scope.

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: 'First use getNetworks to get valid network IDs.' This tells the agent when to use this tool (after obtaining network IDs) and references a specific sibling tool (getNetworks) as a prerequisite. It establishes a clear sequence of operations.

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