Skip to main content
Glama

get_pool_info

Retrieve detailed liquidity pool data from SailFish DEX using a pool address, enabling insights for informed decision-making on EDUCHAIN transactions.

Instructions

Get detailed information about a liquidity pool on SailFish DEX

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
poolIdYesPool address

Implementation Reference

  • Core handler function that executes the tool logic by querying the SailFish subgraph for detailed pool information using GraphQL.
    export async function getPool(poolId: string): Promise<Pool | null> {
      try {
        const data = await request<PoolQueryResult>(
          SUBGRAPH_URL,
          POOL_QUERY,
          { id: poolId.toLowerCase() }
        );
        return data.pools[0] || null;
      } catch (error) {
        console.error('Error fetching pool:', error);
        throw error;
      }
    }
  • Input schema definition for the get_pool_info tool, registered in the MCP server's listTools handler.
      name: 'get_pool_info',
      description: 'Get detailed information about a liquidity pool on SailFish DEX',
      inputSchema: {
        type: 'object',
        properties: {
          poolId: {
            type: 'string',
            description: 'Pool address',
          },
        },
        required: ['poolId'],
      },
    },
  • src/index.ts:759-777 (registration)
    MCP tool call handler registration that validates input, calls subgraph.getPool, and formats the response.
    case 'get_pool_info': {
      if (!args.poolId || typeof args.poolId !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'Pool ID is required');
      }
      
      const pool = await subgraph.getPool(args.poolId);
      if (!pool) {
        throw new McpError(ErrorCode.InvalidRequest, `Pool with ID ${args.poolId} not found`);
      }
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(pool, null, 2),
          },
        ],
      };
    }
  • GraphQL query definition used by getPool to fetch comprehensive pool data from the subgraph.
    const POOL_QUERY = gql`
      query getPool($id: String!) {
        pools(where: { id: $id }) {
          id
          createdAtTimestamp
          createdAtBlockNumber
          token0 {
            id
            symbol
            name
            decimals
          }
          token1 {
            id
            symbol
            name
            decimals
          }
          feeTier
          liquidity
          sqrtPrice
          token0Price
          token1Price
          tick
          volumeToken0
          volumeToken1
          volumeUSD
          untrackedVolumeUSD
          feesUSD
          txCount
          totalValueLockedToken0
          totalValueLockedToken1
          totalValueLockedETH
          totalValueLockedUSD
          totalValueLockedUSDUntracked
          liquidityProviderCount
        }
      }
    `;
  • TypeScript interface defining the structure of Pool data returned by the tool.
    export interface Pool {
      id: string;
      createdAtTimestamp: string;
      createdAtBlockNumber: string;
      token0: Token;
      token1: Token;
      feeTier: string;
      liquidity: string;
      sqrtPrice: string;
      feeGrowthGlobal0X128: string;
      feeGrowthGlobal1X128: string;
      token0Price: string;
      token1Price: string;
      tick: string;
      observationIndex: string;
      volumeToken0: string;
      volumeToken1: string;
      volumeUSD: string;
      untrackedVolumeUSD: string;
      feesUSD: string;
      txCount: string;
      collectedFeesToken0: string;
      collectedFeesToken1: string;
      collectedFeesUSD: string;
      totalValueLockedToken0: string;
      totalValueLockedToken1: string;
      totalValueLockedETH: string;
      totalValueLockedUSD: string;
      totalValueLockedUSDUntracked: string;
      liquidityProviderCount: string;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a read operation ('Get'), but doesn't mention potential rate limits, authentication needs, error conditions, or what 'detailed information' includes (e.g., pool composition, fees, reserves). This leaves significant gaps for agent understanding.

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 a single, efficient sentence that immediately conveys the core purpose. There's no wasted verbiage or unnecessary elaboration, making it perfectly front-loaded and concise.

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

Completeness2/5

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

For a tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'detailed information' returns (e.g., data structure, fields), nor does it cover behavioral aspects like error handling or performance characteristics, leaving the agent with significant uncertainty.

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 the single parameter 'poolId' documented as 'Pool address' in the schema. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline for high coverage without adding value.

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 action ('Get detailed information') and resource ('about a liquidity pool on SailFish DEX'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_top_pools' or 'get_pool_historical_data', which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over 'get_top_pools' (for listing pools) or 'get_pool_historical_data' (for time-series data), nor does it specify prerequisites or exclusions.

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

Related 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/SailFish-Finance/educhain-ai-agent-kit'

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