Skip to main content
Glama

SimpleFunctions CLI (sf)

Referenz- und Issue-Spiegel für @spfunctions/cli, die unterstützte SimpleFunctions-Befehlszeilenschnittstelle für Prognosemarkt-Infrastruktur.

Die aktuelle CLI wird über npm vertrieben. Installieren Sie das Paket und betrachten Sie die installierte sf-Binärdatei als die Quelle der Wahrheit:

npm i -g @spfunctions/cli
sf login
sf status --json
sf world --json
sf describe --all --json

sf ist die primäre lokale Oberfläche für SimpleFunctions. Sie fragt den Live-Status von Kalshi + Polymarket ab, untersucht Märkte und Orderbücher, exportiert strukturiertes JSON für Coding-Agenten, führt Thesis- und Portfolio-Workflows aus und hält Ausführungsbefehle explizit und berechtigungsgesteuert.

Was dieses Repository ist

  • Öffentliche Referenzseite für das npm-Paket.

  • Issue-Tracker für @spfunctions/cli.

  • Installations-, Support- und Discovery-Hinweis für die aktuelle sf-Oberfläche.

Related MCP server: MCP Predictive Market

Was dieses Repository nicht ist

  • Es ist nicht der aktuelle vollständige Operator-Runtime-Quellbaum.

  • Es ist nicht das kanonische Befehlsverzeichnis.

  • Es sollte nicht verwendet werden, um auf aktuelle Befehlsanzahlen, Marktzahlen oder das Ausführungsverhalten zu schließen.

Verwenden Sie sf describe --all --json für das installierte Befehlsmanifest. Verwenden Sie https://simplefunctions.dev/api/internal/statistics für aktuelle öffentliche Oberflächenzahlen.

Erster nützlicher Workflow

sf status --json
sf world --json
sf discover --quality --json
sf inspect <ticker> --json

Wenn ein Befehl in Ihrer installierten Version nicht verfügbar ist, führen Sie Folgendes aus:

npm i -g @spfunctions/cli@latest
sf describe --all --json

Reihenfolge der Produktoberfläche

  1. CLI: primäre lokale Steuerungsebene für Menschen, Shell-Skripte, Cron, Claude Code, Codex und andere Coding-Agenten.

  2. HTTP/Data API: Netzwerkschnittstelle für Dienste, Dashboards, Notebooks und Remote-Worker.

  3. SDKs und Agent-Runtime: geplante Wrapper über stabile CLI/API-Objektverträge.

  4. MCP: Kompatibilitätsadapter für MCP-only-Hosts, nicht das kanonische Produktzentrum.

Lizenz

Der öffentliche Spiegel ist MIT-lizenziert. Die unterstützte npm-Distribution kann privaten SimpleFunctions-Runtime-Code enthalten.

Available Tools

16 tools
create_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

    A4.2/5.0

    Scored across 16 tools

    Disambiguation4/5

    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.

    Naming Consistency5/5

    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.

    Tool Count4/5

    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.

    Completeness3/5

    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

    ActivityNo data
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables 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.
      32
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Aggregates 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.
      8
      5
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides 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
      -
    • A
      license
      A
      quality
      D
      maintenance
      Prediction 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.
      9
      250 npm
      1
      MIT