Skip to main content
Glama

Manawa Terminal

Get portfolio positions

get_positions
Read-only

Get current holdings with quantity, cost basis, market value, and unrealized P&L.

A short has negative shares, a positive avg_cost, a negative total_cost_book
(the open credit), and a negative market value. Unrealized profit is positive.
Cash includes short proceeds and is reduced when the short owes a dividend.
Open cost of a long is already net of dividends still held. Realized P&L
from closed longs and shorts is on get_portfolio_statistics.

Args:
    portfolio_id: The portfolio UUID

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": {
      "portfolio_id": "<portfolio_id>"
    },
    "name": "get_positions"
  }
}

Input Schema

NameRequiredDescriptionDefault
strategy_idNoStrategy this call belongs to. UUID from list_strategies. The card this call writes keeps that id. Omit when the call is not part of a strategy.
portfolio_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / strategy_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Strategy this call belongs to. UUID from list_strategies. The card this call writes keeps that id. Omit when the call is not part of a strategy.",
      +  "title": "Strategy Id"
      +}
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds genuine domain behavior that annotations cannot: how shorts are represented (negative shares, positive avg_cost, negative cost book, negative market value), that cash includes short proceeds and is reduced by owed dividends, and that open cost of a long is net of held dividends. That materially changes how an agent interprets the returned numbers.

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?

The core purpose is front-loaded in the first sentence, and the accounting notes are dense but each one earns its place by disambiguating sign conventions. The trailing 'Args: portfolio_id: The portfolio UUID' is largely redundant with the schema and the strategy_id parameter is silently omitted from that block.

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?

An output schema exists, so return shape needn't be spelled out; the description instead covers the non-obvious interpretation rules, and it clearly separates itself from the statistics tool. For a two-parameter read-only query, 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.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50%: strategy_id is well documented in the schema, while portfolio_id only says 'The portfolio UUID', which the description echoes without adding syntax or constraints. No enum or format detail is provided beyond the bare type, so the description roughly matches rather than exceeds the schema.

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 current holdings') plus the exact fields returned (quantity, cost basis, market value, unrealized P&L), and explicitly routes realized P&L to get_portfolio_statistics. An agent can distinguish this from get_portfolio_statistics 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 Guidelines3/5

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

Names one alternative (get_portfolio_statistics) and the condition that selects it (realized P&L from closed longs/shorts), which is useful routing. However, there is no guidance on when to prefer this over list_portfolios or other portfolio-scoped tools, and prerequisites (auth, portfolio existence) are not stated.

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