Skip to main content
Glama

My position and PnL in a token

get_my_position
Read-only

Holding, cost basis and unrealized PnL for one token. Use for "am I up on X". Quantities come from the CHAIN; cost basis and PnL from Moby's swap ledger, which only sees Moby swaps. Never size a sell from a ledger quantity.

  • balance_token_amount / balance_usd: held ON CHAIN now ('how much do I have').

  • cost_basis_usd / current_pnl_usd / current_pnl_pct: UNREALISED, over basis_known_token_amount only; when that is below the balance, the rest has no known cost: say so.

  • invested_usd / sold_usd: LIFETIME totals; balance_usd + sold_usd - invested_usd will NOT equal current_pnl_usd, and both are right.

  • realized_total_usd: realised PnL including partial sells (closed_trades_count can be 0).

  • ledger_present: false: no swap history, so every money field is unknown. A null profit field is UNKNOWN, never zero. take_profit_orders_count / stop_loss_set include your create_order legs. closed_cycles: the last 5 closed cycles (fills: get_my_closed_trades(token_address)). rationale: your thesis on the open cycle.

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_position"
  }
}

Input Schema

NameRequiredDescriptionDefault
token_addressYesSolana token mint address (base58). Get it from search_tokens or a leaderboard row.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / token_address / title
      Removed value: -"Token Address"
    • removedInput schema / title
      Removed value: -"get_my_positionArguments"
  2. Changed2 schema fields changed
    • removedInput schema / properties / network
      Removed value: -{
      -  "const": "solana",
      -  "default": "solana",
      -  "title": "Network",
      -  "type": "string"
      -}
    • addedInput schema / properties / token_address / description
      Added value: +"Solana token mint address (base58). Get it from search_tokens or a leaderboard row."
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, non-destructive behavior, and the description adds substantial data-provenance context: quantities come from the chain while cost basis and PnL come from a partial swap ledger. It also discloses that ledger_present=false makes all money fields unknown and that null profit is UNKNOWN, not zero, which prevents real misinterpretation. It does not describe response shape or latency, but the output schema covers returns.

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?

Front-loaded one-line summary followed by tightly scoped bullets; each sentence carries non-obvious information such as the identity 'balance_usd + sold_usd - invested_usd' not equaling current_pnl_usd. No filler or redundant restatement of the schema.

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?

For a position/PnL tool with an output schema, the description supplies the interpretive context an agent needs to avoid common mistakes: ledger-vs-chain provenance, unrealised scope limited to basis_known_token_amount, lifetime-vs-unrealised mismatch, and null-means-unknown. Nothing essential 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?

Only one parameter and schema coverage is 100%, so the schema already documents token_address fully, including how to obtain it. The description does not add syntax meaning to the parameter itself, but the field-level semantics it provides elsewhere ('balance_token_amount' held ON CHAIN now, 'invested_usd'/'sold_usd' LIFETIME totals) meaningfully disambiguate the returned fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource and scope ('Holding, cost basis and unrealized PnL for one token') and frames the user question it answers ('am I up on X'). It is clearly distinct from a raw balance tool, though it never names the sibling (e.g. get_my_token_balance) it differs from, so differentiation is left implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete use case ('Use for "am I up on X"') and an explicit safety exclusion ('Never size a sell from a ledger quantity'), plus routes fills to get_my_closed_trades(token_address). It stops short of full when-not guidance, such as which tool to use when you only want on-chain holdings.

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