Skip to main content
Glama

Get Portfolio

get_portfolio
Read-onlyIdempotent

Retrieve portfolio positions and totals for the account, including securities, money, and metals with pricing, P&L, and settlement term options.

Instructions

Portfolio of the account bound to the token: every position (securities, money, metals) with quantity, average/current price, value in RUB/USD/EUR, unrealized and daily P&L, portfolio share, accrued interest for bonds. Includes totals by instrument type. The API reports each position once per settlement term (T0/T1/T2/T365) — by default a single slice is returned and totals cover only it; term=all returns the raw duplicates (totals then count every position several times). csv output writes the positions array.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termNoSettlement slice to return (the API duplicates positions per term)T0
outputPathNoWrite the full result to this file (path relative to the output root: BCS_OUTPUT_DIR or server cwd) instead of returning it inline. The response becomes a short summary {savedTo, records, bytes, sample}. Use for bulk data to keep the context clean. For get_candles this also enables full-history fetching (chunking beyond the 1000-bar API limit).
outputFormatNoFile format; default json (or csv if outputPath ends with .csv). csv writes the main flat array of the response.
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, etc. The description adds behavioral details about settlement slices, duplicate handling, and csv output, which go beyond annotations without contradiction.

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 informative but slightly verbose; it front-loads the main purpose but includes some explanatory details that could be streamlined. Still effective overall.

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?

Despite no output schema, the description thoroughly explains the return structure (positions, prices, P&L, totals by type) and covers edge cases like duplicate slices, making it complete for the tool's complexity.

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?

Input schema has 100% coverage with descriptions. The description adds context on term=all's effect on totals and csv output format, providing extra meaning beyond 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?

The description clearly states the tool retrieves the portfolio of the account bound to the token, listing positions with financial details. It distinguishes from sibling tools like get_limits or get_trades, which serve different purposes.

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?

The description explains the term parameter behavior (default single slice vs term=all duplicates) but does not explicitly guide when to use this tool over alternatives like get_trades or get_limits. It lacks when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/human-turn/bcs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server