Skip to main content
Glama
nexus-xyz

nexus-exchange-mcp

Official
by nexus-xyz

get_closed_positions

Retrieves an authenticated account's closed positions with realized PnL per position, paginated via cursor. Deprecated: use fetch_positions_history instead.

Instructions

Deprecated: use fetch_positions_history. Get the authenticated account's closed positions (realized PnL per position). Returns { items, next_cursor }. items is this page of results; next_cursor is an opaque token for the next page, or null when this is the last page. To read the full history, keep calling with cursor: <previous next_cursor> until next_cursor is null. limit sets the size of ONE page, not a total. Requires API credentials.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of records per page (max 200).
cursorNoOpaque pagination cursor. Omit for the first page; to get the next page, pass back the `next_cursor` from the previous response verbatim. Stop when `next_cursor` is null — that means there are no more results. Never construct or edit a cursor: the format is not part of the contract.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.0
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Opaque pagination cursor. Omit for the first page; to get the next page, pass back the `next_cursor` from the previous response verbatim. Stop when `next_cursor` is null — that means there are no more results. Never construct or edit a cursor: the format is not part of the contract.",
      +  "type": "string"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of records to return (max 200)."New value: +"Maximum number of records per page (max 200)."
  2. Added

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the burden, and it does: discloses that API credentials are required, describes the return shape (`{ items, next_cursor }`), the meaning of a null cursor, and that cursor is opaque/non-constructible. It stops short of rate-limit or error behavior, but for a read-only listing tool this is solid disclosure.

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-loads the deprecation notice, then purpose, return format, and pagination. Sentences largely earn their place, though the pagination explanation partially overlaps with the cursor schema description, adding some redundancy.

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?

With no annotations and no output schema, the description must explain return values and safety context on its own, and it does: it describes the payload, the pagination contract, and credential requirements. Nothing an agent needs to call it correctly is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real value beyond it: it stresses that `limit` sizes ONE page rather than a total, and frames cursor usage as a stop-when-null loop. These are semantic clarifications the schema alone states more tersely.

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 closed positions') with a clarifying parenthetical ('realized PnL per position'). It even differentiates itself from the sibling by flagging deprecation and pointing to `fetch_positions_history`, so an agent can tell it apart without opening the schema.

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 marks the tool as deprecated and routes the agent to the replacement (`fetch_positions_history`), which is the clearest possible when-not-to-use guidance. It also explains the full-history pagination loop, so the agent knows how to drive the calls.

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