add_to_watchlist
Add to Portfolio
Add one company to one of the person's StockLens portfolios as a company they follow, so its score stays readable here. Call it only when the person has asked for it or agreed to an offer. Without portfolio_id or portfolio_name it adds to the default portfolio, and the result names the portfolio that received it. Relay the result's message, which says where the company went. A status other than added is an answer, not an error: relay its message and act on next_step. After an add the person accepted from a get_market_summary offer, call get_market_summary again to answer their question. One ticker per call; for a list of companies, use add_to_watchlist_batch. It does not trade, record a holding or move money.
輸入參數ticker必填exchangeportfolio_idportfolio_name
add_to_watchlist_batch
Add Several to Portfolio
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.
輸入參數rows必填confirm必填preview_idportfolio_idportfolio_nameconfirmed_indexes
discover_stocks
Discover Stocks
Screen the companies StockLens scores nightly by region, exchange, sector, industry, market-cap band and trading volume, sorted by one of the six StockLens scores or by market cap, volume or ticker, and return the top or bottom N. Popularity ordering is unavailable: analysis_volume and user_volume are retired and return VALIDATION_ERROR without running a screen. For a popularity request, ask the person to choose a supported ordering. Use it for any top N, best, worst, highest, lowest or filtered request across the companies StockLens scores, and never build such a list from get_market_summary or general knowledge; to compare only companies the person names, call get_market_summary for each instead. It has no valuation, price-target or growth filter; say so rather than calling a score sort one. status ranked means the requested order was used. When a ranked result carries message, relay it; it states what the ranking covers, so never present the rows as a ranking of more than that. browse_substituted means a score order was asked for and market-cap order with scores hidden was returned, so never describe those rows as ranked by score. locked means no companies are named; relay message verbatim. What the caller can sort and how far it reaches is in access_tier and reach_capped_at; signed_in_as names the account they belong to. Report only the rows returned. It does not trade and gives no personal recommendations.
輸入參數pagelimitsort_bymacro_indirectionsector_inexchange_inindustry_insearch_textvolume_floormarket_cap_band
fetch_analysis_result
Fetch Analysis Result
Return the progress or result of an analysis started with initiate_analysis, by its analysis_id. Each call returns the current state once and does not wait. While status is in_progress, or narrative.status is pending or running, check again only when the person asks, and no sooner than retry_after_seconds. A failed status is an answer; relay error_message. A complete result is the saved report: the composite score and rating word, the evidence word (Full, Core or Low), each domain's score, grade word and contribution (cornerstone, major, supporting or contextual), its key_drivers (up to three, each with its evidence), lens and domain_coverage, and its written summaries (domain conclusions, synthesis, key strengths and challenges) at either depth once narrative.status is ready. Until then relay message: pending or running means they are still being written, and you may briefly summarize the scores and evidence supplied but never write a summary, cause or reason the result does not contain; failed means they could not be completed, and the scores and evidence stand. It omits the web reader's factor cards, charts and per-anchor Explain views. Offer report_url as Open saved report to inspect factor values, peer context and ranked contributors where supplied; sign in to the owning StockLens account. It can open before the written summaries finish, and opening it does not start another run. Say how much a domain counts only with its contribution word, never as a number or share. It does not accept a ticker and does not rank companies.
輸入參數analysis_id必填
get_market_summary
Get Company Score
One company's latest nightly StockLens score: the composite score (0 to 100) and its rating word, the domain scores with their grade words, the named signals that most shaped the reading (up to three, each with its evidence), the business-model lens where one applies, and any domain that was not scored in it. Use the rating word for the company and grade words only for a domain. A higher Risk score means a stronger risk posture and less downside concern. Without an account, scores answer for the 600 largest companies by market value; a signed-in account also reaches any company in its own portfolios. A result with a status other than scored is an answer, not an error; do not retry it unchanged. Relay its message; not_in_surface means the company is scored and outside the caller's reach, never that StockLens has no analysis. Then act on next_step: for ask_user, ask the person and call the named tool only if they agree; mention an offer on a scored result at most once per conversation. Every result carries freshness; a stale result is StockLens's last computed reading for that listing, not last night's, and should be quoted with its date. When freshness.requested_ticker is present, say which listing was served and what was asked. If the person asks for factor values, peer context or ranked contributors beyond this snapshot, explain that a fresh analysis provides a saved web report with that evidence where available. It requires sign-in and may use an Analysis credit; ask whether they want one before calling initiate_analysis. A snapshot request alone is never permission to start a run. One ticker per call. To compare companies the person names, call it once for each. For any other top, best, worst or filtered request call discover_stocks, and never choose the companies for a ranking yourself.
輸入參數ticker必填exchange
get_portfolio_insights
Get Portfolio
Read one of the person's StockLens portfolios: every company in it, each marked holding or watching with its score and rating word, and the portfolio's average score and rating word, its change over 7 and 30 nights, its largest sector share and its biggest movers over 7 nights, each with a driver of its latest reading that points the same way. 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 window in which StockLens changed how it scores, so part of that change is the method, not the market. The scores are the ones get_market_summary serves, as of as_of. It does not rank or screen companies outside the portfolio; call discover_stocks for that. It holds no money figures and gives no personal advice.
輸入參數portfolio_idportfolio_name
initiate_analysis
Initiate Analysis
Start a fresh StockLens analysis of one company, only when the person asks for one or agrees to an offer of one in a get_market_summary result. A new run may use one Analysis credit, or one Plus Analysis credit when depth is plus; the result says if the person's plan does not include it. Use it for a requested evidence gap beyond the nightly snapshot, such as factor values, peer context or ranked contributors. Both depths include written domain summaries and synthesis when produced; Plus adds deeper synthesis and extra web cards where available. The assistant result is condensed; the saved web report has the factor cards and Explain views. It returns an analysis_id at once and finishes asynchronously; fetch the result with fetch_analysis_result when the person asks for it. new_run_started and reused_existing say whether a recent matching analysis was reused. One ticker per call. It does not rank or compare companies, and does not trade or move money.
輸入參數depthticker必填exchangetime_rangerisk_toleranceanalysis_emphasisevidence_history_family
Health check. Returns pong.
無需輸入參數。
remove_from_watchlist
Remove from Portfolio
Remove one company from one of the person's StockLens portfolios. Call it only when the person has asked for it. Without portfolio_id or portfolio_name it removes from the default portfolio, and the result names the portfolio. Relay the result's message. A status other than removed is an answer, not an error. A holding with recorded transactions is not removed here; the result says where to do it. One ticker per call. It does not trade or delete transactions.
輸入參數ticker必填exchangeportfolio_idportfolio_name