Skip to main content
Glama
nexus-xyz

nexus-exchange-mcp

Official
by nexus-xyz

fetch_account_state

Get an authenticated account's portfolio summary and open positions in one coherent read, avoiding mismatched counts, with per-position risk detail.

Instructions

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.4.0

TDQS

A4.8/5.0
Behavior5/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 richly: fails-closed 502 with reason code, retry guidance, per-field null semantics with companion `<field>_error` codes, the always-null `leverage` caveat, the funding_paid paid-positive convention, and the API-credential requirement. This is far beyond what any structured field provides.

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?

Front-loaded with purpose and the sibling preference, then dense caveats. Nearly every sentence carries distinct operational value, though the leverage/funding_paid detail is heavy enough that the paragraph is longer than strictly minimal.

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?

No output schema exists, so the description must convey the return contract itself, and it does: the `{ summary, positions }` shape, nullability of derived fields, error-companion fields, and failure mode. An agent has everything needed to call and interpret it.

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, so the baseline is 4 per the rubric; there is nothing to disambiguate and the description correctly spends no space on parameter semantics.

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+resource ('Get the authenticated account's full state') and immediately scopes it as a single-call composite returning `{ summary, positions }`. It explicitly differentiates from the two siblings it could be confused with (fetch_account_summary, fetch_positions).

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?

Gives an explicit preference rule: use this instead of pairing fetch_account_summary with fetch_positions, and explains why (one coherent read so open_positions_count matches positions length). Also specifies retry behavior on 502 and that the error must not be read as an empty account.

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