Skip to main content
Glama
Habinar

MCP Paradex Server

by Habinar

paradex_vault_account_summary

Check vault trading account status, monitor margin, exposure, and risk metrics to inform trading decisions and manage positions effectively.

Instructions

Get a comprehensive overview of a vault's trading account status.

Use this tool when you need to:
- Check account health and available margin
- Monitor total exposure and leverage
- Understand risk metrics and account status
- Assess trading capacity before placing new orders
- Get a consolidated view of account performance

This provides essential information about account standing and
trading capacity to inform risk management decisions.

Example use cases:
- Checking available margin before placing new orders
- Monitoring account health during market volatility
- Assessing total exposure across all markets
- Understanding maintenance margin requirements
- Planning position adjustments based on account metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vault_addressYesThe address of the vault to get account summary for.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler function for the paradex_vault_account_summary tool. It accepts a vault_address parameter, calls the Paradex API via api_call to retrieve the account summary, validates the JSON response using a Pydantic TypeAdapter for list[VaultAccountSummary], handles errors, and returns the validated summary list.
    @server.tool(name="paradex_vault_account_summary")
    async def get_vault_account_summary(
        vault_address: Annotated[
            str, Field(description="The address of the vault to get account summary for.")
        ],
    ) -> list[VaultAccountSummary]:
        """
        Get a comprehensive overview of a vault's trading account status.
    
        Use this tool when you need to:
        - Check account health and available margin
        - Monitor total exposure and leverage
        - Understand risk metrics and account status
        - Assess trading capacity before placing new orders
        - Get a consolidated view of account performance
    
        This provides essential information about account standing and
        trading capacity to inform risk management decisions.
    
        Example use cases:
        - Checking available margin before placing new orders
        - Monitoring account health during market volatility
        - Assessing total exposure across all markets
        - Understanding maintenance margin requirements
        - Planning position adjustments based on account metrics
        """
        try:
            client = await get_paradex_client()
            response = await api_call(
                client, "vaults/account-summary", params={"address": vault_address}
            )
            if "error" in response:
                raise Exception(response["error"])
            results = response["results"]
            summary = vault_account_summary_adapter.validate_python(results)
            return summary
        except Exception as e:
            logger.error(f"Error fetching account summary for vault {vault_address}: {e!s}")
            raise e
  • Pydantic BaseModel defining the output schema for the tool response. Specifies fields like address, deposited_amount, vtoken_amount, total_roi, total_pnl, and created_at with descriptions and types.
    class VaultAccountSummary(BaseModel):
        """Model representing an account summary for a vault."""
    
        address: Annotated[str, Field(description="Contract address of the vault")]
        deposited_amount: Annotated[
            str, Field(description="Amount deposited on the vault by the user in USDC")
        ]
        vtoken_amount: Annotated[str, Field(description="Amount of vault tokens owned by the user")]
        total_roi: Annotated[
            str, Field(description="Total ROI realized by the user in percentage, i.e. 0.1 means 10%")
        ]
        total_pnl: Annotated[str, Field(description="Total P&L realized by the user in USD")]
        created_at: Annotated[
            int, Field(description="Unix timestamp in milliseconds of when the user joined the vault")
        ]
  • Pydantic TypeAdapter used in the handler to validate the API response as a list of VaultAccountSummary objects.
    vault_account_summary_adapter = TypeAdapter(list[VaultAccountSummary])
  • Decorator that registers the get_vault_account_summary function as an MCP tool with the specified name.
    @server.tool(name="paradex_vault_account_summary")

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "VaultAccountSummary": {
      +      "description": "Model representing an account summary for a vault.",
      +      "properties": {
      +        "address": {
      +          "description": "Contract address of the vault",
      +          "title": "Address",
      +          "type": "string"
      +        },
      +        "created_at": {
      +          "description": "Unix timestamp in milliseconds of when the user joined the vault",
      +          "title": "Created At",
      +          "type": "integer"
      +        },
      +        "deposited_amount": {
      +          "description": "Amount deposited on the vault by the user in USDC",
      +          "title": "Deposited Amount",
      +          "type": "string"
      +        },
      +        "total_pnl": {
      +          "description": "Total P&L realized by the user in USD",
      +          "title": "Total Pnl",
      +          "type": "string"
      +        },
      +        "total_roi": {
      +          "description": "Total ROI realized by the user in percentage, i.e. 0.1 means 10%",
      +          "title": "Total Roi",
      +          "type": "string"
      +        },
      +        "vtoken_amount": {
      +          "description": "Amount of vault tokens owned by the user",
      +          "title": "Vtoken Amount",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "address",
      +        "deposited_amount",
      +        "vtoken_amount",
      +        "total_roi",
      +        "total_pnl",
      +        "created_at"
      +      ],
      +      "title": "VaultAccountSummary",
      +      "type": "object"
      +    }
      +  },
      +  "properties": {
      +    "result": {
      +      "items": {
      +        "$ref": "#/$defs/VaultAccountSummary"
      +      },
      +      "title": "Result",
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "title": "get_vault_account_summaryOutput",
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/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 effectively discloses behavioral traits: it's a read-only operation for monitoring and assessment (implied by 'get' and 'check'), provides essential risk metrics, and informs decision-making. However, it lacks details on rate limits, authentication needs, or error conditions, which would elevate the score.

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 well-structured with clear sections (purpose, usage scenarios, example cases) and front-loaded key information. It avoids redundancy, but could be slightly more concise by integrating some bullet points into prose without losing clarity.

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

Completeness5/5

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

Given the tool's complexity (single parameter, read-only operation), the description is complete. It covers purpose, usage guidelines, and behavioral context thoroughly. With an output schema present, it doesn't need to explain return values, and the absence of annotations is compensated by the detailed description.

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 the single parameter 'vault_address'. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate when the schema handles parameter documentation 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 a comprehensive overview') and resource ('vault's trading account status'), distinguishing it from siblings like paradex_account_summary (general account) and paradex_vault_summary (vault-level summary). It explicitly targets vault-specific account health and trading metrics.

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 usage scenarios in a bulleted list, including when to use it (e.g., 'before placing new orders', 'during market volatility') and distinguishes it from alternatives by focusing on consolidated account performance for risk management, unlike sibling tools that handle specific aspects like positions, transactions, or orders.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.