Skip to main content
Glama

Add Several to Portfolio

add_to_watchlist_batch

Add a list of companies the person gave you, up to 100 rows, to one of their StockLens portfolios, in two calls. First call with confirm false: nothing is added and every row returns its outcome. Relay summary_line and message, then every row that is not a plain add, grouped by outcome, and name the plain adds in one line; name the portfolio only when portfolio_count is above 1. Ask which rows to add. Then call with confirm true, the preview_id, the same rows, the same portfolio and the confirmed_indexes the person approved. Send only rows the person gave you. For an ambiguous row, ask which listing using its candidates; never pick one. Add a not_covered row only if the person asks for it. A changed list or a different portfolio needs a new preview; preview_mismatch means the preview expired or no longer matches, so preview again. Without portfolio_id or portfolio_name it uses the default portfolio. It does not trade, record holdings or move money.

Input Schema

NameRequiredDescriptionDefault
rowsYesThe companies the person gave you, one per row, in their order. Never add a row they did not name.
confirmYesfalse previews the list and adds nothing. true adds the rows of confirmed_indexes from the preview that preview_id names.
preview_idNoThe preview_id the preview returned. Required when confirm is true.
portfolio_idNoThe id of the portfolio to add to, as get_portfolio_insights lists it. Optional: without it or portfolio_name the list goes to the default portfolio.
portfolio_nameNoThe name of the portfolio to add to, as the person names it (exact, case does not matter). Optional.
confirmed_indexesNoThe index of every row the person approved, from the preview. Required when confirm is true.

Output Schema

NameRequiredDescriptionDefault
rowsNo
scopeYes
reasonNo
statusYes
messageNo
summaryNo
capacityNo
next_stepNo
is_defaultNo
portfoliosNo
preview_idNo
portfolio_idNo
summary_lineNo
company_countNo
portfolio_nameNo
portfolio_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the generic profile (not read-only, not idempotent, closed-world), while the description supplies the operationally important behavior: the preview writes nothing, preview_mismatch semantics, default-portfolio fallback, ambiguity handling, and a scope boundary ('does not trade, record holdings or move money'). That is substantial context beyond what annotations convey.

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 purpose and the preview-then-confirm rule are front-loaded and every sentence carries an operational rule. It is dense, however: the mid-paragraph instruction about relaying summary_line, message, grouped outcomes and portfolio_count is presentation scripting that makes the description longer than the invocation contract strictly requires.

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?

For a two-phase, stateful, partially irreversible batch write, the description covers gating, error recovery, defaults, ambiguity policy and scope exclusions, and an output schema exists so return values need not be re-explained. An agent has everything needed to drive both calls correctly.

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 description coverage is 100%, so the baseline is 3, but the description adds workflow meaning: how confirm, preview_id and confirmed_indexes interlock across the two calls, and what happens when portfolio_id/portfolio_name are omitted. Some of this (default portfolio, preview_id required when confirm=true) duplicates the schema, so it falls short of fully additive.

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 opening sentence states a specific verb and resource with explicit scope: add up to 100 company rows to one StockLens portfolio via a two-call preview/confirm flow. The batch scope plus the 'up to 100 rows' limit inherently separates it from the single-entry sibling add_to_watchlist, so an agent can select it correctly without opening the 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?

It prescribes exactly when to call with confirm=false (preview only, nothing added) versus confirm=true (adds confirmed_indexes from preview_id), and how to recover from failure states ('a changed list or a different portfolio needs a new preview; preview_mismatch means the preview expired'). It also gives exclusion rules — never pick an ambiguous listing for the user, only add a not_covered row if asked — leaving almost nothing to inference.

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