Skip to main content
Glama
sv

MCP Paradex Server

by sv

paradex_vault_summary

Retrieve comprehensive vault summaries including balances, positions, activity, and performance metrics. Filter results using JMESPath expressions to analyze specific vaults or compare multiple vaults efficiently.

Instructions

Get a comprehensive summary of a specific vault or all vaults if no address is provided.

Retrieves a summary of all important information about a vault,
including balance, positions, recent activity, and performance metrics.
This provides a high-level overview of the vault's current state.

Use jmespath_filter to reduce the number of results as much as possible as number of vaults can be large.

You can use JMESPath expressions to filter, sort, or transform the results.
Examples:
- Filter by TVL: "[?to_number(tvl) > `10000`]"
- Filter by performance: "[?to_number(total_roi) > `5.0`]"
- Sort by TVL (descending): "reverse(sort_by([*], &to_number(tvl)))"
- Get top performers: "sort_by([*], &to_number(total_roi))[-3:]"
- Filter by recent returns: "[?to_number(roi_24h) > `0.5`]"
- Extract specific metrics: "[*].{address: address, tvl: tvl, total_roi: total_roi, volume_24h: volume_24h}"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vault_addressNoThe address of the vault to get summary for or None to get all vaults.
jmespath_filterNoJMESPath expression to filter or transform the result.
limitNoLimit the number of results to the specified number.
offsetNoOffset the results to the specified number.

Implementation Reference

  • The main handler function for the 'paradex_vault_summary' tool. It fetches vault summary data from the Paradex API, validates it using VaultSummary model, applies optional JMESPath filtering and pagination, and returns a structured response including schema information.
    @server.tool(name="paradex_vault_summary")
    async def get_vault_summary(
        vault_address: Annotated[
            str,
            Field(
                default=None,
                description="The address of the vault to get summary for or None to get all vaults.",
            ),
        ],
        jmespath_filter: Annotated[
            str,
            Field(default=None, description="JMESPath expression to filter or transform the result."),
        ],
        limit: Annotated[
            int,
            Field(
                default=10,
                gt=0,
                le=100,
                description="Limit the number of results to the specified number.",
            ),
        ],
        offset: Annotated[
            int,
            Field(
                default=0,
                ge=0,
                description="Offset the results to the specified number.",
            ),
        ],
    ) -> dict:
        """
        Get a comprehensive summary of a specific vault or all vaults if no address is provided.
    
        Retrieves a summary of all important information about a vault,
        including balance, positions, recent activity, and performance metrics.
        This provides a high-level overview of the vault's current state.
    
        Use jmespath_filter to reduce the number of results as much as possible as number of vaults can be large.
    
        You can use JMESPath expressions to filter, sort, or transform the results.
        Examples:
        - Filter by TVL: "[?to_number(tvl) > `10000`]"
        - Filter by performance: "[?to_number(total_roi) > `5.0`]"
        - Sort by TVL (descending): "reverse(sort_by([*], &to_number(tvl)))"
        - Get top performers: "sort_by([*], &to_number(total_roi))[-3:]"
        - Filter by recent returns: "[?to_number(roi_24h) > `0.5`]"
        - Extract specific metrics: "[*].{address: address, tvl: tvl, total_roi: total_roi, volume_24h: volume_24h}"
        """
        try:
            client = await get_paradex_client()
            params = {"address": vault_address} if vault_address else None
            response = await api_call(client, "vaults/summary", params=params)
            if "error" in response:
                raise Exception(response["error"])
            results = response["results"]
            summary = vault_summary_adapter.validate_python(results)
    
            # Apply JMESPath filter if provided
            if jmespath_filter:
                summary = apply_jmespath_filter(
                    data=summary,
                    jmespath_filter=jmespath_filter,
                    type_adapter=vault_summary_adapter,
                    error_logger=logger.error,
                )
            sorted_summary = sorted(summary, key=lambda x: x.address, reverse=True)
            result_summary = sorted_summary[offset : offset + limit]
            result = {
                "description": VaultSummary.__doc__.strip() if VaultSummary.__doc__ else None,
                "fields": VaultSummary.model_json_schema(),
                "vaults": result_summary,
                "total": len(sorted_summary),
                "limit": limit,
                "offset": offset,
            }
            return result
        except Exception as e:
            logger.error(f"Error fetching summary for vault {vault_address}: {e!s}")
            raise e
  • Pydantic BaseModel defining the structure and validation for VaultSummary objects, which represent the output data from the tool. Provides the JSON schema via model_json_schema() used in responses.
    class VaultSummary(BaseModel):
        """Model representing a summary of a vault's performance and statistics."""
    
        address: Annotated[str, Field(default="", description="Contract address of the vault")]
        owner_equity: Annotated[
            str,
            Field(
                default="",
                description="Vault equity of the owner (% of ownership) in percentage, i.e. 0.1 means 10%",
            ),
        ]
        vtoken_supply: Annotated[
            str, Field(default="", description="Total amount of available vault tokens")
        ]
        vtoken_price: Annotated[
            str, Field(default="", description="Current value of vault token price in USD")
        ]
        tvl: Annotated[
            str,
            Field(
                default="",
                description="Net deposits of the vault in USDC (deprecated; use net_deposits instead)",
            ),
        ]
        net_deposits: Annotated[str, Field(default="", description="Net deposits of the vault in USDC")]
        total_roi: Annotated[
            str,
            Field(default="", description="Total ROI of the vault in percentage, i.e. 0.1 means 10%"),
        ]
        roi_24h: Annotated[
            str,
            Field(
                default="",
                description="Return of the vault in the last 24 hours in percentage, i.e. 0.1 means 10%",
            ),
        ]
        roi_7d: Annotated[
            str,
            Field(
                default="",
                description="Return of the vault in the last 7 days in percentage, i.e. 0.1 means 10%",
            ),
        ]
        roi_30d: Annotated[
            str,
            Field(
                default="",
                description="Return of the vault in the last 30 days in percentage, i.e. 0.1 means 10%",
            ),
        ]
        last_month_return: Annotated[
            str,
            Field(
                default="",
                description="APR return of the vault in the last trailing month in percentage, i.e. 0.1 means 10%",
            ),
        ]
        total_pnl: Annotated[str, Field(default="", description="Total P&L of the vault in USD")]
        pnl_24h: Annotated[
            str, Field(default="", description="P&L of the vault in the last 24 hours in USD")
        ]
        pnl_7d: Annotated[
            str, Field(default="", description="P&L of the vault in the last 7 days in USD")
        ]
        pnl_30d: Annotated[
            str, Field(default="", description="P&L of the vault in the last 30 days in USD")
        ]
        max_drawdown: Annotated[
            str,
            Field(
                default="",
                description="Max all time drawdown realized by the vault in percentage, i.e. 0.1 means 10%",
            ),
        ]
        max_drawdown_24h: Annotated[
            str,
            Field(
                default="",
                description="Max drawdown realized by the vault in the last 24 hours in percentage, i.e. 0.1 means 10%",
            ),
        ]
        max_drawdown_7d: Annotated[
            str,
            Field(
                default="",
                description="Max drawdown realized by the vault in the last 7 days in percentage, i.e. 0.1 means 10%",
            ),
        ]
        max_drawdown_30d: Annotated[
            str,
            Field(
                default="",
                description="Max drawdown realized by the vault in the last 30 days in percentage, i.e. 0.1 means 10%",
            ),
        ]
        volume: Annotated[
            str, Field(default="", description="All time volume traded by the vault in USD")
        ]
        volume_24h: Annotated[
            str, Field(default="", description="Volume traded by the vault in the last 24 hours in USD")
        ]
        volume_7d: Annotated[
            str, Field(default="", description="Volume traded by the vault in the last 7 days in USD")
        ]
        volume_30d: Annotated[
            str, Field(default="", description="Volume traded by the vault in the last 30 days in USD")
        ]
        num_depositors: Annotated[
            int, Field(default=0, description="Number of depositors on the vault")
        ]
  • Part of the get_filters_model tool that provides the output schema (JSON schema) for paradex_vault_summary to help users build precise JMESPath filters.
    tool_descriptions = {
        "paradex_markets": models.MarketDetails.model_json_schema(),
        "paradex_market_summaries": models.MarketSummary.model_json_schema(),
        "paradex_open_orders": models.OrderState.model_json_schema(),
        "paradex_orders_history": models.OrderState.model_json_schema(),
        "paradex_vaults": models.Vault.model_json_schema(),
        "paradex_vault_summary": models.VaultSummary.model_json_schema(),
    }
  • TypeAdapter for list[VaultSummary] used for Pydantic validation of API responses in the handler.
    vault_summary_adapter = TypeAdapter(list[VaultSummary])
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: it discloses that results can be large (performance implication), explains the optional filtering mechanism with examples, and describes the return content (balance, positions, etc.). It doesn't mention rate limits or authentication needs, but covers key behavioral aspects for a read operation.

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: the first paragraph states the core purpose, the second elaborates on content, and the rest provides practical guidance with examples. The JMESPath examples are necessary for clarity but make it slightly longer; overall, each section earns its place without redundancy.

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 no annotations, no output schema, and 4 parameters with good schema coverage, the description is quite complete: it explains what the tool does, when to use it, behavioral traits like result size, and parameter usage with examples. It could mention error cases or exact output structure, but for a read tool with high schema coverage, this is sufficient.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds value by explaining the semantics of vault_address (specific vs. all vaults) and jmespath_filter (with multiple examples for filtering, sorting, transforming), which enhances understanding beyond the schema's technical descriptions. It doesn't detail limit/offset but those are straightforward.

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 verb 'Get' and resource 'summary of a specific vault or all vaults', specifying it retrieves comprehensive information including balance, positions, recent activity, and performance metrics. It distinguishes from siblings like paradex_vaults (likely just listing) and paradex_vault_balance/positions (specific components) by emphasizing a holistic overview.

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 provides clear context: use when needing a high-level overview of vault state, with guidance to use jmespath_filter for efficiency due to potentially large result sets. It doesn't explicitly state when not to use it or name specific alternatives among siblings, but the context implies it's for summary vs. detailed components.

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