Skip to main content
Glama
Habinar

MCP Paradex Server

by Habinar

paradex_orderbook

Analyze market depth and liquidity to optimize order entry and execution by retrieving orderbook data for Paradex perpetual futures markets.

Instructions

Analyze market depth and liquidity to optimize order entry and execution.

Use this tool when you need to:
- Assess true liquidity before placing large orders
- Identify potential support/resistance levels from order clusters
- Determine optimal limit order prices for higher fill probability
- Detect order imbalances that might signal price direction

Understanding the orderbook is essential for effective trade execution,
especially for larger orders or in less liquid markets.

Example use cases:
- Finding the optimal limit price to ensure your order gets filled
- Estimating potential slippage for market orders of different sizes
- Identifying large resting orders that might act as support/resistance
- Detecting order book imbalances that could predict short-term price moves

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
market_idYesMarket symbol to get orderbook for.
depthNoThe depth of the orderbook to retrieve.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for 'paradex_orderbook' tool. It is registered via the @server.tool decorator and fetches the orderbook data from the Paradex client using the provided market_id and depth parameters.
    @server.tool(name="paradex_orderbook")
    async def get_orderbook(
        market_id: Annotated[str, Field(description="Market symbol to get orderbook for.")],
        depth: Annotated[
            int,
            Field(default=OrderbookDepth.MEDIUM, description="The depth of the orderbook to retrieve."),
        ],
        ctx: Context = None,
    ) -> dict[str, Any]:
        """
        Analyze market depth and liquidity to optimize order entry and execution.
    
        Use this tool when you need to:
        - Assess true liquidity before placing large orders
        - Identify potential support/resistance levels from order clusters
        - Determine optimal limit order prices for higher fill probability
        - Detect order imbalances that might signal price direction
    
        Understanding the orderbook is essential for effective trade execution,
        especially for larger orders or in less liquid markets.
    
        Example use cases:
        - Finding the optimal limit price to ensure your order gets filled
        - Estimating potential slippage for market orders of different sizes
        - Identifying large resting orders that might act as support/resistance
        - Detecting order book imbalances that could predict short-term price moves
        """
        try:
            # Get orderbook from Paradex
            client = await get_paradex_client()
            response = client.fetch_orderbook(market_id, params={"depth": depth})
            return response
        except Exception as e:
            await ctx.error(f"Error fetching orderbook for {market_id}: {e!s}")
            raise e
Behavior3/5

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

No annotations are provided, so the description carries full burden. It effectively describes the tool's behavioral purpose (analysis for optimization) and context (essential for larger orders/less liquid markets). However, it lacks details on rate limits, error conditions, authentication requirements, or specific output structure. The description adds value but doesn't fully compensate for the missing annotation coverage.

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 well-structured and appropriately sized. It begins with a clear purpose statement, followed by a bulleted list of use cases, explanatory context, and example applications. Every sentence adds value without redundancy. The information is front-loaded with the most critical details first.

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?

Given the tool's complexity (market analysis with 2 parameters) and the presence of an output schema (which handles return values), the description provides strong contextual completeness. It thoroughly explains when and why to use the tool, includes practical examples, and covers the analytical context. The main gap is the lack of behavioral details not covered by annotations or output schema.

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%, so the schema already documents both parameters (market_id and depth). The description doesn't add any parameter-specific information beyond what the schema provides. It focuses on the tool's purpose and usage rather than parameter semantics, resulting in the baseline score of 3.

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: 'Analyze market depth and liquidity to optimize order entry and execution.' It specifies the verb ('analyze') and resource ('market depth and liquidity'), and distinguishes it from siblings like paradex_bbo (best bid/offer) or paradex_trades (trade history) by focusing on orderbook analysis rather than simple price data or transaction records.

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: 'Use this tool when you need to:' followed by four specific scenarios (e.g., 'Assess true liquidity before placing large orders'). It also distinguishes from alternatives by implying this is for pre-trade analysis versus execution tools like paradex_create_order. The 'Example use cases' section further clarifies appropriate contexts.

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

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