Skip to main content
Glama

Get portfolio context

get_portfolio_context
Read-only

Analyze your portfolio with a deep snapshot of holdings, performance, and insights, including diversification and benchmark comparison.

Instructions

Use when the user asks to look at, review, or analyze THEIR portfolio / holdings / positions — e.g. "analyze my portfolio", "how is my portfolio doing", "what's in my portfolio", "review my holdings", "how am I invested", "what should I improve". Fetches a deep snapshot of ONE of the signed-in user's portfolios: the summary (value, day change, total return), every holding (with position weight %, sector and return) and Bullrun's computed insights (benchmark comparison, concentration, diversification, dividend income). Pass a portfolioId from list_portfolios (call that first if the user hasn't named a portfolio). The response ALWAYS returns the complete holdings list with each position flagged matched/unmatched, plus a coverage summary: holdings that Bullrun can't link to its universe (ETFs, funds, untracked tickers) carry no weight, sector, insight or ML score, so weights/insights/ML below describe ONLY the matched subset. Read the coverage banner (the first text block) and never present matched-only figures as the whole portfolio. For risk/diversification math, correlations, factor exposure, or whether to add a specific stock, use get_portfolio_analytics instead. Requires OAuth (read:portfolios) and returns the caller's own data only. privacyMode defaults to "full" (absolute $ included); "weights_only" returns only relative figures. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoInsights look-back window in days (default 30).
portfolioIdYesThe portfolio id, as returned by list_portfolios.
privacyModeNo"full" (default) includes absolute $; "weights_only" returns only relative figures.
Behavior5/5

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

The description discloses that it is read-only, returns the caller's own data only, and details the output structure (summary, holdings with weights/sectors/returns, and insights). It also warns about the coverage banner and that matched-only figures should not be presented as the whole portfolio. This goes well beyond the readOnlyHint annotation.

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 relatively long but well-structured: it starts with the primary use case, then details what is returned, then important caveats, then alternative tools, then authorization. Each sentence adds value. Slightly verbose but justified by the tool's complexity.

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?

Given no output schema, the description thoroughly explains the return value: summary (value, day change, total return), holdings (position weight %, sector, return), and insights (benchmark comparison, concentration, diversification, dividend income). It also covers the coverage nuance and privacyMode behavior. Completeness is excellent.

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 100%, so baseline is 3. The description adds context for portfolioId (explains it comes from list_portfolios) and privacyMode (explains 'weights_only' and 'full'), but does not significantly expand on days. This meets the baseline.

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 starts with a clear verb and resource: 'look at, review, or analyze THEIR portfolio'. It provides explicit usage triggers ('analyze my portfolio', 'how is my portfolio doing', etc.) and distinguishes from sibling tools by naming get_portfolio_analytics for risk/diversification.

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

Usage Guidelines5/5

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

The description explicitly states when to use ('Use when the user asks...'), when not to use ('For risk/diversification math... use get_portfolio_analytics'), and prerequisites ('call list_portfolios first if the user hasn't named a portfolio'). This provides complete 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/ferinator/bullrun-mcp'

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