Skip to main content
Glama

Get Portfolio

get_portfolio_insights
Read-onlyIdempotent

Read one of the person's StockLens portfolios: every company, holding or watching, with its score, rating word, market and Fundamental standing in that market, its largest sector share and its 7-night movers, each with its market and a same-direction driver from its latest reading. A one-market portfolio adds that market's average score, rating word and change over 7 and 30 nights; across markets, scores are not on one scale, so there is no average: relay scale_note and markets. Without portfolio_id or portfolio_name it reads the default portfolio. portfolios lists every portfolio the person owns and appears only when there is more than one: then name the portfolio you read once and offer the others by name. With one portfolio, never name it. A portfolio the person does not own returns portfolio_not_found with the choices; never guess. Relay message, caption, trust and concentration as written. If a window says insufficient_data, say so; do not estimate a change. config_changed marks a scoring-method change inside a window. The scores are the ones get_market_summary serves, as of as_of. To rank or screen other companies, call discover_stocks. No money figures, no personal advice. For a mover's dated source give its event_date or the measured window, never the reading's date. A successful result counts once toward the person's weekly research allowance; a RATE_LIMITED result states the limit and when it renews, so relay it and do not call again before then.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_portfolio_insights"
  }
}

Input Schema

NameRequiredDescriptionDefault
portfolio_idNoThe id of the portfolio to read, as a portfolios list gives it. Optional: without it or portfolio_name the default portfolio is read.
portfolio_nameNoThe name of the portfolio to read, as the person names it (exact, case does not matter). Optional.

Output Schema

NameRequiredDescriptionDefault
as_ofNo
scopeYes
trustNo
ratingNo
statusYes
captionNo
marketsNo
messageNo
companiesNo
next_stepNo
fund_countNo
is_defaultNo
populationNo
portfoliosNo
scale_noteNo
top_moversNo
portfolio_idNo
tier_limitedNo
company_countNo
concentrationNo
movers_windowNo
window_changeNo
average_marketNo
holdings_countNo
list_companiesNo
portfolio_nameNo
portfolio_countNo
scored_company_countNo
scored_holdings_countNo
average_composite_scoreNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedOutput schema / properties / top_movers / items / properties / driver / properties / event_date
      Added value: +{
      +  "description": "That event's own day (ISO): name it with the event, e.g. On the Oct 29 earnings call; never the reading's date.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / top_movers / items / properties / driver / properties / event_kind
      Added value: +{
      +  "description": "A certified discrete source (earnings_call, sec_filing, insider_transaction) or measured window (insider_activity, news_coverage, analyst_activity, edinet_large_holding).",
      +  "type": "string"
      +}
    • addedOutput schema / properties / top_movers / items / properties / driver / properties / event_window_end
      Added value: +{
      +  "description": "A measured aggregate's window end (ISO).",
      +  "type": "string"
      +}
    • addedOutput schema / properties / top_movers / items / properties / driver / properties / event_window_start
      Added value: +{
      +  "description": "A measured aggregate's window start (ISO); name the window, never one report.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / top_movers / items / properties / driver / properties / latest_material_event_date
      Added value: +{
      +  "description": "The latest material event inside an aggregate's window (ISO).",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / top_movers / items / properties / driver / properties / company_figure
      Added value: +{
      +  "type": [
      +    "null",
      +    "string"
      +  ]
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / companies / items / properties / canonical_url
      Added value: +{
      +  "description": "Public company page for this listing. It shows the current nightly reading.",
      +  "type": "string"
      +}
  4. Changed15 schema fields changed
    • removedOutput schema / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / companies / items / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / concentration / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / concentration / properties / sectors / items / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / list_companies / items / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / markets / items / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / markets / items / properties / fundamental_standing / items / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / next_step / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / next_step / properties / arguments / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / portfolios / items / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / top_movers / items / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / top_movers / items / properties / driver / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / window_change / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / window_change / properties / 1m / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / window_change / properties / 1w / additionalProperties
      Removed value: -false
  5. Changed9 schema fields changed
    • addedOutput schema / properties / average_market
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / companies / items / properties / market
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / companies / items / properties / standing
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / companies / items / properties / standing_as_of
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / companies / items / properties / standing_note
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / list_companies
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "exchange": {
      +        "type": "string"
      +      },
      +      "ticker": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "ticker",
      +      "exchange"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • addedOutput schema / properties / markets
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "as_of": {
      +        "type": "string"
      +      },
      +      "companies": {
      +        "type": "integer"
      +      },
      +      "fundamental_standing": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "companies": {
      +              "type": "integer"
      +            },
      +            "standing": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "standing",
      +            "companies"
      +          ],
      +          "type": "object"
      +        },
      +        "type": [
      +          "null",
      +          "array"
      +        ]
      +      },
      +      "market": {
      +        "type": "string"
      +      },
      +      "no_standing_recorded": {
      +        "type": "integer"
      +      },
      +      "note": {
      +        "type": "string"
      +      },
      +      "population": {
      +        "type": "integer"
      +      },
      +      "scored_companies": {
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "market",
      +      "companies",
      +      "scored_companies"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • addedOutput schema / properties / scale_note
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / top_movers / items / properties / market
      Added value: +{
      +  "type": "string"
      +}
  6. Changed1 schema field changed
    • addedOutput schema / properties / top_movers / items / properties / driver / properties / peer_group
      Added value: +{
      +  "type": [
      +    "null",
      +    "string"
      +  ]
      +}
  7. Changed30 schema fields changed
    • addedInput schema / properties
      Added value: +{
      +  "portfolio_id": {
      +    "description": "The id of the portfolio to read, as a portfolios list gives it. Optional: without it or portfolio_name the default portfolio is read.",
      +    "type": "string"
      +  },
      +  "portfolio_name": {
      +    "description": "The name of the portfolio to read, as the person names it (exact, case does not matter). Optional.",
      +    "type": "string"
      +  }
      +}
    • removedOutput schema / properties / aggregate_signal
      Removed value: -{
      -  "type": [
      -    "null",
      -    "string"
      -  ]
      -}
    • addedOutput schema / properties / as_of
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / average_composite_score
      Added value: +{
      +  "type": [
      +    "null",
      +    "integer"
      +  ]
      +}
    • addedOutput schema / properties / caption
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / companies
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "company_name": {
      +        "type": "string"
      +      },
      +      "composite_score": {
      +        "type": [
      +          "null",
      +          "number"
      +        ]
      +      },
      +      "exchange": {
      +        "type": "string"
      +      },
      +      "freshness": {
      +        "enum": [
      +          "aging",
      +          "stale"
      +        ],
      +        "type": "string"
      +      },
      +      "instrument": {
      +        "enum": [
      +          "fund"
      +        ],
      +        "type": "string"
      +      },
      +      "last_scored": {
      +        "type": "string"
      +      },
      +      "mode": {
      +        "enum": [
      +          "holding",
      +          "watching"
      +        ],
      +        "type": "string"
      +      },
      +      "rating": {
      +        "type": "string"
      +      },
      +      "ticker": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "ticker",
      +      "exchange",
      +      "mode"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • addedOutput schema / properties / company_count
      Added value: +{
      +  "type": [
      +    "null",
      +    "integer"
      +  ]
      +}
    • addedOutput schema / properties / concentration
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "lead": {
      +      "type": "string"
      +    },
      +    "note": {
      +      "type": "string"
      +    },
      +    "sectors": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "companies": {
      +            "type": "integer"
      +          },
      +          "sector": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "sector",
      +          "companies"
      +        ],
      +        "type": "object"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    }
      +  },
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
    • addedOutput schema / properties / fund_count
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / holdings_count
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / is_default
      Added value: +{
      +  "type": [
      +    "null",
      +    "boolean"
      +  ]
      +}
    • addedOutput schema / properties / message
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / movers_window
      Added value: +{
      +  "enum": [
      +    "7_nights"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / next_step
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "arguments": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "exchange": {
      +          "type": "string"
      +        },
      +        "ticker": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "ticker"
      +      ],
      +      "type": [
      +        "null",
      +        "object"
      +      ]
      +    },
      +    "description": {
      +      "type": "string"
      +    },
      +    "kind": {
      +      "enum": [
      +        "call_tool",
      +        "ask_user",
      +        "human_action"
      +      ],
      +      "type": "string"
      +    },
      +    "options": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    },
      +    "tool": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "kind"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
    • addedOutput schema / properties / population
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / portfolio_count
      Added value: +{
      +  "type": [
      +    "null",
      +    "integer"
      +  ]
      +}
    • addedOutput schema / properties / portfolio_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / portfolio_name
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / portfolios
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "company_count": {
      +        "type": "integer"
      +      },
      +      "is_default": {
      +        "type": "boolean"
      +      },
      +      "portfolio_id": {
      +        "type": "string"
      +      },
      +      "portfolio_name": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "portfolio_id",
      +      "portfolio_name",
      +      "is_default",
      +      "company_count"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • addedOutput schema / properties / rating
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / scored_company_count
      Added value: +{
      +  "type": [
      +    "null",
      +    "integer"
      +  ]
      +}
    • addedOutput schema / properties / scored_holdings_count
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / status
      Added value: +{
      +  "enum": [
      +    "ok",
      +    "empty",
      +    "portfolio_not_found"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / tier_limited / type
      Previous value: -"boolean"New value: +[
      +  "null",
      +  "boolean"
      +]
    • addedOutput schema / properties / top_movers
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "change": {
      +        "type": "number"
      +      },
      +      "composite_score": {
      +        "type": "number"
      +      },
      +      "driver": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "context": {
      +            "type": [
      +              "null",
      +              "string"
      +            ]
      +          },
      +          "domain": {
      +            "type": [
      +              "null",
      +              "string"
      +            ]
      +          },
      +          "kind": {
      +            "enum": [
      +              "SUPPORTIVE",
      +              "HEADWIND",
      +              "MIXED",
      +              "COVERAGE_GAP",
      +              "NEUTRAL_NOT_MATERIAL"
      +            ],
      +            "type": "string"
      +          },
      +          "label": {
      +            "type": "string"
      +          },
      +          "metric": {
      +            "type": [
      +              "null",
      +              "string"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "kind",
      +          "label"
      +        ],
      +        "type": [
      +          "null",
      +          "object"
      +        ]
      +      },
      +      "mode": {
      +        "enum": [
      +          "holding",
      +          "watching"
      +        ],
      +        "type": "string"
      +      },
      +      "rating": {
      +        "type": "string"
      +      },
      +      "ticker": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "ticker",
      +      "mode",
      +      "change",
      +      "composite_score",
      +      "rating"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • removedOutput schema / properties / total_holdings
      Removed value: -{
      -  "type": "integer"
      -}
    • addedOutput schema / properties / trust
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • removedOutput schema / properties / watchlist
      Removed value: -{
      -  "items": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "analysis_date": {
      -        "type": [
      -          "null",
      -          "string"
      -        ]
      -      },
      -      "company_name": {
      -        "type": "string"
      -      },
      -      "composite_grade": {
      -        "type": [
      -          "null",
      -          "string"
      -        ]
      -      },
      -      "composite_score": {
      -        "type": [
      -          "null",
      -          "number"
      -        ]
      -      },
      -      "exchange": {
      -        "type": "string"
      -      },
      -      "ticker": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "ticker",
      -      "company_name",
      -      "exchange"
      -    ],
      -    "type": "object"
      -  },
      -  "type": [
      -    "null",
      -    "array"
      -  ]
      -}
    • addedOutput schema / properties / window_change
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "1m": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "change": {
      +          "type": [
      +            "null",
      +            "number"
      +          ]
      +        },
      +        "config_changed": {
      +          "type": "boolean"
      +        },
      +        "insufficient_data": {
      +          "type": "boolean"
      +        }
      +      },
      +      "type": [
      +        "null",
      +        "object"
      +      ]
      +    },
      +    "1w": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "change": {
      +          "type": [
      +            "null",
      +            "number"
      +          ]
      +        },
      +        "config_changed": {
      +          "type": "boolean"
      +        },
      +        "insufficient_data": {
      +          "type": "boolean"
      +        }
      +      },
      +      "type": [
      +        "null",
      +        "object"
      +      ]
      +    }
      +  },
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "watchlist",
      -  "total_holdings",
      -  "tier_limited",
      -  "scope"
      -]New value: +[
      +  "status",
      +  "scope"
      +]
  8. Changed2 schema fields changed
    • addedOutput schema / properties / scope
      Added value: +{
      +  "enum": [
      +    "user_watchlist"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "watchlist",
      -  "total_holdings",
      -  "tier_limited"
      -]New value: +[
      +  "watchlist",
      +  "total_holdings",
      +  "tier_limited",
      +  "scope"
      +]
  9. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/no-open-world, and the description adds substantial behavior beyond them: cross-market scores are not comparable so there is no average, insufficient_data windows must not be estimated, config_changed signals a method change, portfolio_not_found lists choices, and a successful read consumes one weekly research allowance with RATE_LIMITED reporting renewal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Roughly 250 words of densely packed, run-on instruction for a two-parameter read tool, with many sentences devoted to output-formatting and relay rules that an existing output schema already covers. The purpose is front-loaded, but the middle section is a wall of imperative clauses with no structural separation between selection, error handling, and presentation rules.

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 a zero-required-parameter read tool with sibling overlap and an output schema, the definition covers everything an agent needs: default behavior, multi-portfolio routing, cross-market scale caveats, error states, rate limiting, and what not to do (no money figures, no personal advice). No practical gap remains.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema lacks: what happens when neither param is supplied (default portfolio), that the portfolios list appears only with multiple portfolios, how to present the chosen name to the user, and that a non-owned portfolio returns portfolio_not_found with the available choices rather than a silent failure.

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?

Opens with a specific verb+resource ('Read one of the person's StockLens portfolios') and enumerates the payload: every company with score, rating word, market standing, largest sector share, 7-night movers. It also explicitly separates itself from siblings, noting the scores are the ones get_market_summary serves and that discover_stocks is for ranking/screening other companies.

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 when-to-use/when-not rules: omit both params to read the default, use the portfolios list when more than one exists, name the portfolio once but never name a single portfolio, and switch to discover_stocks for ranking others. It also forbids guessing on ownership and tells the agent not to retry before the rate limit renews.

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