Skip to main content
Glama
nexus-xyz

nexus-exchange-mcp

Official
by nexus-xyz

get_account_state

Retrieve an authenticated account's full portfolio state in one call, returning summary aggregates and all open positions for consistent read-only account monitoring.

Instructions

Deprecated: use fetch_account_state. Get the authenticated account's full state in ONE call: the portfolio summary aggregates plus every open position ({ summary, positions }). Prefer this over pairing fetch_account_summary with fetch_positions — both parts come from one coherent read, so summary.open_positions_count always matches the positions length. If the engine-authoritative margin view is unavailable this fails closed with a 502 (authoritative_margin_unavailable) rather than returning an estimate: retry after a short delay, do NOT read the error as a flat or empty account. Positions carry per-position risk detail. notional_value, margin_used, roe, max_leverage, and leverage are derived from mirrored state, so any of them can be null with a companion <field>_error naming the reason (e.g. mark_price_unavailable); treat null as UNKNOWN, never as zero. leverage is currently always null (leverage_error: margin_state_not_mirrored) — do not infer it from margin_used. funding_paid is NOT one of those: it is always present and has no _error companion, so its "0" is a real zero (no funding accrued), not unknown. It is paid-positive — a negative value means funding was received. Requires API credentials.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the fail-closed 502 (authoritative_margin_unavailable) with retry guidance, warns against misreading the error as a flat account, and documents that derived fields may be null with companion <field>_error fields while funding_paid is a real zero. The main omission is any statement about pagination or auth scope beyond 'Requires API credentials'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The deprecation notice and the one-call purpose are front-loaded, which is correct, but the body is a long, comma-heavy run of null-handling rules that is dense to parse in a single read. Every fact is arguably load-bearing given no output schema, yet the structure could be tighter (e.g., splitting the null/error rules into discrete clauses).

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?

There is no output schema and no annotations, so the description must explain return values and failure modes on its own. It does: payload shape, derived-field null semantics, per-field error companions, the permanently-null leverage case, funding_paid sign convention, and the 502 fail-closed behavior are all covered.

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?

The tool takes zero parameters and the schema is empty with additionalProperties false, so there is nothing for the description to disambiguate. Baseline 4 applies; no parameter-level content could add value here.

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?

States a specific verb and resource ('Get the authenticated account's full state in ONE call') and immediately enumerates the payload shape ({ summary, positions }). It also distinguishes itself from the sibling tools fetch_account_summary and fetch_positions by explaining what the combined read provides.

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?

Explicitly names the alternative pattern ('pairing fetch_account_summary with fetch_positions') and the condition that favors this tool (one coherent read, count always matches). It also flags its own deprecation and points to the successor fetch_account_state, so an agent knows exactly when to route elsewhere.

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

Deploy Server

Other Tools