openInvest
PYPI · OPENINVEST
Investment runtime for AI agents — LLM investment committee, portfolio ledger, decision accounting
Available components
Last scanned (13 hours ago)
Scores higher than 54% of PyPI servers
Category Finance and Payments
How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. How we score → Why this is hard to score →
Supply Chain Security50
- Malware scan not yet available for this package.Unverified
- No known CVEs affecting this package version or its production dependencies.Pass
- Runs hatchling.build at install time, a recognised build step with no custom scripting around it. View diagnostics → Pass
- 7 of 90 dependencies flagged as unhealthy. View diagnostics → Partial
Provenance & Transparency45
- Source repository is publicly reachable at the declared URL. View diagnostics → Pass
- Build provenance not yet verified. View diagnostics → Unverified
- Clear OSI-approved license (MIT).Pass
- Actively maintained (last published 11 days ago).Pass
- Disclosure check failed: no security disclosure policy was found in the source repository. See how to fix → Fail
Schema Quality & AI Usability62
- AI-judged instruction clarity (excellent).Pass
- Context-footprint check failed: tool/resource definitions use about 12619 tokens (~300/item across 42 items; 42 tools + 0 resources), over budget; trim descriptions and params. See how to fix → Fail
- Usage-examples check failed: none of the tools include examples. See how to fix → Fail
Stability & Change Management63
- Stability observed for 19 of 30 days with no destabilising changes; credit accrues until the full window elapses.Partial
Tool Coverage99
- 100% of tools have a non-trivial description (not blank, and not just the tool's name).Pass
- 95% of tool parameters carry a description.Partial
- Structured output schemas are declared (98% of tools); any adoption earns full credit.Pass
Tool Safety100
- No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.Pass
- All 3 tool(s) whose name or description implies an irreversible operation declare an MCP destructiveHint annotation.Pass
- An AI judge read all 43 captured unit(s) of tool text and found none that tries to manipulate the model reading it.Pass
Capabilities100
- Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.Pass
Checks we ran (14)
- Known CVEs
- Install scripts
- Dependency health
- Source repository
- License
- Maintenance
- Security disclosure
- Schema quality
- Stability
- Tool coverage
- Injection markers
- Destructive annotations
- Judged manipulation
- MCP protocol
Checks we could not complete (2)
These are gaps on our side, not findings about this package. We only credit what we can confirm, so a category made up entirely of them scores 0.
- Malware scan in Supply Chain SecurityMalware scan not yet available for this package.
- Provenance in Provenance & TransparencyBuild provenance not yet verified.
Does not apply to this package (2)
- Endpoint SecurityScored on hosted endpoints only. A package has no live endpoint of its own for us to probe.
- Transport & ReachabilityScored on hosted endpoints only. A package has no live endpoint of its own for us to probe.
The score does not measure everything. What the score does not measure →
Every change we have recorded for this component, newest first. Security-relevant changes are always shown. ▲ marks a change for the better, ▼ a change for the worse; unmarked changes are neutral.
- 21 Nov 26 −14
- Malware scan: pass → unverified ▼ security
- Provenance: fail → unverified ▼ security
- 20 Nov 26 +15
- Malware scan: unverified → pass ▲ security
- 19 Nov 26 −15
- Malware scan: pass → unverified ▼ security
- 18 Nov 26 +16
- Malware scan: unverified → pass ▲ security
- 17 Nov 26 −15
- Malware scan: pass → unverified ▼ security
- 16 Nov 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 43 to 47. That category is still filling its 30-day observation window: 13 days of observed history at the previous scan, 14 at this one. The score rises as the window fills, whether or not the server changes.
- 15 Nov 26 +15
- Malware scan: unverified → pass ▲ security
- Package version: 0.68.1 → 0.68.10 functional
- 14 Nov 26 −14
- Malware scan: pass → unverified ▼ security
Diagnostic detail from the automated scan of this channel: what the scanner observed at each step, so you can see exactly where a check passed or failed. It is informational only and never changes the trust score.
Captured 21 Nov 2026 · Analysed pypi/openinvest@0.68.10
Provenance Inconclusive
We could not complete the check, so nothing is claimed either way. This is a gap on our side, not a finding about the package.
| Result | Inconclusive |
|---|---|
| Ecosystem | pypi |
| Reason | Attestation not fetched |
Background: How many MCP packages publish verified provenance →
Install scripts 1 script
| Hook | Tier | Command |
|---|---|---|
| build_backend | Known build tool | hatchling.build |
Background: Why install scripts are a supply-chain risk →
Dependencies 90 packages
| Packages resolved | 90 |
|---|---|
| Stale | 7 |
| Tree resolution | Complete |
Background: SBOMs and build attestations, explained →
The tools this component advertises to a client, with an estimated token cost for each. Expand a tool to see its parameters and schema. The per-tool counts are indicative and are not scored directly; the schema's total context footprint is one signal in Schema Quality & AI Usability. A tool's description is untrusted text the model reads on every call, which is what makes this list a security surface and not just an inventory: how tool poisoning works →
add_news_source ~161
Add an RSS/Atom feed to the crawler's source list. The URL must be http(s) on a public host (fetched directly, not via HTTP(S)_PROXY), and is live-probed before saving — a URL that doesn't parse as a feed is rejected. Idempotent: re-adding an existing URL returns the existing entry. Capped so the list can't grow unbounded. Use when someone says "follow <site>'s news" / "加个新闻源".
| Name | Type | Req | Description |
|---|---|---|---|
| name | string | yes | Short slug for the feed, [a-z0-9_] (e.g. 'wsj_markets'). |
| url | string | yes | RSS/Atom feed URL (a real feed, not a webpage). |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
buy ~703
Record a buy in the local ledger: adds to an existing position with weighted-average cost, or opens a new position for an unseen symbol. This bookkeeps a trade the user already placed with their broker — openInvest never places real orders. Confirm symbol, units, and price with the user before calling; this moves ledger cash. A position the user already held before using openInvest is not a purchase: record it with `record_existing_position`. Off-exchange China mutual funds (`FUND:<6 digits>`) settle T+1 or later at the NAV of the pricing day: use `place_fund_order` + `confirm_fund_order` instead (buy books them as instantly filled and total assets dip by the amount until the real confirmation). Args: symbol: yfinance ticker (e.g. "AAPL", "510300.SS"). Gold = "GC=F", booked in CNY per gram only (units = grams, currency "CNY", kind "metal", unit_label "克"). units: Quantity bought; must be > 0. price: Execution price per unit, in `currency`. currency: Currency of `price`; omitted = the existing position's currency (CNY if new). kind: Asset kind tag: "equity", "etf", "metal" (gold), "crypto", "bond", "fund", "other". unit_label: Human display label for units (default "股", i.e. shares). idempotency_key: Reuse the same key when retrying this exact call; recorded once. Returns: Updated position summary, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| currency | – | – | Currency of `price`, e.g. 'CNY', 'USD', 'AUD'. Omit to use the existing position's currency (CNY for a new position); a different currency than the position's is rejected. |
| existing_position | boolean | – | Not supported on buy. For a position held before using openInvest call `record_existing_position`; passing true here returns an error instead of deducting cash. |
| idempotency_key | – | – | Optional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "dupl… |
| kind | string | – | Asset kind tag: 'equity', 'etf', 'metal' (gold), 'crypto', 'bond', 'fund', 'other'. |
| price | number | yes | Execution price per unit, in `currency`. |
| symbol | string | yes | yfinance ticker, e.g. 'AAPL', '510300.SS'. Gold is 'GC=F' and must be booked per gram in CNY: units = grams, price = CNY/gram, currency='CNY', kind='metal', unit_label='克' (USD/oz bookings are reject… |
| unit_label | string | – | Human display label for units (default '股', i.e. shares). |
| units | number | yes | Quantity bought; must be > 0. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
cancel_fund_order ~136
Cancel an in-transit off-exchange fund order that was never executed (the user withdrew it on the fund platform): the amount returns to ledger cash. Only orders still in transit can be cancelled — a confirmed order already holds shares (use `sell` to book a redemption). Confirm with the user before calling; this moves ledger cash. Args: order_id: The in-transit order to cancel. Returns: Cash returned and new balance, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| order_id | string | yes | order_id of an in-transit order (status 'placed'). |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
collect_news ~72
Capture fixed news providers and durable per-source coverage, without a model call. Capture is not proof of source truth or completed normalization. Incomplete windows remain pending; never infer a quiet market from this failure.
| Name | Type | Req | Description |
|---|---|---|---|
| since | – | – | Explicit initial source window start, timezone-aware ISO time; omit only to resume existing coverage. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
committee_review ~39
Retrieve unchanged original transcript and issued verification packet; never completes work.
| Name | Type | Req | Description |
|---|---|---|---|
| context_id | string | yes | Exact context_id for this ledger's previously submitted draft. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
confirm_fund_order ~311
Second leg of an off-exchange fund purchase: turn an in-transit order into shares at the pricing day's NAV (units = (amount - fee) / nav; average cost updates, cash unchanged). The `fund_confirm` job does this automatically every weekday evening, so call it manually only to supply a NAV / fee yourself or to confirm early. Safe to call twice: an order that is already confirmed returns {"status": "already_confirmed"} (a cancelled one {"status": "cancelled"}) and nothing changes. If the pricing-day NAV is not published yet the result is {"status": "pending_nav"} and the order stays in transit. Args: order_id: The order to confirm. nav: Unit NAV; omit to use the published NAV of the pricing day. fee: Subscription fee in CNY (default 0). Returns: Units added, NAV used and new average cost, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| fee | – | – | Actual subscription fee. Omit when unknown; use explicit 0 only for a known zero fee. Without both reported NAV and fee this creates only a tracking projection. |
| nav | – | – | Unit NAV to confirm at. Omit to fetch the pricing day's published NAV (if it isn't published yet the call returns status 'pending_nav' and changes nothing). |
| order_id | string | yes | order_id from place_fund_order / status.pending_fund_orders. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
daily_report ~129
Assemble today's daily report (portfolio, verdicts, performance, holdings digest) and return it as `full_report` Markdown for you to deliver. Agent mode (keyless backend): run prepare_committee → roles → submit_committee for every target asset FIRST; this tool then only reads today's submitted verdicts — nothing is re-run by a backend model. Assets without a submitted verdict are listed in `missing_verdicts`: treat any entry there as a failure and report it. Backend mode: runs the backend committee itself (needs a backend LLM key, takes minutes).
Input schema present but exposes no named parameters.
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
decisions ~332
Get the unified decision ledger: every committee verdict joined with rule interventions, the user's actual executions or refusals (with reasons), and post-hoc outcome data — plus an adoption-rate summary. Answers "how often did I follow the advice", "which recommendations did I skip", and "what did the safety rules rewrite". Read-only. Filter by `symbol` / `verdict` to answer questions about one asset or one kind of call; the list is capped at `limit` (newest first) so a year of history doesn't flood the context — `count` and `summary` still cover every match. Args: days: Look-back window in days (default 90). symbol: Only decisions on this ticker (case-insensitive). verdict: Only decisions with this verdict. limit: Max decisions listed (default 20; 0 = all). Returns: Object with `count` (all matches), `returned` (listed), `summary` (adoption rate and aggregates over all matches), and `decisions` (newest first; each entry has decision_id, verdict, confidence, intervention, executed flag, matched trades, and outcome).
| Name | Type | Req | Description |
|---|---|---|---|
| days | integer | – | Look-back window in days. |
| limit | integer | – | Max decisions listed, newest first; 0 = all. |
| symbol | – | – | Only this ticker (case-insensitive), e.g. 'GC=F'. |
| verdict | – | – | Only this verdict, e.g. 'ACCUMULATE', 'HOLD', 'TRIM'. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
deposit ~244
Record a cash deposit into the ledger, in any currency. Bookkeeping only — no real payment system is connected. Args: currency: ISO-style currency code, e.g. "CNY", "USD", "AUD". amount: Amount to add; must be > 0. idempotency_key: Reuse the same key when retrying this exact call; recorded once. Returns: Updated cash balances, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| amount | number | yes | Amount to add; must be > 0. |
| currency | string | yes | ISO-style currency code, e.g. 'CNY', 'USD', 'AUD'. |
| idempotency_key | – | – | Optional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "dupl… |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
discipline ~122
Get the committee's discipline ledger: how often it chose inaction (HOLD ratio), how many impulsive user trades its rules intercepted, and the counterfactual money saved/lost by those interventions (ADR-023: the system's proven value is discipline and transparency, not alpha). Use when the user asks "what has the committee blocked" or "is this tool actually helping". Read-only. Returns: Object with `summary` (structured stats) and `markdown` (the same ledger pre-rendered for direct display to the user).
Input schema present but exposes no named parameters.
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
doctor ~231
Health check, the first call of a session (same output as `run.sh doctor`, for agents without shell access): is onboarding done, and which optional pieces are missing. `status` is "ready" when memory (user / strategy / portfolio) is initialized, or "needs_setup" when it is not (or portfolio.md is still the v1 format) — only then hand over to the `invest-setup` skill. A missing LLM key or mail credentials never makes it "needs_setup": those `checks` entries are marked `optional_for_coordinator` / `optional_for_email`. The Coordinator path (`prepare_committee` + subagents) works without a key; only the Direct path (`run_committee`, cron) needs one, see `direct_ready`. Read-only; makes one short HTTP probe to the configured LLM endpoint when a key is set. Returns: Object with `status`, `version`, `coordinator_ready`, `direct_ready`, `next_step`, and `checks` (name / status / detail / hint per check).
Input schema present but exposes no named parameters.
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
event_history ~51
Read qualified current events and source evidence. This is not a scan watermark or a duplicate veto.
| Name | Type | Req | Description |
|---|---|---|---|
| hours | integer | – | Current qualified-event lookback hours. |
| limit | integer | – | Maximum returned qualified events. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
explain_decision ~229
Get the full reasoning behind one committee verdict: the complete 4-role debate transcript with the CIO memo, plus the path-probability snapshot the CIO saw at decision time. Use when the user asks "why was today's verdict HOLD" or wants to audit a past decision. Read-only. Args: decision_id: "<date>/<symbol>", e.g. "2026-07-03/GC=F" — exactly as returned in the `decisions` tool output. Returns: Object with verdict, confidence (the CIO's self-reported number, kept for the record), `confidence_lookup` (show this to the user instead: how similar verdicts (live + paper fleet) turned out 30 days later), alloc_cny, `transcript_markdown` (render this to the user), and `path_snapshot` (may be null).
| Name | Type | Req | Description |
|---|---|---|---|
| decision_id | string | yes | "<date>/<symbol>", e.g. "2026-07-03/GC=F" — exactly as returned by the decisions tool. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
history ~105
Get the most recent trade records and committee verdict history. Use when the user asks "what did I buy recently" or "what did the committee decide lately". Read-only. Args: n: Maximum number of recent trades to return (default 10). Returns: Object with `trades` (each with symbol, direction, units, price, timestamp, status) and recent committee verdict records.
| Name | Type | Req | Description |
|---|---|---|---|
| n | integer | – | Maximum number of recent trades to return. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
ingest_event ~685
Feed a finance news item you (the host agent) found into the event ledger, graded and mapped to affected symbols, stored for committee RAG recall. Preferred: normalize it yourself — pass `one_line_claim`, `stance`, `severity` (and ideally `affected_symbols`). The backend then only validates and stores it; no backend model is involved. Without those fields the backend model normalizes it, which fails when the backend runs keyless (agent mode) — you get an error telling you which fields to add. You have far better search reach than the self-hosted crawler (including Chinese-language sources) — proactively feed news relevant to the user's holdings, especially A-share/regional coverage the crawler misses. Identical source snapshots are idempotent. Material corrections retain versions; a shared topic or URL never proves a correction is duplicate. Structured input needs no backend LLM key and grants no learning permission. Args: title: Headline of the news item. url: Canonical source URL (also the dedup key). snippet: Short excerpt or summary of the article body. source: Publisher name (e.g. "Reuters") — the news outlet. published_at: ISO 8601 publication time, if known. ingested_by: Your own agent identity (e.g. "hermes") for provenance; distinct in meaning from `source`. Returns: Ingestion result with the normalized event id(s), dedup status, and `committee_task_id` — set when a new holding-relevant event (severity ≥ mid, non-neutral) triggered a rate-limited committee re-run. In agent mode it is "queued:<id>": the re-run waits for you in `pending_committees`. This tool is disabled in advisory mode.
| Name | Type | Req | Description |
|---|---|---|---|
| affected_symbols | – | – | yfinance tickers the event materially affects, e.g. ['GC=F']. |
| entities | – | – | Key entities (countries, companies, central banks), lowercase. |
| event_type | – | – | e.g. 'macro', 'policy', 'earnings', 'geopolitics', 'commodity', 'other'. |
| ingested_by | string | – | Your own agent identity (e.g. 'hermes') for provenance; distinct from source. |
| one_line_claim | – | – | Your one-sentence factual summary. Fill this (plus stance and severity) to ingest without any backend model — preferred. |
| published_at | – | – | ISO 8601 publication time, if known. |
| severity | – | – | 'low', 'mid' or 'high'. Required with one_line_claim. |
| snippet | string | – | Original source excerpt copied verbatim; keep your interpretation in one_line_claim and assessed labels. |
| source | string | – | Publisher name (e.g. 'Reuters') — the news outlet. |
| source_snapshot_id | – | – | Exact pending_news source snapshot to bind. Original source fields remain immutable; labels are your interpretation. |
| stance | – | – | For the holdings: 'risk', 'opportunity' or 'neutral'. Required with one_line_claim. |
| title | string | yes | Headline of the news item. |
| url | string | yes | Publisher URL or backend-issued source locator from pending_news. A snapshot locator requires binding to this instance's captured original. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
live_prices ~190
Fetch a one-shot market backdrop: spot gold (USD/oz and CNY/gram), USDCNY and AUDCNY FX rates, the NDQ.AX ETF price, the VIX volatility index, and the 10-year US Treasury yield (TNX). A fixed set of reference instruments, independent of what the user holds (use `status` for the user's own positions). Use for quick market context before analysis or when the user asks "how is the market / what's the gold price". Read-only; single batch, no arguments. Returns: Object keyed by instrument (GC_F_usd_per_oz, gold_cny_per_gram_spot, USDCNY, AUDCNY, NDQ_AX, VIX, TNX) plus `as_of` ISO timestamp. A field is null when its upstream quote is unavailable.
Input schema present but exposes no named parameters.
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
news_sources ~72
List the news feed sources the crawler pulls from: the built-in default feeds plus user-added extra feeds. Extra feeds can be added/removed with add_news_source / remove_news_source; defaults are fixed. Use when someone asks "what news sources do you follow" or before adding/removing a source.
Input schema present but exposes no named parameters.
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
pending_committees ~71
Committee re-runs that events or price moves requested while reasoning is delegated to you (agent mode). For each item run `prepare_committee`, the roles, then `submit_committee`; an item is done once a newer verdict for that symbol is submitted. Requests expire after 24h.
Input schema present but exposes no named parameters.
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
pending_news ~164
News the backend fetched but did not normalize because reasoning is delegated to you (agent mode). For each relevant item call `ingest_event` with `one_line_claim` / `stance` / `severity` / `affected_symbols`; pass the irrelevant ones back here as `dismiss_urls`. Items leave the queue once ingested or dismissed, and expire after 48h.
| Name | Type | Req | Description |
|---|---|---|---|
| dismiss_source_ids | – | – | Exact source_snapshot_id values reviewed as irrelevant; future corrections remain eligible. |
| dismiss_urls | – | – | Legacy version-limited dismissal; ambiguous multi-version URLs require dismiss_source_ids instead. |
| include_expired | boolean | – | Expose preserved unfinished versions older than 48h for explicit source verification/recovery. |
| limit | integer | – | Max items to return. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
place_fund_order ~569
Record the first leg of an off-exchange fund purchase the user already placed with the fund platform: cash - amount, and the order is tracked as in transit (`status.pending_fund_orders`). Total assets do not change (the in-transit amount counts at face value), so there is no fake dip between order day and confirmation. Shares arrive when the pricing-day NAV is published: the `fund_confirm` job confirms automatically, or call `confirm_fund_order`. Bookkeeping only — openInvest never places orders. The expected confirm date uses a Monday-Friday calendar (no China holiday table) and a lag by fund type (QDII / FOF are slower, read from the fund's profile); the result says so (`calendar`, `lag_source`). Confirm fund, amount, and order time with the user before calling; this moves ledger cash. Args: symbol: FUND:<6 digits>. amount: Subscription amount in CNY; must be > 0. currency: Currency of the amount (CNY). order_ts: Order time, ISO 8601 Beijing time (default now). note: Free-text note. idempotency_key: Reuse the same key when retrying this exact call; recorded once. Returns: order_id, pricing day (`nav_date`), expected confirm date, and new cash balance, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| amount | number | yes | Subscription amount in CNY (cash deducted now); must be > 0. |
| currency | string | – | Currency of the amount; off-exchange funds are CNY. |
| idempotency_key | – | – | Optional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "dupl… |
| note | – | – | Free-text note stored with the order and ledger row. |
| order_ts | – | – | When the order was placed, ISO 8601 in Beijing time (e.g. '2026-10-19T14:30:00'); default now. Before 15:00 on a trading day the order is priced at that day's NAV, otherwise at the next trading day's… |
| symbol | string | yes | Off-exchange China mutual fund: 'FUND:<6-digit code>' (a bare 6-digit code is also accepted). |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
prepare_committee ~234
Step 1 of the agent-run committee (Coordinator path): get everything YOU need to play the 4 roles yourself — no backend LLM key involved. Returns the deterministic data blocks (regime, sentiment / defense flag, valuation, macro, events, portfolio, path reference) plus the 6 role prompts and `instructions` describing the 3 rounds. Run Macro / Quant / Risk (cheap subagents are fine), write the CIO memo yourself, then call `submit_committee` with the full transcript. The backend keeps its own copy of the deterministic facts from this call and uses them when you submit (defense downgrade, regime, path snapshot), so a fact you forget to paste cannot silently switch a rule off. Submit within 6 hours of preparing.
| Name | Type | Req | Description |
|---|---|---|---|
| model | string | – | Actual model or fixed role-model composition; unknown disables model-specific prior insights. |
| provider | string | – | Actual reasoning host, needed to scope learned evidence. |
| symbol | string | yes | A symbol already in strategy target_assets, e.g. 'GC=F', 'NDQ.AX'. |
No output schema declared.
No examples provided.
quality_status ~50
Read independent decision-quality alerts and evidence/learning eligibility. Check this before treating all-HOLD output as quiet success. Alerts are review requests, not permission to trade. Does not modify accounts or send messages.
Input schema present but exposes no named parameters.
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
rebalance_plan ~379
Compute a rebalance list against the target allocation in strategy.md: what to BUY / SELL, how much, in whole lots, and why. Only produces the list, places no order — the human executes. No LLM call. Use when the user asks "do I need to rebalance", "how far am I from my target allocation" or "what should I buy/sell to get back on target". Per-asset targets come from `target_assets[].target_pct` in strategy.md; assets without one split `target_allocation_stock` equally (`target_source: "equal_split"`). Lot sizes: A-shares 100, convertible bonds 10, off-exchange funds by amount, HK/others 1 (HK lot size is unknown — see `lot_note`). Args: mode: "cash_only" | "sell_to_rebalance" | "hybrid" (default). band_pct: Drift band in percentage points, default 5. Returns: `rows` (per target asset: current_pct / target_pct / drift_pct / action BUY|SELL|NONE / amount in base currency / units / reason), `totals` (cash_after, turnover, n_trades), `unmanaged` holdings, `warnings`; or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| band_pct | number | – | Drift band in percentage points (default 5): holdings within ±band of target are left alone. |
| mode | string | – | cash_only: buy underweights with cash above the target cash ratio, never sell. hybrid (default): use that cash first, sell overweights only to cover the shortfall. sell_to_rebalance: sell every overw… |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
record_balance_observation ~230
Record independent value, native quantity or per-native-unit average cost observations. No value-to-quantity conversion, cash movement, inferred fill or historical return approval. Historical/mismatched evidence stays audit-only. Invoke only for facts the client actually supplied, with its original as-of time.
| Name | Type | Req | Description |
|---|---|---|---|
| as_of | string | yes | Timezone-aware time of the reported balance, separate from today's server receipt time. |
| cost_currency | – | – | – |
| idempotency_key | string | yes | Reuse the same key and unchanged facts when retrying. |
| native_instrument | – | – | – |
| quantity_unit | – | – | – |
| reference_symbol | string | yes | Existing tracked position. A quote proxy is not automatically the native instrument. |
| reported_cost | – | – | – |
| reported_quantity | – | – | – |
| reported_value | – | – | – |
| source_locator | string | yes | Source locator text or JSON object as text. This records client provenance; it does not claim broker verification. |
| source_text | string | yes | Original client statement or description of the source. Never reconstruct it from an Agent's old summary. |
| value_currency | – | – | – |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
record_dividend ~633
Record a dividend (or interest) the user already received: credits ledger cash by amount - tax_withheld, positions unchanged. It counts as account return (inside NAV), not as a deposit. Bookkeeping only — openInvest never moves money. Confirm symbol, gross amount, withholding tax, and the date with the user before calling; this moves ledger cash. A symbol that is neither held nor in the ledger is rejected (typo guard). Args: amount: Gross amount before withholding tax; must be > 0. currency: Currency of the cash credited. symbol: Ticker (required for dividends; optional for interest). kind: "dividend" (default) or "interest". tax_withheld: Tax withheld at source; credited cash = amount - tax_withheld. reinvest: DRIP — buy more `symbol` with the net amount. reinvest_price: Price per unit for the reinvestment (default: stored raw close). trade_date: YYYY-MM-DD the cash arrived (default today). note: Free-text note. idempotency_key: Reuse the same key when retrying this exact call; recorded once. Returns: Cash credited and new balance, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| amount | number | yes | Gross amount before withholding tax (for kind='interest': the interest credited); must be > 0. |
| currency | string | yes | Currency the cash was credited in, e.g. 'CNY', 'USD', 'AUD'. |
| idempotency_key | – | – | Optional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "dupl… |
| kind | string | – | 'dividend' (default) or 'interest' (money-market / cash-account interest). |
| note | – | – | Free-text note stored with the ledger row. |
| reinvest | boolean | – | DRIP: use the net cash to buy more of `symbol` (adds a second ledger row, source='drip'). The holding must exist and be in `currency`. |
| reinvest_price | – | – | Reinvestment price per unit. Omit to use the stored raw close for the date (run `backfill_raw_close` first). |
| symbol | – | – | yfinance ticker the dividend belongs to (required for kind='dividend'; optional for interest = account-level). |
| tax_withheld | number | – | Tax already withheld at source (kind='dividend' only); cash credited = amount - tax_withheld. |
| trade_date | – | – | Date the event happened, YYYY-MM-DD (default: today). Account performance books it on this date, so pass the real date when back-filling history. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
record_execution ~241
Record whether the user executed or declined a committee verdict, with their reason. Appends to the execution ledger; idempotent — replaying the same record is a no-op, so retries are safe. Call when the user says "I bought it / I didn't buy / I disagree". When they decline, ask one short question for the reason first — this closes the adoption-rate loop that `decisions` reports on. Args: decision_id: "<date>/<symbol>" from the `decisions` output. executed: True if the user acted on the verdict, False if declined. reason: The user's stated reason (especially when declined). trade_ids: Optional trade record IDs to link explicitly. Returns: The stored execution record, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| decision_id | string | yes | "<date>/<symbol>" from the decisions tool output. |
| executed | boolean | yes | True if the user acted on the verdict, False if they declined. |
| reason | – | – | The user's stated reason (especially when declined). |
| trade_ids | – | – | Optional trade record IDs to link explicitly. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
record_existing_position ~614
Record a position the user already held before using openInvest (onboarding backfill) WITHOUT touching ledger cash. History is marked `funding_source: external_funding`, `source: mcp:existing_position`. Only for positions that `status` does not list yet — calling it for a symbol already there adds the units again (double count). A new purchase paid from ledger cash is `buy`. Does not add the symbol to the tracked list; use `track_asset` for committee coverage. Args: symbol: yfinance ticker (e.g. "AAPL", "510300.SS"). Gold = "GC=F", booked in CNY per gram only (units = grams, currency "CNY", kind "metal", unit_label "克"). units: Quantity held; must be > 0. price: Average cost per unit, in `currency`. currency: Currency of `price`; omitted = the existing position's currency (CNY if new). kind: Asset kind tag: "equity", "etf", "metal" (gold), "crypto", "bond", "fund", "other". unit_label: Human display label for units (default "股", i.e. shares). idempotency_key: Reuse the same key when retrying this exact call; recorded once. Returns: Updated position summary, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| currency | – | – | Currency of `price`, e.g. 'CNY', 'USD', 'AUD'. Omit to use the existing position's currency (CNY for a new position); a different currency than the position's is rejected. |
| idempotency_key | – | – | Optional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "dupl… |
| kind | string | – | Asset kind tag: 'equity', 'etf', 'metal' (gold), 'crypto', 'bond', 'fund', 'other'. |
| price | number | yes | Average cost per unit, in `currency`. |
| symbol | string | yes | yfinance ticker, e.g. 'AAPL', '510300.SS'. Gold is 'GC=F' and must be booked per gram in CNY: units = grams, price = CNY/gram, currency='CNY', kind='metal', unit_label='克' (USD/oz bookings are reject… |
| unit_label | string | – | Human display label for units (default '股', i.e. shares). |
| units | number | yes | Quantity held; must be > 0. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
record_fee ~441
Record a fee or a tax the user already paid: debits ledger cash, positions unchanged. It is an account cost (inside NAV), not a withdrawal. Trade commissions need no separate entry — buy / sell already book the trade. Fails if the currency's cash balance is lower than the amount. Confirm the amount and date with the user before calling; this moves ledger cash. Args: amount: Amount paid; must be > 0. currency: Currency of the cash debited. kind: "fee" (default) or "tax". symbol: Related ticker (optional). trade_date: YYYY-MM-DD it was charged (default today). note: Free-text note. idempotency_key: Reuse the same key when retrying this exact call; recorded once. Returns: Cash debited and new balance, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| amount | number | yes | Amount paid (positive number); must be > 0. |
| currency | string | yes | Currency the cash left in, e.g. 'CNY', 'USD', 'AUD'. |
| idempotency_key | – | – | Optional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "dupl… |
| kind | string | – | 'fee' (default: account / remittance / standalone commission) or 'tax' (e.g. dividend tax settled afterwards). |
| note | – | – | Free-text note stored with the ledger row. |
| symbol | – | – | Ticker the fee/tax relates to (optional; omit for account-level). |
| trade_date | – | – | Date the event happened, YYYY-MM-DD (default: today). Account performance books it on this date, so pass the real date when back-filling history. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
record_return_of_capital ~390
Record a return of capital (some ETF / REIT distributions): credits ledger cash, lowers the holding's average cost by amount / units (a cost reduction, not income), units unchanged. Cost floors at 0; any excess is reported as excess_over_cost (treat as a capital gain). Confirm symbol, amount, and date with the user before calling; this moves ledger cash and changes average cost. Args: symbol: Held ticker. amount: Cash received; must be > 0. currency: Currency of the cash (must match the holding's cost currency). trade_date: YYYY-MM-DD received (default today). note: Free-text note. idempotency_key: Reuse the same key when retrying this exact call; recorded once. Returns: New average cost, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| amount | number | yes | Cash received as return of capital; must be > 0. |
| currency | string | yes | Currency received; must equal the holding's cost currency. |
| idempotency_key | – | – | Optional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "dupl… |
| note | – | – | Free-text note stored with the ledger row. |
| symbol | string | yes | yfinance ticker of an existing holding. |
| trade_date | – | – | Date the event happened, YYYY-MM-DD (default: today). Account performance books it on this date, so pass the real date when back-filling history. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
record_split ~540
Record a stock split / reverse split: units x ratio, average cost / ratio, cash unchanged (market value is unchanged). Call it once per split — a second call multiplies the position again; use an idempotency_key if unsure whether an earlier attempt landed. Rejected when the ledger already has trades / corrections for the symbol on or after trade_date (their units are already post-split, so multiplying the whole snapshot would invent shares) — pass ledger_only=true if the snapshot is already correct. Confirm symbol, ratio, and ex-date with the user before calling; this rewrites the position's units and average cost. Args: symbol: Ticker that split. ratio: New / old shares (10-for-1 = 10; 1-for-10 reverse = 0.1). trade_date: Ex-date YYYY-MM-DD (default today). note: Free-text note. ledger_only: Write the ledger row only; do not change units / average cost. idempotency_key: Reuse the same key when retrying this exact call; recorded once. Returns: New units / average cost (plus a `follow_up` hint), or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| idempotency_key | – | – | Optional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "dupl… |
| ledger_only | boolean | – | Only write the ledger row, leave the holding's units / average cost untouched. Use it when the snapshot already reflects the split (e.g. you fixed the units by hand, or later trades were booked in po… |
| note | – | – | Free-text note stored with the ledger row. |
| ratio | number | yes | New shares per old share: a 10-for-1 split is 10, a 1-for-10 reverse split is 0.1. Must be > 0 and not 1. |
| symbol | string | yes | yfinance ticker that split (must be held now or appear in the ledger). |
| trade_date | – | – | Ex-date of the split, YYYY-MM-DD (default: today). Pass the real ex-date when back-filling: account performance uses it to restate earlier trades. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
remove_news_source ~51
Remove a user-added news feed by name or URL. Built-in default feeds cannot be removed.
| Name | Type | Req | Description |
|---|---|---|---|
| key | string | yes | Feed name or URL to remove (extra feeds only; defaults can't be removed). |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
run_committee ~612
Run the 4-role LLM investment committee on a symbol (Direct path): Macro Strategist, Quant Analyst, and Risk Officer debate from isolated evidence, then a CIO synthesizes one calibrated BUY/HOLD/SELL-style verdict with a written memo. Requires a backend LLM key (e.g. DEEPSEEK_API_KEY) and takes 30-90s on a cache miss. If the symbol was already analyzed today, the cached verdict is returned instantly unless `force` is set. Sends MCP progress notifications per debate phase when the client asks for them. Decision support only — the human always executes. Args: symbol: Symbol to analyze. Listed assets use yfinance tickers: US "AAPL", A-share "603083.SS" (Shanghai) / "000001.SZ" (Shenzhen), HK "0700.HK", exchange ETF "510300.SS", crypto "BTC-USD", futures "GC=F". China off-exchange (OTC) mutual funds use "FUND:<6-digit code>", e.g. "FUND:110011". A bare 6-digit code is rejected — add the suffix or the FUND: prefix. force: Re-run even if a verdict already exists for today. max_rounds: Cross-challenge debate rounds (default 1). Returns: Object with `decision_id`, `cached` flag, `verdict` and `confidence_lookup` (show this to the user instead of the self-reported confidence). The shape differs by path: - `cached: false` (fresh run): `verdict` is an object (verdict, confidence, suggested allocation, ...). - `cached: true` (today's transcript): `verdict` is the verdict string, with `confidence`, `alloc_cny`, `alloc_currency` alongside, plus the CIO memo as `cio_memo` and the deterministic `input_health` block (empty inputs, rewrite rules applied, forced HOLD) — no need to call `explain_decision` just to read them.
| Name | Type | Req | Description |
|---|---|---|---|
| force | boolean | – | Re-run even if a verdict already exists for today. |
| max_rounds | integer | – | Cross-challenge debate rounds. |
| symbol | string | yes | Symbol to analyze. Listed assets use yfinance tickers: US 'AAPL', A-share '603083.SS' (Shanghai) / '000001.SZ' (Shenzhen), HK '0700.HK', exchange ETF '510300.SS', crypto 'BTC-USD', futures 'GC=F'. Ch… |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
sell ~299
Record a sell in the local ledger: reduces the position's units (average cost unchanged) and credits cash in the holding's cost currency. Bookkeeps a trade already executed at the user's broker — openInvest never places real orders. Confirm symbol, units, and price with the user before calling; this moves ledger cash. Args: symbol: yfinance ticker of an existing holding. units: Quantity sold; must be > 0. price: Execution price per unit, in the holding's cost currency. idempotency_key: Reuse the same key when retrying this exact call; recorded once. Returns: Updated position summary, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| idempotency_key | – | – | Optional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "dupl… |
| price | number | yes | Execution price per unit, in the holding's cost currency. |
| symbol | string | yes | yfinance ticker of an existing holding. |
| units | number | yes | Quantity sold; must be > 0. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
set_allocations ~641
Update the strategy's target allocation: the stock/cash ratio and/or the per-asset target weights that `rebalance_plan` reads, and/or the per-asset alert lines the price sentinel watches. The stock and cash values must sum to ≈1.0, and the per-asset weights must sum to at most the stock target; schema validation rejects and rolls back any write that would corrupt the strategy file. Everything in one call is validated and written atomically — to lower the stock target below the current sum of per-asset weights, pass the new weights in the same call. Use when the user says e.g. "set my target to 70% stock / 30% cash" or "put 30% in 510300.SS and 20% in gold". Args: target_allocation_stock: Stock weight in [0, 1], e.g. 0.7 (with cash). target_allocation_cash: Cash weight in [0, 1], e.g. 0.3 (with stock). target_pcts: {symbol: weight in [0, 1]} per tracked asset; null clears. alerts: {symbol: {rule: value}} alert lines per tracked asset; null clears a rule (or, for a whole symbol, all its rules). Returns: The updated allocation and target assets, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| alerts | – | – | Per-asset alert lines as {symbol: {rule: value}}, rule in price_above / price_below / day_drop_pct / day_rise_pct / drawdown_from_cost_pct, e.g. {'GC=F': {'price_below': 900, 'day_drop_pct': 2}}. Rul… |
| target_allocation_cash | – | – | Cash weight in [0, 1], e.g. 0.3. Pass together with target_allocation_stock; omit both to leave the split unchanged. |
| target_allocation_stock | – | – | Stock weight in [0, 1], e.g. 0.7. Pass together with target_allocation_cash (they must sum to ~1.0); omit both to leave the stock/cash split unchanged. |
| target_pcts | – | – | Per-asset target weights as {symbol: fraction of total assets in [0, 1]}, e.g. {'510300.SS': 0.3, 'GC=F': 0.2}. Symbols must already be tracked (see track_asset). A null value clears that asset's tar… |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
source_snapshot ~72
Read the immutable original input and acquisition proof for one source version. A backend_snapshot locator identifies a captured API item, not an upstream webpage. Source capture alone does not prove truth, independence or learning eligibility.
| Name | Type | Req | Description |
|---|---|---|---|
| snapshot_id | string | yes | Exact source_snapshot_id from this instance's pending_news or event provenance. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
status ~407
Get a full snapshot of the user's portfolio: cash balances per currency, every holding with units / average cost / live price, and unrealized P&L per position and in total. Use when the user asks "show my portfolio", "how is my P&L", or before proposing any trade. Read-only; fetches live quotes, so values change between calls. Returns: Object with `cash` (currency → amount), `all_holdings` (every position, priced the same way whatever the symbol: units, avg_cost, live price, market value, pnl_pct; null price fields when a quote is unavailable; each carries `alerts`, the user's per-asset alert lines with the distance still to go, e.g. "距 price_below 还有 3.2%" — a tracked asset with alert lines but no holding row appears as an is_tracking_only row), `total_assets_cny`, `fx` (rate to CNY per non-CNY currency in use), an optional `gold` summary when a gold-per-gram holding exists, and `performance` (real-account TWR 30d / YTD / since inception, XIRR, max drawdown with peak/trough dates, annualised volatility, return vs the configured benchmark, `price_basis` per symbol (raw | adjusted), and data_quality; or {"status": "insufficient_history"} until the ledger spans 2 trading days), `income_30d` (dividends / interest received in the last 30 days by currency; only present when there are any), and `pending_fund_orders` + `pending_fund_orders_line` (off-exchange fund orders placed but not yet confirmed — cash already deducted, `total_assets_cny` counts them at face value; only present when there are any).
Input schema present but exposes no named parameters.
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
strategy ~130
Get the user's investment strategy: target stock/cash allocation, the list of tracked assets (per-asset investment cap, purchase channel, fee settings), and long-term insights distilled by the nightly Dreaming memory-consolidation job. Use when deciding whether a proposed trade fits the user's plan, or when the user asks "what is my strategy / what am I tracking". Read-only. Returns: Object with `target_allocation` (stock/cash ratios), `target_assets` (tracked symbols with constraints), and `insights` (distilled lessons from past decisions).
Input schema present but exposes no named parameters.
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
submit_committee ~356
Step 2 of the agent-run committee: hand in the transcript you produced from `prepare_committee`. The backend parses the CIO memo, applies the same deterministic rules as the backend-run committee (single-investment cap, defense downgrade, sanity checks), saves the decision and returns it. If the CIO section has no parseable verdict, nothing is saved and this returns an error — fix the CIO section and submit again. Returns: `decision_id`, the post-rule `verdict` object, `saved` path and `facts_source` ("prepare" = rules used the facts saved at prepare time; "transcript" = no recent prepare found, facts were read from your text).
| Name | Type | Req | Description |
|---|---|---|---|
| context_id | string | – | Exact context_id returned by prepare_committee; required to bind inputs and rules to this submission. |
| model | string | – | Model that actually played the roles, e.g. 'claude-sonnet-5-5'; omitted -> recorded as 'unknown'. The scorecard buckets verdicts by provider:model. |
| provider | string | – | Which agent played the roles, e.g. 'hermes', 'claude', 'codex'. |
| reasoning_review_json | string | – | Independent review JSON for the exact verification_request returned by an earlier submission; submit the unchanged original transcript. Omit for the first submission. |
| symbol | string | yes | Same symbol you passed to prepare_committee. |
| transcript | string | yes | All sections, each starting with its separator line: === MACRO ===, === QUANT_R1 ===, === RISK_R1 ===, === QUANT_R2 ===, === RISK_R2 ===, === CIO ===. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
track_asset ~918
Add a symbol to the tracked-asset list, or update an existing entry (idempotent upsert: only the fields you pass are changed). The tracked list decides which symbols the committee and DCA jobs cover. The alert_* parameters set per-asset alert lines the price sentinel checks every few minutes (price lines: 24h cooldown; day-move lines: once per trading day); each one you pass overwrites that line only. To clear a line use set_allocations with a null value. Delivery needs INVEST_EVENT_ALERT=1 on the server (default off — without it a hit is only logged to the event store, nothing is sent). Use when the user says "track AAPL", wants to change a tracked asset's cap/channel/fees/target weight, or says "alert me when X drops below N" / "tell me if it falls 3% in a day". Args: symbol: yfinance ticker to track (e.g. "AAPL", "0700.HK", "BTC-USD"). max_single_invest_cny: Per-decision investment cap in CNY. On a new entry it defaults to the strategy-level max_single_invest_cny; optional on update. display_name: Human-friendly name shown in reports. channel: Where the user actually buys it (broker/app name). price_offset_pct: Systematic offset between the quote and the user's actual fill price, in percent (e.g. bank gold spread). sell_fee_pct: Sell-side fee in percent, used by fee-aware math. target_pct: Target weight as a fraction of total assets in [0, 1] (read by rebalance_plan); all tracked assets' weights must sum to <= target_allocation_stock or the write is rejected. alert_price_above / alert_price_below: price lines (status.current_price basis). alert_day_drop_pct / alert_day_rise_pct: the latest daily bar's move vs the previous close, percentage points. alert_drawdown_from_cost_pct: held position below average cost, percentage points. Returns: The stored asset entry, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| alert_day_drop_pct | – | – | Alert when the latest daily bar's drop vs the previous close reaches this many percentage points (3 = 3%, not a 0-1 fraction). On a closed market that is the last session; each trading day is reporte… |
| alert_day_rise_pct | – | – | Alert when the latest daily bar's rise vs the previous close reaches this many percentage points (3 = 3%); each trading day is reported once. |
| alert_drawdown_from_cost_pct | – | – | Alert when a held position is this many percentage points below its average cost (10 = 10%). Only evaluated for assets you hold. |
| alert_price_above | – | – | Alert when the price reaches or exceeds this level. Same price basis as status.current_price (held: cost currency, gold booking = CNY per gram; tracked-only: the quote source's own price). |
| alert_price_below | – | – | Alert when the price falls to or below this level (same price basis as alert_price_above). Must be below alert_price_above if both are set. |
| channel | – | – | Where the user actually buys it (broker/app name). |
| display_name | – | – | Human-friendly name shown in reports. |
| max_single_invest_cny | – | – | Per-decision investment cap in CNY. On a new entry, defaults to the strategy-level max_single_invest_cny; optional on update. |
| price_offset_pct | – | – | Systematic offset between quote and actual fill price, in percent (e.g. bank gold spread). |
| sell_fee_pct | – | – | Sell-side fee in percent, used by fee-aware math. |
| symbol | string | yes | yfinance ticker to track, e.g. 'AAPL', '0700.HK', 'BTC-USD'. |
| target_pct | – | – | Target weight of this asset as a fraction of total assets, in [0, 1] (0.3 = 30%); read by rebalance_plan. The weights of all tracked assets must sum to <= target_allocation_stock, otherwise the write… |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
untrack_asset ~98
Remove a symbol from the tracked-asset list — the committee and DCA jobs stop covering it. Holdings and trade history are untouched; schema validation guarantees at least one tracked asset remains. Args: symbol: yfinance ticker currently in the tracked list. Returns: The updated tracked list, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| symbol | string | yes | yfinance ticker currently in the tracked list. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
what_if ~265
Simulate portfolio P&L for a hypothetical price move: "what happens to my portfolio if <symbol> moves ±pct% / reaches <price>". Pure arithmetic over current holdings — no LLM call, instant, free. Use when the user asks scenario questions like "if the Nasdaq drops 10%, how much do I lose". Provide exactly one of `pct` or `price`. Args: symbol: yfinance ticker held or tracked by the user (e.g. "NDQ.AX", "GC=F", "510300.SS"). pct: Hypothetical percent change, e.g. -10 for a 10% drop. price: Hypothetical absolute target price (alternative to pct). Returns: Object with the position's simulated value change and the resulting portfolio-level P&L delta.
| Name | Type | Req | Description |
|---|---|---|---|
| pct | – | – | Hypothetical percent change, e.g. -10 for a 10% drop. Provide exactly one of pct or price. |
| price | – | – | Hypothetical absolute target price (alternative to pct). |
| symbol | string | yes | yfinance ticker held or tracked by the user, e.g. 'NDQ.AX', 'GC=F', '510300.SS'. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
withdraw ~253
Record a cash withdrawal from the ledger, in any currency. Fails if the balance is insufficient. Bookkeeping only — no real payment system is connected. Args: currency: ISO-style currency code, e.g. "CNY", "USD", "AUD". amount: Amount to remove; must be > 0. idempotency_key: Reuse the same key when retrying this exact call; recorded once. Returns: Updated cash balances, or {"status": "error", "error": ...}.
| Name | Type | Req | Description |
|---|---|---|---|
| amount | number | yes | Amount to remove; must be > 0. |
| currency | string | yes | ISO-style currency code, e.g. 'CNY', 'USD', 'AUD'. |
| idempotency_key | – | – | Optional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "dupl… |
| Name | Type | Req | Description |
|---|---|---|---|
| result | object | yes | – |
No examples provided.
How do I install the openInvest MCP server?
openInvest runs locally as a PyPI package, launched with uvx openinvest mcp. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.
pypi · openinvest
claude mcp add longsizhuo-openinvest -- uvx openinvest mcp
What is the openInvest MCP server?
openInvest is an MCP server listed in the public MCP registry as io.github.longsizhuo/openinvest. Investment runtime for AI agents, LLM investment committee, portfolio ledger, decision accounting. This page covers its PyPI package (openinvest).
Is the openInvest MCP server safe to use?
openInvest scores 62 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 21 November 2026. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.
What tools does the openInvest MCP server expose?
openInvest exposes 42 tools: status, doctor, strategy, history, live_prices, and 37 more. Their descriptions and schemas cost roughly 12,470 tokens of context every time the server is loaded.
Is the openInvest MCP server still maintained?
openInvest is still listed as active in the MCP registry. We last reached this channel on 21 November 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.
What licence is the openInvest MCP server under?
openInvest declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.
What did VerifyMCP test on the openInvest MCP server?
VerifyMCP ran 14 checks on openInvest, covering Known CVEs, Install scripts, Dependency health, Source repository and 10 more. 2 items could not be completed, a gap on our side rather than a finding about openInvest: Malware scan and Provenance. Endpoint Security and Transport & Reachability do not apply to a PyPI package, so they were not tested. The score does not measure everything, and the scoring documentation lists what it leaves out.