Skip to main content
Glama

My trade history for a token

get_my_closed_trades
Read-only

Each closed buy and sell cycle for one token, with fills and tx hashes. Newest first; each cycle has fills (timestamp, side, price_usd, token_amount, usd_amount, tx_hash; include_fills=false skips them) and your rationale. ONE TOKEN AT A TIME: token_address is required; for the whole history use get_my_closed_positions. 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'. 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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "token_address": "<token_address>"
    },
    "name": "get_my_closed_trades"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo1-based page number.
limitNoClosed cycles per page, 1-100.
include_fillsNoAttach every buy/sell leg (`fills`, with tx hashes). Default true.
token_addressYesContract address of the ONE token to show trades for. Required.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • removedInput schema / properties / include_fills / title
      Removed value: -"Include Fills"
    • 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_tradesArguments"
  2. Changed7 schema fields changed
    • addedInput schema / properties / include_fills / description
      Added value: +"Attach every buy/sell leg (`fills`, with tx hashes). Default true."
    • addedInput schema / properties / limit / description
      Added value: +"Closed cycles per page, 1-100."
    • addedInput schema / properties / limit / maximum
      Added value: +100
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • removedInput schema / properties / network
      Removed value: -{
      -  "const": "solana",
      -  "default": "solana",
      -  "title": "Network",
      -  "type": "string"
      -}
    • addedInput schema / properties / page / description
      Added value: +"1-based page number."
    • addedInput schema / properties / page / minimum
      Added value: +1
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/destructive/openWorld, so the safety profile is covered; the description adds ordering (newest first), the per-fill data shape, the presence of `rationale`, and the empty-result interpretation pitfall. It does not explain what the fills look like when partial or how pagination interacts with a live-updating history, so it stops just short of full coverage.

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 payload and ordering, then routing guidance, which is the right order for an agent deciding whether to call it. Slightly repetitive — the required/one-token constraint is restated twice — but no sentence is filler.

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, full parameter coverage and annotations covering safety, the description only needed to carry routing and result interpretation — and it does both, including the sibling trade-offs and the empty-list caveat. Nothing an agent needs in order to pick and call this tool 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; the description adds real meaning on top by stating `token_address` is required and scoped to exactly ONE token, and by explaining that `include_fills=false` skips the fills array. Page/limit semantics are left entirely to the schema, which is acceptable given the coverage.

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 resource — closed buy/sell cycles for one token, with fills and tx hashes, newest first — and explicitly names the sibling it differs from (get_my_closed_positions). The position-level vs trade-level distinction is stated in a way an agent can act on without opening either 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?

Gives explicit routing rules with concrete user phrasings: positions for 'how did I do on X', trades for 'show me every trade', and get_my_balances for current holdings. It also adds a when-not guard (positions are exited positions only) and a behavioral caveat not to report 'holds nothing' 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