Skip to main content
Glama
sv

MCP Paradex Server

by sv

paradex_vault_balance

Read-only

Retrieve current vault balance including available, locked, and total funds to assess financial state before trading or withdrawals.

Instructions

Get the current balance of a specific vault.

Retrieves the current balance information for a specific vault, including available funds, locked funds, and total balance. This is essential for understanding the financial state of a vault before executing trades or withdrawals.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'paradex_vault_balance' tool. It fetches vault balance from the Paradex API, validates the response against the VaultBalance model, and returns it.
    @server.tool(name="paradex_vault_balance", annotations=ToolAnnotations(readOnlyHint=True))
    async def get_vault_balance(
        vault_address: Annotated[
            str, Field(description="The address of the vault to get balance for.")
        ],
    ) -> list[VaultBalance]:
        """
        Get the current balance of a specific vault.
    
        Retrieves the current balance information for a specific vault,
        including available funds, locked funds, and total balance.
        This is essential for understanding the financial state of a vault
        before executing trades or withdrawals.
    
        """
        try:
            client = await get_paradex_client()
            response = await api_call(client, "vaults/balance", params={"address": vault_address})
            if "error" in response:
                raise Exception(response["error"])
            results = response["results"]
            balances = vault_balance_adapter.validate_python(results)
            return balances
        except Exception as e:
            logger.error(f"Error fetching balance for vault {vault_address}: {e!s}")
            raise e
  • The VaultBalance Pydantic model used for input/output validation of the vault balance data, with fields: token, size, and last_updated_at.
    class VaultBalance(BaseModel):
        """Model representing the balance of a vault."""
    
        token: Annotated[str, Field(description="Name of the token")]
        size: Annotated[str, Field(description="Balance amount of settlement token")]
        last_updated_at: Annotated[int, Field(description="Balance last updated time")]
  • TypeAdapter for list[VaultBalance] used to validate and parse the API response into a list of VaultBalance objects.
    vault_balance_adapter = TypeAdapter(list[VaultBalance])
  • Tool registration via @server.tool(name='paradex_vault_balance', ...) decorator on the get_vault_balance async function.
    @server.tool(name="paradex_vault_balance", annotations=ToolAnnotations(readOnlyHint=True))
    async def get_vault_balance(
        vault_address: Annotated[
            str, Field(description="The address of the vault to get balance for.")
        ],
    ) -> list[VaultBalance]:
  • The vaults module is imported in __init__.py, which triggers the registration of all vault-related tools including paradex_vault_balance.
    from . import market, system, vaults
    
    # Only register auth-required tools when authenticated
    if config.is_configured():
        from . import account, orders
Behavior4/5

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

Annotations declare readOnlyHint=true, and the description confirms it's a read operation. It adds detail about what the balance includes (available, locked, total), providing useful behavioral context beyond the annotation.

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 concise and front-loaded with the main action. It uses three brief sentences to convey purpose, result content, and use context, with no unnecessary words.

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 has an output schema (not shown but indicated in context signals), the description does not need to detail return values. It covers the single parameter, purpose, and usage context. It appears complete for this simple tool.

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?

The input schema has one parameter (vault_address) with a description, and schema description coverage is 100%. The tool description does not add extra meaning to this parameter beyond what the schema already provides.

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

Purpose4/5

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

The description clearly states 'Get the current balance of a specific vault' and lists the types of balance info retrieved (available, locked, total). However, it does not explicitly differentiate from sibling vault tools like paradex_vault_summary or paradex_vault_account_summary.

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

Usage Guidelines3/5

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

The description says this tool is 'essential for understanding the financial state of a vault before executing trades or withdrawals,' implying a use case, but it does not provide explicit guidance on when to use this vs. other vault tools or when not to use it.

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