Skip to main content
Glama

My closed positions (realized PnL)

get_my_closed_positions
Read-only

Positions the user fully exited, with realized PnL. get_my_closed_positions is exited positions ONLY; what the user holds now is get_my_balances. Never say they hold nothing from an empty closed list. An empty result says nothing about what they hold today. Choosing between the two history tools: get_my_closed_positions is the POSITION-level rollup — one entry per token the user entered and fully exited, with total realised PnL. get_my_closed_trades is the individual TRADES underneath, one entry per fill. Use positions for 'how did I do on X', trades for 'show me every trade'.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_my_closed_positions"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo1-based page number.
limitNoPositions per page, 1-100. Keep it small.
token_addressNoRestrict to closed positions in one token. Omit for all.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • removedInput schema / properties / page / title
      Removed value: -"Page"
    • removedInput schema / properties / token_address / title
      Removed value: -"Token Address"
    • removedInput schema / title
      Removed value: -"get_my_closed_positionsArguments"
  2. Changed1 schema field changed
    • removedInput schema / properties / network
      Removed value: -{
      -  "const": "solana",
      -  "default": "solana",
      -  "title": "Network",
      -  "type": "string"
      -}
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

The annotations already cover the safety profile (readOnly, non-destructive, closed-world), and the description adds genuinely non-obvious semantics: an empty result is not evidence of an empty portfolio, and results are aggregated per token rather than per fill. It stops short of describing pagination behavior or ordering, which is the only remaining behavioral gap.

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 the core definition and well organized into scope, caveat, and disambiguation. Slightly repetitive: the empty-result warning is stated twice in adjacent sentences ("Never say they hold nothing…" / "An empty result says nothing about what they hold today"), which costs a bit of density.

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 an output schema present, return values need not be explained, and the description covers the remaining risks: aggregation level, the sibling boundary, and the dangerous empty-result misreading. Nothing an agent needs in order to call or interpret this tool is missing.

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?

Schema coverage is 100%, and each parameter already carries its own description including the 1-100 bound and the "omit for all" guidance on token_address. The prose adds no parameter detail beyond the schema, so the baseline of 3 applies.

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 opens with a precise verb+resource definition ("Positions the user fully exited, with realized PnL") and immediately contrasts it with the sibling that shows current holdings. The position-level vs trade-level distinction against `get_my_closed_trades` makes the tool's identity unambiguous.

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?

It explicitly names the alternatives (`get_my_balances` for current holdings, `get_my_closed_trades` for individual fills) and gives the selecting condition for each, plus concrete example phrasings ("how did I do on X" vs "show me every trade"). It also states a when-not rule: never infer holdings from an empty closed list.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources