SimpleFunctions
CLI de SimpleFunctions (sf)
Referencia y espejo de problemas para @spfunctions/cli, la interfaz de línea de comandos compatible de SimpleFunctions para la infraestructura de mercados de predicción.
La CLI actual se distribuye a través de npm. Instale el paquete y trate el binario sf instalado como la fuente de verdad:
npm i -g @spfunctions/cli
sf login
sf status --json
sf world --json
sf describe --all --jsonsf es la superficie local principal para SimpleFunctions. Consulta el estado en tiempo real de Kalshi + Polymarket, inspecciona mercados y libros de órdenes, exporta JSON estructurado para agentes de codificación, ejecuta flujos de trabajo de tesis y portafolio, y mantiene los comandos de ejecución explícitos y con permisos restringidos.
Qué es este repositorio
Página de referencia pública para el paquete npm.
Rastreador de problemas para
@spfunctions/cli.Punto de instalación, soporte y descubrimiento para la superficie
sfactual.
Related MCP server: MCP Predictive Market
Qué no es este repositorio
No es el árbol de fuentes actual del tiempo de ejecución del operador completo.
No es el inventario de comandos canónico.
No debe utilizarse para inferir recuentos actuales de comandos, recuentos de mercado o comportamiento de ejecución.
Utilice sf describe --all --json para obtener el manifiesto de comandos instalado. Utilice https://simplefunctions.dev/api/internal/statistics para conocer los recuentos actuales de la superficie pública.
Primer flujo de trabajo útil
sf status --json
sf world --json
sf discover --quality --json
sf inspect <ticker> --jsonSi un comando no está disponible en su versión instalada, ejecute:
npm i -g @spfunctions/cli@latest
sf describe --all --jsonOrden de la superficie del producto
CLI: plano de control local principal para humanos, scripts de shell, cron, Claude Code, Codex y otros agentes de codificación.
API HTTP/Datos: superficie de red para servicios, paneles, cuadernos y trabajadores remotos.
SDK y tiempo de ejecución de agentes: envoltorios planificados sobre contratos de objetos estables de CLI/API.
MCP: adaptador de compatibilidad para hosts exclusivos de MCP, no el centro del producto canónico.
Enlaces
Página del producto CLI: https://simplefunctions.dev/cli
Paquete npm: https://www.npmjs.com/package/@spfunctions/cli
Documentación: https://docs.simplefunctions.dev
llms.txt: https://simplefunctions.dev/llms.txt
Catálogo de paquetes públicos: https://simplefunctions.dev/opensource
Licencia
El espejo público tiene licencia MIT. La distribución npm compatible puede incluir código privado del tiempo de ejecución de 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