SimpleFunctions
SimpleFunctions CLI (sf)
@spfunctions/cli 的参考与问题镜像,这是用于预测市场基础设施的受支持 SimpleFunctions 命令行界面。
当前的 CLI 通过 npm 分发。安装该包并将已安装的 sf 二进制文件视为事实来源:
npm i -g @spfunctions/cli
sf login
sf status --json
sf world --json
sf describe --all --jsonsf 是 SimpleFunctions 的主要本地交互界面。它查询 Kalshi 和 Polymarket 的实时状态,检查市场和订单簿,为编码代理导出结构化 JSON,运行论点和投资组合工作流,并保持执行命令的明确性和权限控制。
本仓库的作用
npm 包的公共参考页面。
@spfunctions/cli的问题追踪器。当前
sf界面的安装、支持和发现入口。
Related MCP server: MCP Predictive Market
本仓库不包含的内容
它不是当前的完整操作运行时源代码树。
它不是规范的命令清单。
不应使用它来推断当前的命令数量、市场数量或执行行为。
请使用 sf describe --all --json 获取已安装的命令清单。请使用 https://simplefunctions.dev/api/internal/statistics 获取当前的公共界面统计数据。
第一个实用工作流
sf status --json
sf world --json
sf discover --quality --json
sf inspect <ticker> --json如果已安装的版本中缺少某个命令,请运行:
npm i -g @spfunctions/cli@latest
sf describe --all --json产品界面层级
CLI:面向人类、Shell 脚本、cron、Claude Code、Codex 及其他编码代理的主要本地控制平面。
HTTP/Data API:面向服务、仪表板、笔记本和远程工作者的网络界面。
SDK 和代理运行时:计划在稳定的 CLI/API 对象契约之上构建的封装器。
MCP:仅针对 MCP 主机的兼容性适配器,并非产品的核心中心。
链接
CLI 产品页面:https://simplefunctions.dev/cli
llms.txt:https://simplefunctions.dev/llms.txt
许可证
公共镜像采用 MIT 许可证。受支持的 npm 发行版可能包含私有的 SimpleFunctions 运行时代码。
Available Tools
16 toolscreate_thesisAInspect
Create a new thesis from a natural-language statement. The platform parses it, builds a causal tree, and schedules recurring evaluation. Side-effectful. Requires SF API key. Use fork_thesis instead if you want to start from an existing public thesis.
Inputs: apiKey (required), title (required), metadata.
enrich_contentAInspect
Cross-reference arbitrary text against live prediction markets: paste an article or note, get back the markets relevant to its claims plus an LLM digest. POSTs content to the server; no auth required, no persistence. Use for one-off article enrichment; use monitor_the_situation for scheduled URL scraping with webhook delivery.
Inputs: content (required), topics (required), model.
fork_thesisAInspect
Clone a public thesis (by id or slug) into the authenticated user's account, copying its causal tree as a starting point. Side-effectful. Requires SF API key. Use when you want to iterate on someone else's thesis; use create_thesis to start from scratch.
Inputs: apiKey (required), idOrSlug (required).
get_changesAInspect
What moved in the last 24 hours: incremental delta of probability changes across all tracked prediction markets, returned as compact markdown (~30-50 tokens). Read-only, no auth, no parameters. Thin wrapper over get_world_delta with since="24h"; use get_world_delta directly if you need a different lookback window or JSON output, or get_context for movers bundled with edges and highlights.
Inputs: no named parameters.
get_contextAInspect
START HERE — single entry point that returns either a global market snapshot or a thesis-specific context bundle. Global mode (no args): top mispriced edges, 24h price movers, highlights, traditional markets. Thesis mode (thesisId + apiKey): adds causal tree, signal log, and evaluation history for that thesis. Read-only, no rate limit. Use this first; only call get_edges / get_changes / get_world_state if you need that single slice in isolation.
Inputs: thesisId, apiKey.
get_edgesAInspect
Current mispricings (edges) detected across all public theses — contracts where the platform's causal model disagrees with market price. Read-only, no auth, no parameters. Returns only the edge list; use get_context for edges bundled with movers, highlights, and world state.
Inputs: no named parameters.
get_marketsAInspect
List live prediction market contracts with current YES/NO prices, 24h volume, and metadata. Read-only, no auth. Use for deep dives on a specific topic; use search_markets if you have a keyword instead of a topic, or get_context for a high-level overview.
Inputs: topic, limit.
get_trade_ideasAInspect
AI-generated trade ideas derived from active theses and current market data, each with rationale and target contract. Read-only, no auth, no parameters. Use when you want pre-packaged actionable suggestions; use get_edges for raw mispricings without commentary.
Inputs: no named parameters.
get_world_deltaAInspect
Incremental diff of the world model since a given timestamp — only the markets whose probability moved. ~30-50 tokens vs ~800 for the full state from get_world_state. Read-only, no auth. Use this for cheap polling loops; use get_world_state for an absolute snapshot.
Inputs: since (required), format.
get_world_stateAInspect
Calibrated world model: ~9,700 live prediction markets distilled into ~800 tokens of real-money probabilities across geopolitics, economics, tech, and policy. Read-only, no auth, no rate limit. Use when you need a compact snapshot of "what the market believes right now"; use get_changes for deltas only, or get_context for the broader bundle including edges and movers.
Inputs: focus, format.
inject_signalAInspect
Append an external observation (news headline, user note, data point) to a thesis. Stored in the thesis signal log and consumed on the next evaluation cycle — does NOT trigger evaluation by itself; call trigger_evaluation afterward if you need an immediate update. Writes state. Requires SF API key.
Inputs: thesisId (required), apiKey (required), content (required), type.
list_thesesAInspect
List every thesis owned by the authenticated user, with id, title, status, and last evaluation timestamp. Read-only. Requires SF API key. Use to discover thesisId values needed by get_context, trigger_evaluation, inject_signal, and fork_thesis.
Inputs: apiKey (required).
monitor_the_situationAInspect
End-to-end pipeline: scrape one or more URLs (or run a search/crawl/map/extract), optionally analyze with an LLM against a prompt + JSON schema, optionally cross-reference with prediction markets, and return the bundle. Side-effectful (calls Firecrawl + LLM, billed). Requires SF API key. Use for scheduled or one-shot URL ingestion; use enrich_content if you already have the text in hand.
Inputs: apiKey (required), source (required), analysis, enrich.
query_databentoAInspect
Fetch real-time and historical market data from Databento (CME futures, US equities, crypto). Read-only, billed per Databento usage. Use for OHLCV / trades / quotes on traditional instruments; use get_markets or search_markets for prediction-market contracts instead.
Inputs: symbols (required), dataset, schema, start, +2 more.
search_marketsAInspect
Full-text search prediction market contracts by keyword across question text and resolution criteria. Read-only, no auth. Use when you have a free-form term ("OPEC", "Powell", "TSMC"); use get_markets if you only want to filter by predefined topic.
Inputs: query (required).
trigger_evaluationAInspect
Force an immediate thesis evaluation: consumes pending signals, re-scans edges, and updates confidence scores. Side-effectful and LLM-billed (typically 5-30s, may be rate-limited per plan). Requires SF API key. Use after inject_signal when you need fresh output now; otherwise theses re-evaluate on their own schedule.
Inputs: thesisId (required), apiKey (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Tools are mostly distinct with clear descriptions, but the large number of 'get_*' tools (get_changes, get_context, get_edges, get_markets, get_trade_ideas, get_world_delta, get_world_state) could confuse an agent if not carefully read. However, each serves a unique purpose.
All tool names follow a consistent verb_noun snake_case pattern (e.g., create_thesis, enrich_content, get_markets). No mixing of conventions, making the naming predictable and clear.
16 tools is slightly above the ideal range but still reasonable for the server's scope (thesis management, market data, enrichment). Each tool has a distinct role, and the count does not feel excessive.
The tool surface covers core thesis creation, listing, and evaluation, but lacks update and delete operations for theses. Additionally, there is no direct trade execution tool, which may be intentional. Notable gaps in lifecycle management.
Maintenance
Related MCP Connectors
Real-time Polymarket & Kalshi odds, L2 orderbook depth & fee-adjusted arbitrage signals.
Live Kalshi and Polymarket data: EV edges, cross-venue arbitrage, markets, and whale trades.
Cross-venue Polymarket & Kalshi arbitrage scanner with L2 orderbook slippage and resolution risk.
Polymarket & Kalshi live prediction market odds aggregator and cross-venue arbitrage scanner MCP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables interaction with the Kalshi prediction market platform through their REST API. Supports trading and market operations with secure RSA key authentication for both production and demo environments.32MIT
- AlicenseAqualityDmaintenanceAggregates prediction market data from 5 major platforms (Manifold, Polymarket, Metaculus, PredictIt, Kalshi), enabling users to search markets, compare odds across platforms, detect arbitrage opportunities, and track predictions through natural language.85MIT
- FlicenseNot gradedqualityDmaintenanceProvides AI-powered tools for searching Polymarket prediction markets and calculating financial metrics like expected value and Kelly bet sizing. It enables users to perform arbitrage scanning, news-based sentiment analysis, and market research through natural language interfaces.1-
- AlicenseAqualityDmaintenancePrediction market probability oracle for AI agents. 26 tools across 500+ live markets from Kalshi and Polymarket. Cross-source arbitrage detection, structured TPF signals, Kelly Criterion sizing, agent performance tracking, and webhook alerts.9250 npm1MIT