Skip to main content
Glama

get_etf_price_by_symbol

Retrieve current ETF price data from Paloma DEX using token symbols like PAGOLD or PABTC2X for cross-chain trading analysis.

Instructions

Get ETF price by token symbol from Paloma DEX.

Args:
    symbol: ETF token symbol (e.g., PAGOLD, PABTC2X, PACBOA)

Returns:
    JSON string with ETF price data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Implementation Reference

  • The main handler function decorated with @mcp.tool() that implements the get_etf_price_by_symbol tool. It fetches ETF price data from the Paloma DEX API using an HTTP GET request to the /price endpoint with the symbol parameter and returns formatted JSON.
    @mcp.tool()
    async def get_etf_price_by_symbol(ctx: Context, symbol: str) -> str:
        """Get ETF price by token symbol from Paloma DEX.
        
        Args:
            symbol: ETF token symbol (e.g., PAGOLD, PABTC2X, PACBOA)
        
        Returns:
            JSON string with ETF price data.
        """
        try:
            paloma_ctx = ctx.request_context.lifespan_context
            
            # Call Paloma DEX API to get price by symbol
            api_url = f"https://api.palomadex.com/etfapi/v1/price?symbol={symbol}"
            
            response = await paloma_ctx.http_client.get(api_url)
            if response.status_code == 200:
                price_data = response.json()
                
                result = {
                    "symbol": symbol,
                    "pricing": price_data,
                    "timestamp": asyncio.get_event_loop().time(),
                    "source": "paloma_dex_api_symbol"
                }
                
                return json.dumps(result, indent=2)
            else:
                return f"Error: Failed to fetch ETF price for symbol {symbol}. Status: {response.status_code}"
                    
        except Exception as e:
            logger.error(f"Error getting ETF price by symbol: {e}")
            return f"Error getting ETF price by symbol: {str(e)}"
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the tool fetches price data from a DEX and returns JSON, but lacks details on error handling, rate limits, authentication needs, or whether it's read-only (implied by 'Get' but not explicit). It adds some context but misses key behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by structured Args and Returns sections. It's efficient with zero waste, though the JSON return format could be slightly more detailed (e.g., sample structure) without losing conciseness.

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 no annotations, no output schema, and low schema coverage, the description is moderately complete. It covers purpose and parameters well but lacks output details (beyond 'JSON string'), error cases, and behavioral context like rate limits or authentication, leaving gaps for a tool with no structured support.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description must compensate fully. It clearly explains the 'symbol' parameter as 'ETF token symbol' with concrete examples (PAGOLD, PABTC2X, PACBOA), adding essential meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get ETF price'), resource ('by token symbol'), and source ('from Paloma DEX'), distinguishing it from siblings like 'get_etf_price' (which likely uses different parameters) and 'get_etf_price_by_paloma_denom' (which uses a different identifier type).

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 implies usage context by specifying 'by token symbol' and providing examples (e.g., PAGOLD, PABTC2X), which helps differentiate from 'get_etf_price_by_paloma_denom'. However, it lacks explicit when-not-to-use guidance or direct alternatives, such as clarifying when to use this versus 'get_etf_price'.

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/VolumeFi/mcpPADEX'

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