Skip to main content
Glama
nexus-xyz

nexus-exchange-mcp

Official
by nexus-xyz

get_account_state

Get the authenticated account's full portfolio summary and all open positions in a single coherent read, eliminating mismatched counts. Fails closed on margin unavailability.

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 get_account_summary with get_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

Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses fail-closed behavior (502 authoritative_margin_unavailable), null semantics with companion error fields, the always-null leverage field, and the special case of funding_paid. This is rich behavioral detail beyond what annotations might provide.

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 dense but every sentence adds value. The primary purpose is front-loaded, and edge cases are explained without redundancy. It is long but justified given the complexity of the return state and potential null fields.

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?

The description fully explains the return shape ({ summary, positions }), per-position risk details, null/value semantics for derived fields, funding_paid behavior, and error conditions. Since there is no output schema, the description covers all necessary context for an agent to understand what the tool returns and how to interpret edge cases.

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 has zero parameters, and the schema is empty, so there are no parameter semantics to explain. The baseline for 0 params is 4; the description adds no param info but doesn't need to.

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 explicitly states the tool returns the account's full state (summary + positions) in one call. The verb 'Get' plus the resource 'authenticated account's full state' is specific and distinguishes it from sibling tools like get_account_summary and get_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?

The description explicitly recommends this tool over pairing get_account_summary with get_positions, noting the coherent read ensures summary.open_positions_count matches positions length. It also advises retry behavior on 502, giving clear usage context.

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/nexus-xyz/nexus-exchange-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server