Skip to main content
Glama
sv

MCP Paradex Server

by sv

paradex_bbo

Retrieve current best bid and ask prices for immediate trading decisions, spread calculations, and real-time market condition monitoring.

Instructions

Get the current best available prices for immediate execution decisions.

Use this tool when you need to:
- Make quick trading decisions without full orderbook depth
- Calculate current spread costs before placing orders
- Monitor real-time price changes efficiently
- Get a snapshot of current market conditions
- Determine fair mid-price for calculations

The BBO provides the most essential price information with minimal data,
perfect for quick decisions or when full orderbook depth isn't needed.

Example use cases:
- Calculating current trading spreads before placing orders
- Monitoring real-time price movements efficiently
- Determining execution prices for immediate market orders
- Calculating mid-price for order placement strategies
- Setting appropriate limit order prices to improve fill chances

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
market_idYesMarket symbol to get BBO for.

Implementation Reference

  • The handler function decorated with @server.tool(name="paradex_bbo"), implementing the core logic: fetches BBO data via Paradex client, validates with BBO model, and formats response with schema.
    @server.tool(name="paradex_bbo")
    async def get_bbo(
        market_id: Annotated[str, Field(description="Market symbol to get BBO for.")],
        ctx: Context = None,
    ) -> dict:
        """
        Get the current best available prices for immediate execution decisions.
    
        Use this tool when you need to:
        - Make quick trading decisions without full orderbook depth
        - Calculate current spread costs before placing orders
        - Monitor real-time price changes efficiently
        - Get a snapshot of current market conditions
        - Determine fair mid-price for calculations
    
        The BBO provides the most essential price information with minimal data,
        perfect for quick decisions or when full orderbook depth isn't needed.
    
        Example use cases:
        - Calculating current trading spreads before placing orders
        - Monitoring real-time price movements efficiently
        - Determining execution prices for immediate market orders
        - Calculating mid-price for order placement strategies
        - Setting appropriate limit order prices to improve fill chances
        """
        try:
            # Get BBO from Paradex
            client = await get_paradex_client()
            response = client.fetch_bbo(market_id)
            bbo = BBO(**response)
            results = {
                "description": BBO.__doc__.strip() if BBO.__doc__ else None,
                "fields": BBO.model_json_schema(),
                "results": bbo,
            }
            return results
        except Exception as e:
            await ctx.error(f"Error fetching BBO for {market_id}: {e!s}")
            raise e
  • Pydantic BaseModel defining the input/output schema for BBO data used in the paradex_bbo tool response.
    class BBO(BaseModel):
        """Best Bid and Offer model for a market."""
    
        market: Annotated[str, Field(description="Symbol of the market")]
        seq_no: Annotated[int, Field(description="Sequence number of the orderbook")]
        ask: Annotated[float, Field(description="Best ask price")]
        ask_size: Annotated[float, Field(description="Best ask size")]
        bid: Annotated[float, Field(description="Best bid price")]
        bid_size: Annotated[float, Field(description="Best bid size")]
        last_updated_at: Annotated[
            int, Field(description="Last update to the orderbook in milliseconds")
        ]
  • The @server.tool decorator registers the get_bbo function as the MCP tool named 'paradex_bbo'.
    @server.tool(name="paradex_bbo")
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it provides 'current best available prices,' is for 'immediate execution decisions,' offers 'minimal data' compared to full orderbook, and is 'perfect for quick decisions.' It doesn't mention rate limits or authentication needs, but covers the core functionality adequately.

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 appropriately sized and front-loaded with the core purpose in the first sentence. The bulleted lists provide useful elaboration without redundancy. Some repetition exists between the 'Use this tool when' and 'Example use cases' sections, but overall structure is clear and efficient.

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

Completeness4/5

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

For a single-parameter tool with no annotations and no output schema, the description provides excellent context about what the tool returns (best available prices for quick decisions) and when to use it. It could benefit from mentioning the return format or data structure since there's no output schema, but otherwise covers the essential context well.

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% (market_id is fully documented in schema), so the baseline is 3. The description doesn't add any parameter-specific information beyond what the schema provides, but doesn't need to since the schema already covers the single parameter adequately.

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 tool's purpose with specific verbs ('Get the current best available prices') and resource ('for immediate execution decisions'), distinguishing it from sibling tools like paradex_orderbook (full depth) and paradex_market_summaries (broader market data). It explicitly positions this as a minimal-data snapshot tool.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('when you need quick trading decisions without full orderbook depth') and when not to (implied: when full depth is needed). It lists 5 specific use cases and contrasts with alternatives by stating it's 'perfect for quick decisions or when full orderbook depth isn't needed'.

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/sv/mcp-paradex-py'

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