Skip to main content
Glama

getPoolDetails

Retrieve detailed information about a specific cryptocurrency liquidity pool by providing network ID and pool address. Use this tool to analyze pool data, token ratios, and trading metrics across multiple blockchains.

Instructions

Get detailed information about a specific pool. Requires network ID from getNetworks and a pool address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkYesNetwork ID from getNetworks (e.g., "ethereum", "solana")
poolAddressYesPool address or identifier
inversedNoWhether to invert the price ratio

Implementation Reference

  • src/index.js:133-145 (registration)
    Registration of the 'getPoolDetails' tool using server.tool(), including description, input schema, and inline handler function.
    server.tool( 'getPoolDetails', 'Get detailed information about a specific pool. Requires network ID from getNetworks and a pool address.', { network: z.string().describe('Network ID from getNetworks (e.g., "ethereum", "solana")'), poolAddress: z.string().describe('Pool address or identifier'), inversed: z.boolean().optional().default(false).describe('Whether to invert the price ratio') }, async ({ network, poolAddress, inversed }) => { const data = await fetchFromAPI(`/networks/${network}/pools/${poolAddress}?inversed=${inversed}`); return formatMcpResponse(data); } );
  • The handler function that executes the tool logic: fetches pool details from the DexPaprika API endpoint and formats the response for MCP.
    async ({ network, poolAddress, inversed }) => { const data = await fetchFromAPI(`/networks/${network}/pools/${poolAddress}?inversed=${inversed}`); return formatMcpResponse(data); }
  • Zod schema defining input parameters for the getPoolDetails tool: network, poolAddress, and optional inversed flag.
    { network: z.string().describe('Network ID from getNetworks (e.g., "ethereum", "solana")'), poolAddress: z.string().describe('Pool address or identifier'), inversed: z.boolean().optional().default(false).describe('Whether to invert the price ratio') },
  • Shared helper function fetchFromAPI used by getPoolDetails (and other tools) 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 to format API data into MCP response format, used by getPoolDetails (and other tools).
    function formatMcpResponse(data) { return { content: [ { type: "text", text: JSON.stringify(data) } ] }; }

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