Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LLM_MODELNoModel ID (default: deepseek-chat)deepseek-chat
INVEST_HOMEYesPath to the data directory (e.g., ~/openInvest)
LLM_API_KEYYesAPI key for the LLM provider (required for automated decisions)
LLM_BASE_URLNoBase URL for the LLM API (default: https://api.deepseek.com)https://api.deepseek.com

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
statusA

当前持仓全景:现金(各币种)+ holdings + 实时价 + P&L。

strategyD

投资策略:target_assets + Dreaming 长期洞察。

historyC

最近 n 笔交易流水 + 委员会决议记录。

live_pricesA

背景行情一次拉齐:金价(USD/oz + CNY/克)/ USDCNY / AUDCNY / NDQ.AX / VIX / TNX。

what_ifB

P&L 情景模拟:"symbol 涨跌 pct% / 到 price 我的组合怎样"。纯算术零 LLM。

disciplineB

委员会纪律台账:不作为率(HOLD 占比)+ 拦截冲动操作次数 + 反事实省/费钱(ADR-023)。

decisionsA

统一决策视图:每条委员会决议 join 规则干预/用户执行/事后结果 + 采纳率汇总。 回答"我听了几次建议""哪些建议我没执行""被规则改写过什么"。

explain_decisionA

某条决议的完整依据:委员会 transcript(4 角色辩论 + CIO memo)+ 路径预测快照。 decision_id 形如 "2026-07-03/GC=F"(decisions 输出里的 decision_id)。

record_executionA

记录用户对某决议的执行/拒绝 + 原因(幂等追加账本)。 用户说"我没买/我买了/我不同意"时调用;拒绝时先问一句原因。

ingest_eventA

把你(宿主 agent)搜到的财经新闻投喂进事件账本:后端 LLM 归一化 → severity/symbol 判级 → 入库 → 供委员会 RAG 召回。你有比自托管爬虫强得多的 搜索能力(含中文源)——看到与用户持仓相关的新闻就喂进来,尤其 A 股/区域 市场(爬虫盲区)。幂等:同 url / 同 claim 重发不重复入账。需后端 LLM key。 ingested_by 报你自己的身份(如 "hermes")——溯源用,与 source(新闻来源)语义不同。

buyB

加仓/建仓:已有 symbol 加权平均成本,新 symbol 直接建仓。price 与 currency 同币种。

sellB

减仓:units 减少、cost_avg 不变,按 holding 的 cost_currency 还现金。

depositB

存入现金(任意币种)。

withdrawA

取出现金(任意币种),余额不足报错。

set_allocationsB

改股票/现金目标配比(两者和必须 ≈1,schema 强校验失败自动回滚)。

track_assetA

跟踪标的(upsert 幂等):不存在则新建(此时 max_single_invest_cny 必填), 已存在只更新传入的字段。委员会/DCA 覆盖哪些 symbol 由跟踪列表决定。

untrack_assetA

移除跟踪标的(委员会不再分析它;schema 保证至少剩 1 个跟踪标的)。

run_committeeA

跑 4 角色 LLM 投资委员会(Direct 路径,需 DEEPSEEK_API_KEY,30-90s)。 返回 verdict + confidence + CIO memo。当天已跑过默认读缓存,force=True 重跑。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/longsizhuo/openInvest'

If you have feedback or need assistance with the MCP directory API, please join our Discord server