Skip to main content
Glama

Manawa Terminal

Get portfolio statistics

get_portfolio_statistics
Read-only

Get portfolio performance statistics (returns, allocation, risk).

gross_exposure and net_exposure are in book currency. A weight may be
negative. dividend_income is cash by stock and can be negative when a
short owes the dividend. total_gain is unrealized_pnl + realized_pnl.
Do not add dividend_income on top of total_gain.

Args:
    portfolio_id: The portfolio UUID

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

A3.5/5.0
Behavior4/5

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

Annotations already make clear this is a read-only, non-destructive, closed-world operation. The description adds valuable domain caveats beyond annotations, including currency basis for exposures, negative weight and dividend_income cases, and the warning not to add dividend_income on top of total_gain.

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 description is front-loaded with the core purpose and then provides compact, relevant caveats for interpreting the statistics. The Args section is somewhat redundant with the schema, but the UUID clarification and output warnings earn their space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema and read-only annotations, the description is largely complete enough to invoke the tool correctly. It covers the required parameter and important output interpretation pitfalls, though it lacks routing guidance against sibling tools.

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 description coverage is only 50%. The description compensates for portfolio_id by clarifying that it is a UUID, but it does not mention strategy_id, which is instead documented richly in the schema. This is adequate but leaves the agent relying on the schema for half the parameter context.

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?

The description states a specific verb and resource: 'Get portfolio performance statistics,' and enumerates the included metric families (returns, allocation, risk). It does not explicitly differentiate this tool from related siblings such as get_positions or list_portfolios, so it is clear but not sibling-aware.

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

Usage Guidelines2/5

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

The description implies the tool is used to retrieve portfolio statistics, but it gives no explicit when-to-use guidance, prerequisites, or alternatives. An agent must infer that get_positions or list_portfolios are different and when this stats tool is preferable.

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