Skip to main content
Glama
lordbasilaiassistant-sudo

base-flash-arb-mcp

get_pool_reserves

Retrieve liquidity reserves for a token across all DEX pools on Base to analyze arbitrage opportunities and price gaps.

Instructions

Get reserves/liquidity for a token across all known DEX pools on Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
token_addressYesToken contract address on Base

Implementation Reference

  • The handler function for the `get_pool_reserves` tool, which fetches pool liquidity information for a given token address.
    // Tool 2: get_pool_reserves
    server.tool(
      "get_pool_reserves",
      "Get reserves/liquidity for a token across all known DEX pools on Base.",
      {
        token_address: z.string().describe("Token contract address on Base"),
      },
      async ({ token_address }) => {
        try {
          const symbol = await getSymbol(token_address);
          const pools = await getAllPools(token_address);
    
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(
                  {
                    token: token_address,
                    symbol,
                    poolsFound: pools.length,
                    pools,
                  },
                  null,
                  2
                ),
              },
            ],
          };
        } catch (e) {
          return {
            content: [
              {
                type: "text" as const,
                text: `Error fetching pools: ${e instanceof Error ? e.message : String(e)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );

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/lordbasilaiassistant-sudo/base-flash-arb-mcp'

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