Skip to main content
Glama

get_portfolio_positions

Read-only

Stored positions of one saved portfolio. Returns {portfolio_id, positions, error} on EVERY path (error is null on success, a string on failure, and positions is [] either way). Each position is ONLY {ticker, shares, costBasis (whole USD, may be null)}, ticker-sorted. THERE IS NO PRICE LEG: no price, market value, gain/loss or weight -- value the positions yourself. An unknown portfolio_id yields positions=[] with error=null, so an empty list does not prove the portfolio exists. For the catalog-wide sector mix use get_sector_breakdown. Source: PG portfolio_positions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portfolio_idNoPortfolio identifier (default: 'default')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

With only readOnlyHint from annotations, the description carries substantial extra detail: the exact return envelope {portfolio_id, positions, error} on every path, that error is null/string and positions [] either way, no price/market-value/gain-loss/weight fields, and unknown-id behavior. This is richer than the annotations and prevents misfires.

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-loads the key fact (positions of one saved portfolio) and then the return contract and the no-price-leg warning. Dense but each sentence carries meaning; slightly long, with some parenthetical repetition of the empty-list caveat.

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?

No output schema exists, so the description assumes the burden of explaining returns and does so completely: field set, error semantics, ordering, nullability of costBasis, and the empty-vs-nonexistent ambiguity. Nothing needed 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 100% (single portfolio_id with a documented default of 'default'), so the schema fully documents the parameter. The description adds only that it identifies 'one saved portfolio' and the unknown-id semantics, which is helpful but not substantial syntax/format detail beyond the schema.

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 ('Stored positions of one saved portfolio') and explicitly frames what the tool does and does not return. It names a sibling (get_sector_breakdown) for the adjacent need, but the core verb is implicit rather than a crisp 'returns the positions held...'.

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 clear usage context: use this for a saved portfolio's positions, use get_sector_breakdown for catalog-wide sector mix. It also warns that an empty list doesn't prove existence, steering the agent's interpretation. No explicit when-not exclusion beyond the sector-mix alternative, so short of a 5.

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.