Skip to main content
Glama

get_total_tvl

Retrieve the total value locked (TVL) in SailFish DEX to monitor liquidity and token activity using the EDUCHAIN Agent Kit.

Instructions

Get the total value locked (TVL) in SailFish DEX

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "required": [], "type": "object" }

Implementation Reference

  • MCP tool handler for 'get_total_tvl' that invokes subgraph.getTotalTVL() and formats the response as JSON.
    case 'get_total_tvl': { const tvl = await subgraph.getTotalTVL(); return { content: [ { type: 'text', text: JSON.stringify({ totalValueLockedUSD: tvl }, null, 2), }, ], }; }
  • Core implementation that queries the subgraph factory for totalValueLockedUSD.
    export async function getTotalTVL(): Promise<string> { try { const factory = await getFactory(); if (!factory) { throw new Error('Factory data not available'); } return factory.totalValueLockedUSD; } catch (error) { console.error('Error fetching total TVL:', error); throw error; } }
  • Input schema definition (empty object, no parameters required) and tool registration in the ListTools handler.
    name: 'get_total_tvl', description: 'Get the total value locked (TVL) in SailFish DEX', inputSchema: { type: 'object', properties: {}, required: [], },

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