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)
          }
        ]
      };
    }
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. It mentions a requirement ('Requires network ID from getNetworks'), which adds some context, but fails to describe other key traits such as whether this is a read-only operation, potential rate limits, error conditions, or the format of the returned details. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 concise and front-loaded with the core purpose in the first sentence, followed by a prerequisite in the second. Every sentence earns its place by providing essential information without redundancy or unnecessary details.

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 complexity (3 parameters, no annotations, no output schema), the description is moderately complete. It covers the purpose and prerequisites but lacks details on behavior, output format, and error handling. With no output schema, the description should ideally hint at what 'detailed information' includes, but it doesn't, leaving room for improvement in contextual coverage.

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?

The description mentions the parameters 'network ID from getNetworks' and 'pool address', aligning with the input schema. Since schema description coverage is 100%, the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema, such as hinting at the source for the network ID, but doesn't provide additional semantics like examples or constraints not in the schema.

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 the resource 'detailed information about a specific pool', which is specific and actionable. However, it doesn't explicitly differentiate this tool from similar siblings like getPoolOHLCV or getTokenPools, which might also retrieve pool-related data but with different scopes or details.

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 by stating 'Requires network ID from getNetworks', which guides users on prerequisite data and hints at a workflow. It doesn't explicitly mention when not to use this tool or name alternatives among siblings, but the context is sufficient for basic usage.

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