Skip to main content
Glama

Get portfolio context

get_portfolio_context
Read-only

Fetches a signed-in user's portfolio snapshot—summary, holdings, weights, sectors, returns, and Bullrun insights—so you can review performance and find improvement areas.

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

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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/destructive/openWorld annotations: it discloses the OAuth scope (read:portfolios), the caller's-own-data restriction, the privacyMode default and its effect on returned figures, and a non-obvious data-quality behavior — unmatched holdings carry no weight/sector/insight so aggregate figures describe only the matched subset, with an instruction to read the coverage banner and never present matched-only numbers as the whole portfolio.

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-loaded with the trigger condition and dense throughout — nearly every sentence carries either a routing rule or a data-integrity warning. It is a long single block, and the privacyMode/portfolioId restatements duplicate the schema, which is the only thing keeping it from a 5.

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?

With no output schema, the description carries the burden and does so fully: it lists the response sections, flags the matched/unmatched coverage caveat and banner, states auth requirements and the privacy default, and points to the sibling for analytics. Nothing needed to call this 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%, so all three parameters are already documented in structured fields. The description largely restates what the schema says (portfolioId as returned by list_portfolios, privacyMode full vs weights_only) and never mentions `days` or its default/look-back meaning, so it adds little parameter-level meaning beyond what the schema provides.

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 — fetch a deep snapshot of ONE portfolio — and enumerates exactly what comes back (summary, holdings with weight/sector/return, Bullrun insights). It also names the two siblings it differs from: list_portfolios as the id source and get_portfolio_analytics for risk math, so an agent can route without opening a schema.

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?

Gives concrete trigger phrasing ("analyze my portfolio", "how am I invested"), an explicit sequencing prerequisite (pass a portfolioId from list_portfolios, call it first if the user hasn't named a portfolio), and an explicit exclusion with the correct alternative for risk/diversification/correlation/factor questions.

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