MCP is the compatibility adapter, not the primary integration path. Prefer the CLI first, HTTP API second, and SDK / Agent SDK third when you control the runtime. This page documents the broad MCP adapter surface; the strict SDK / Agent SDK contract truth is
GET /api/contracts/tools.Authentication
Every tool that mutates user data, reads private data, or hits a paid upstream takes anapiKey parameter:
/dashboard/keys or via sf login from the CLI.
Three auth tiers are used below:
| Tier | Meaning |
|---|---|
none | Public surface — no key required. |
optional | Public response without a key; richer / private response with one. |
required | Tool returns an error if apiKey is missing. |
Conventions
- Prices are in cents (0–100) unless documented otherwise. Probabilities live in
[0, 1]only on the Real-Time Data API. - Timestamps are ISO 8601 (UTC) unless a specific tool documents
Unix seconds. - All tool responses are wrapped in MCP’s standard
{ content: [{ type: 'text', text: '...' }] }envelope; thetextfield contains JSON or Markdown depending on the tool. - Errors come back inside
textas the upstream error body — they do not raise MCP-level exceptions. Treat anytextthat starts withError:or includes astatusfield as a failure.
Market data
Public tools for finding and filtering prediction markets across Kalshi + Polymarket.query
Ask any natural-language question about future events. Returns live contract prices from Kalshi + Polymarket plus an LLM-synthesized answer. Use this when you’d reach for a search engine.
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | yes | Natural language query |
GET /api/public/query and sf query.
scan_markets
Direct Kalshi market lookup by keyword, series, or specific ticker. Hits api.elections.kalshi.com directly — fastest path for ticker-level data.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | one of | Keyword search across open Kalshi events |
series | string | one of | Kalshi series ticker (e.g. KXWTIMAX) |
market | string | one of | Specific market ticker |
query, series, or market is required.
screen_markets
Indicator screener — filter the universe by IY (implied yield), CRI (cliff risk), EE (expected edge), LAS (liquidity-adjusted spread), OR (overround), τ (days to expiry). Use no_thesis=true / no_orderbook=true as positive selectors for unloved long-tail.
| Parameter | Type | Description |
|---|---|---|
iy_min / iy_max | number | Min/max implied yield (annualized %) |
ee_min | number | Min expected edge in cents |
las_max | number | Max liquidity-adjusted spread (try 0.05) |
or_min / or_max | number | Min/max event overround |
cri_min / cri_max | number | Min/max cliff risk |
tau_min_days / tau_max_days | number | Min/max days to expiry |
category | string | crypto, political, financial, sports, etc. |
venue | kalshi|polymarket | Venue filter |
keyword | string | Substring filter on title |
has_thesis / no_thesis | boolean | Thesis-coverage selector |
has_orderbook / no_orderbook | boolean | Orderbook-attention selector |
sort | iy|ee|or|las|cri|tau|volume | Default iy |
order | asc|desc | Default desc |
limit | number | Default 50, max 200 |
GET /api/public/screen and sf screen.
get_markets
Traditional market prices via Databento. Default returns SPY, VIX, TLT, GLD, USO. Use topic for a deeper bundle.
| Parameter | Type | Description |
|---|---|---|
topic | string | energy, rates, fx, equities, crypto, volatility |
GET /api/public/trad-markets.
query_databento
Free-form historical market data via Databento — stocks, ETFs, CME futures, options. Capped at 30 days, 5 symbols, 500 rows per call.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbols | string | yes | Comma-separated, max 5. .FUT suffix for continuous futures |
dataset | string | no | DBEQ.BASIC (default), GLBX.MDP3, OPRA.PILLAR, XNAS.BASIC |
schema | string | no | ohlcv-1d (default), ohlcv-1h, ohlcv-1m, trades, bbo-1s, bbo-1m, statistics, definition |
stype | string | no | raw_symbol (default) or continuous |
days | number | no | Lookback days (default 7, max 30) |
GET /api/public/databento.
get_milestones
Upcoming events from the Kalshi calendar — economic releases, political events, catalysts.
| Parameter | Type | Description |
|---|---|---|
hours | number | Hours ahead (default 168 = 1 week) |
category | string | Economics, Politics, Sports, etc. |
get_schedule
Kalshi exchange status and trading hours. Takes no parameters.
Auth: none. Hits api.elections.kalshi.com/exchange/status directly.
get_market_detail
Full detail for a single market: price, volume, indicators, regime label, history pointer, cross-venue counterpart. Lower-level than inspect_ticker — returns raw JSON only.
| Parameter | Type | Required | Description |
|---|---|---|---|
ticker | string | yes | Market ticker |
depth | number | no | Orderbook depth levels to include (0 = none) |
GET /api/public/market/{ticker}.
get_market_history
Rolling 7-day price + indicator history for a single market. For trajectory questions and chart rendering.
| Parameter | Type | Required |
|---|---|---|
ticker | string | yes |
GET /api/public/market/{ticker}/history.
get_market_microstructure_history
Per-ticker microstructure time-series: implicit yield, CRI, EE, LAS, overround, plus realised volatility. Used for charting indicator drift.
| Parameter | Type | Description |
|---|---|---|
ticker | string | required |
days | number | Lookback days (default 7) |
interval | hour|day | Bucketing |
GET /api/public/market-microstructure-history.
batch_markets
Fetch many markets at once by ticker list. Cheaper than calling get_market_detail in a loop.
| Parameter | Type | Description |
|---|---|---|
tickers | string | required, comma-separated |
depth | number | Orderbook depth levels (0 = none) |
GET /api/public/markets.
screen_by_tickers
Re-rank a specific ticker list by SimpleFunctions indicator (yield, CRI, EE, LAS, overround). For “of these N markets, which has best yield?” workflows.
| Parameter | Type | Description |
|---|---|---|
tickers | string | required, comma-separated |
sort | string | Indicator (e.g. iy, cri, ee, las, overround) |
order | asc|desc | Sort order |
GET /api/public/screen-by-tickers.
get_yield_curves
Liquidity-weighted yield curves across event types (e.g. KXFED 6-month, KXBTC 30-day). For “where on the curve am I trading?” questions.
| Parameter | Type | Description |
|---|---|---|
venue | string | kalshi or polymarket |
limit | number | Max events |
minPoints | number | Minimum curve points to keep an event |
GET /api/public/yield-curves.
get_yield_curve
Single yield curve for one event series.
| Parameter | Type | Required | Description |
|---|---|---|---|
event | string | yes | Event ticker (e.g. KXFEDDECISION-26DEC10) |
venue | string | no | Venue if needed to disambiguate |
GET /api/public/yield-curves/{event}.
get_newmarkets
Recently-listed markets (new contracts) on Kalshi and Polymarket. For finding fresh trading opportunities.
| Parameter | Type | Description |
|---|---|---|
hours | number | Lookback hours (default 24) |
venue | string | kalshi or polymarket |
minLiquidity | number | Minimum liquidity threshold |
limit | number | Max rows |
GET /api/public/newmarkets.
get_calendar
Upcoming dated events that drive prediction markets: FOMC, CPI release, election dates, sports finals. Returns date, topic, and linked tickers.
| Parameter | Type | Description |
|---|---|---|
days | number | Lookahead days (default 30) |
category | string | econ, election, sports, geo |
GET /api/public/calendar.
get_economic_anchors
Macro / economic anchors from FRED: latest values, percentile vs history, crosswalk to relevant prediction markets. For grounding macro theses.
| Parameter | Type | Description |
|---|---|---|
category | string | rates, inflation, employment, growth |
series | string | FRED series ID (e.g. CPIAUCSL) |
GET /api/public/fred.
World state
Compact world snapshots designed for small LLM context windows.get_world_state
Real-time world model for agents — ~800 tokens covering geopolitics, economy, energy, elections, crypto, tech with calibrated probabilities. Anchor contracts (recession, Fed, Iran) are always present.
| Parameter | Type | Description |
|---|---|---|
focus | string | Comma-separated topics for deeper coverage on those |
format | markdown|json | Default markdown |
GET /api/agent/world and sf world.
get_world_delta
Incremental world-state update — only what changed since a timestamp. ~30–50 tokens vs ~800 for the full state.
| Parameter | Type | Required | Description |
|---|---|---|---|
since | string | yes | Relative (30m, 1h, 6h, 24h) or ISO timestamp |
format | markdown|json | no | Default markdown |
GET /api/agent/world/delta.
inspect_ticker
Step 2 of the agent loop. Once get_world_state surfaces an opportunity, pass the ticker here for the full deep-dive: price, indicators (yield / contagion / regime), microstructure trend, contagion signals, market diff. Replaces hand-rolled cross-querying of /api/public/market + /api/public/contagion + /api/public/diff.
| Parameter | Type | Required | Description |
|---|---|---|---|
ticker | string | yes | Market ticker (e.g. KXFEDDECISION-26DEC10-T0) |
format | markdown|json | no | Default markdown |
contagion | boolean | no | Include contagion signals (default true) |
diff | boolean | no | Include market diff vs prior window (default true) |
trend | boolean | no | Include microstructure history (default true) |
GET /api/agent/inspect/{ticker}.
Indices, regime & contagion
Top-down analytics over the prediction-market world.get_market_index
The SimpleFunctions Prediction Market Index v2: four gauges (disagreement 0–100, geoRisk 0–100, breadth –1 to +1, activity 0–100). Updated every 15 minutes.
Auth: none. Takes no parameters. Wraps GET /api/public/index.
get_index_history
Historical SimpleFunctions Index snapshots — pre-computed every 15 minutes, stored since v2 launched 2026-04-09. For charting trends.
| Parameter | Type | Description |
|---|---|---|
days | number | Lookback days (default 7) |
GET /api/public/index/history.
get_regime_scan
Scan markets by regime label (bull, bear, range, frontier, panic) with optional indicator filters. For regime-based screening.
| Parameter | Type | Description |
|---|---|---|
label | string | Regime label filter |
venue | string | kalshi or polymarket |
eventType | string | binary, scalar, ladder |
hasEdge | boolean | Filter to markets with non-trivial SimpleFunctions edge |
sort | string | Sort field (e.g. as, score) |
order | asc|desc | Sort order |
limit | number | Max rows (default 50) |
GET /api/public/regime/scan.
Regime history is not exposed as a current MCP tool. GET /api/public/regime/history is deprecated and returns 410 Gone; use get_regime_scan for current labels or get_market_microstructure_history for spread/depth time series.
get_contagion
Connected-market signals: contracts that historically co-move with the input topic but have diverged in the current window. Surfaces “this market should have moved but didn’t” trades.
| Parameter | Type | Description |
|---|---|---|
topic | string | Topic keyword (fed, election, ai) |
window | string | Lookback (e.g. 24h, 7d) |
GET /api/public/contagion.
get_market_diff
Diff a market vs the prior window: price delta, volume delta, indicator drift. For “what changed in the last 6h?” questions.
| Parameter | Type | Description |
|---|---|---|
tickers | string | Comma-separated tickers |
topic | string | Topic keyword if no tickers |
window | string | Lookback (default 24h) |
sort | string | Sort field (e.g. priceDelta) |
GET /api/public/diff.
Editorial & briefings
Curated, human-readable views over the live data — plus reference content (calibration, glossary, opinions).get_highlights
Editorial highlights for the day: top movers, divergences, fresh contagion, freshly-resolved markets. Curated summary view.
Auth: none. Takes no parameters. Wraps GET /api/public/highlights.
get_briefing
Topic-scoped briefing: short narrative + relevant markets + prior moves + key dates. Reusable as a callable /briefing card.
| Parameter | Type | Description |
|---|---|---|
topic | string | Topic keyword |
window | string | Lookback window |
GET /api/public/briefing.
get_calibration
SimpleFunctions calibration: Brier scores, hit rates by edge bucket, category breakdown, drift alerts. Measured against resolved / settled markets.
| Parameter | Type | Description |
|---|---|---|
category | string | Topic filter (fed, elections, ai, crypto, sports, …) |
period | string | 30d, 90d, all |
GET /api/calibration.
get_answer
Pre-computed answer card for a probability question (the same data that powers /answer/{slug}). Returns probability, confidence, and citations.
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | string | yes | Answer slug (e.g. will-the-fed-cut-rates-in-december) |
GET /api/public/answer/{slug}.
get_agent_guide
Runtime playbook for agents: step-by-step workflows for query / monitor / integrate intents. Use when an agent is lost or needs onboarding.
| Parameter | Type | Description |
|---|---|---|
intent | query|monitor|integrate | Workflow intent |
q | string | Specific question to scope the guide |
GET /api/public/guide.
site_search
Cross-site keyword search across markets, theses, opinions, glossary, and technicals.
| Parameter | Type | Required |
|---|---|---|
q | string | yes |
GET /api/public/search.
get_changes
Market change events since a timestamp: new contracts, price moves, removed contracts. Used by the live feed and agent context refreshers.
| Parameter | Type | Description |
|---|---|---|
since | string | ISO timestamp lower bound |
q | string | Keyword filter |
type | new_contract|price_move|removed_contract | Change type |
GET /api/changes.
Edges & ideas
get_edges
Top mispriced markets across all theses, ranked by edge size. With apiKey, includes your private theses; without, public theses only.
| Parameter | Type | Description |
|---|---|---|
apiKey | string | Optional — public + private when supplied |
limit | number | Max edges (default 15) |
minEdge | number | Min edge in cents (default 3) |
venue | string | kalshi or polymarket |
GET /api/edges.
get_trade_ideas
Pre-generated S&T-style trade pitches with conviction, catalyst timing, direction, and risk. Refreshed daily by cron.
| Parameter | Type | Description |
|---|---|---|
freshness | string | 1h, 6h, 12h, 1d (default 12h) |
category | string | macro, geopolitics, crypto, policy, event |
limit | number | Max ideas, 1–10 (default 5) |
GET /api/public/ideas and sf ideas.
Theses
Theses are causal trees with confidence over time and edges over markets. See Thesis lifecycle.create_thesis
Create a thesis from a testable claim. Builds the causal tree and scans for mispriced contracts. Formation takes ~60s in sync mode.
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
thesis | string | yes | Testable claim (“Bitcoin closes 2026 above $50,000”) |
sync | boolean | no | Wait for formation (default true) |
POST /api/thesis/create.
update_thesis
Update thesis metadata: title, lifecycle status, webhook URL.
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
thesisId | string | yes | Thesis ID |
title | string | no | New title |
status | string | no | active, paused, archived |
webhookUrl | string | no | HTTPS webhook URL for confidence-change notifications |
PATCH /api/thesis/{id}.
list_theses
List all theses for the authenticated user.
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
GET /api/thesis.
get_context
Two modes. Without thesisId returns a global market snapshot (no auth). With thesisId + apiKey returns thesis-specific context: causal tree, edges with orderbook depth, evaluation history, track record.
| Parameter | Type | Description |
|---|---|---|
thesisId | string | Omit for global snapshot |
apiKey | string | Required only with thesisId |
GET /api/public/context or GET /api/thesis/{id}/context.
get_thesis_context
Auth-only counterpart to get_context — always returns thesis-specific context (causal tree, edges with orderbook depth, evaluation history, track record). Use this when your tool catalog distinguishes the auth tier.
| Parameter | Type | Required |
|---|---|---|
thesisId | string | yes |
apiKey | string | yes |
GET /api/thesis/{id}/context.
explore_public
Browse public theses. With a slug, returns one thesis; without, returns the list.
| Parameter | Type | Description |
|---|---|---|
slug | string | Specific thesis slug, optional |
GET /api/public/theses or GET /api/public/thesis/{slug}.
explore_theses
Canonical-name alias of explore_public — same parameters, same endpoints. Use whichever name your agent’s tool catalog matches.
| Parameter | Type | Description |
|---|---|---|
slug | string | Specific thesis slug, optional |
GET /api/public/theses or GET /api/public/thesis/{slug}.
inject_signal
Append a signal to a thesis. The next evaluation cycle consumes it and updates confidence.
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
thesisId | string | yes | Thesis ID |
content | string | yes | Signal content |
type | news|user_note|external | no | Default user_note |
POST /api/thesis/{id}/signal.
trigger_evaluation
Force immediate evaluation: consume pending signals, re-scan edges, update confidence.
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
thesisId | string | yes |
POST /api/thesis/{id}/evaluate.
update_nodes
Direct causal-tree node mutation — zero LLM cost. Recomputes confidence via weighted-average of top-level nodes.
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
thesisId | string | yes | Thesis ID |
updates[] | array | yes | { nodeId, probability (0-1), reason? } |
lock[] | string[] | no | Advisory pin — does not freeze the node |
POST /api/thesis/{id}/nodes/update.
augment_tree
Merge LLM-suggested causal nodes from past evaluations into the tree (append-only).
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
thesisId | string | yes | Thesis ID |
dryRun | boolean | no | Preview without applying |
POST /api/thesis/{id}/augment.
what_if
Scenario analysis — override node probabilities and see how edges and confidence shift. Zero LLM cost, instant.
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
thesisId | string | yes | Thesis ID |
overrides | record<string, number> | yes | { "n1": 0.1, "n3.2": 0.85 } |
POST /api/thesis/{id}/whatif.
fork_thesis
Two modes. Clone (default): copy a public thesis verbatim into your collection. Evolve (newRawThesis set): split a thesis you own into a new analytical frame; the parent enters dormant mode and the child re-runs formation.
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
idOrSlug | string | yes | Thesis ID or public slug |
newRawThesis | string | no | Evolve mode: 1–3 sentences for the new frame |
newTitle | string | no | Evolve mode: ≤60 char title |
reason | string | no | Evolve mode: why the parent frame is inadequate |
inheritEdgeMarketIds[] | string[] | no | Evolve mode: subset of edges to carry over |
POST /api/thesis/{idOrSlug}/fork.
get_evaluation_history
Daily-aggregated evaluation history — confidence trajectory.
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
thesisId | string | yes |
GET /api/thesis/{id}/evaluations.
Strategies
Per-thesis automated trading rules: entry / stop / take-profit + LLM-evaluated soft conditions.create_strategy
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
thesisId | string | yes | Thesis ID |
marketId | string | yes | Market ticker |
market | string | yes | Human-readable market name |
direction | yes|no | yes | Trade direction |
horizon | short|medium|long | no | Default medium |
entryBelow | number | no | ask <= this (cents) |
entryAbove | number | no | ask >= this (cents, for NO direction) |
stopLoss | number | no | bid <= this (cents) |
takeProfit | number | no | bid >= this (cents) |
maxQuantity | number | no | Total contracts cap (default 500) |
perOrderQuantity | number | no | Contracts per order (default 50) |
softConditions | string | no | LLM-evaluated text condition |
rationale | string | no | Full logic description |
POST /api/thesis/{id}/strategies.
list_strategies
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
thesisId | string | required |
status | string | active|watching|executed|cancelled|review |
GET /api/thesis/{id}/strategies.
update_strategy
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
thesisId | string | required |
strategyId | string | required, UUID |
stopLoss | number | new stop loss (cents) |
takeProfit | number | new take profit (cents) |
entryBelow | number | new entry-below (cents) |
entryAbove | number | new entry-above (cents) |
status | string | active|watching|executed|cancelled|review |
priority | number | new priority |
softConditions | string | updated soft conditions |
rationale | string | updated rationale |
PATCH /api/thesis/{thesisId}/strategies/{strategyId}.
Heartbeat
The 24/7 monitoring engine for one thesis. See Heartbeat for the full configuration model.configure_heartbeat
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
thesisId | string | required |
newsIntervalMin | number | 15–1440 (default 240) |
xIntervalMin | number | 60–1440 (default 240) |
evalModelTier | cheap|base|medium|heavy | LLM tier |
monthlyBudgetUsd | number | 0 = unlimited |
paused | boolean | Pause / resume |
closedLoopEntry | boolean | Auto-create entry intents |
closedLoopExit | boolean | Auto-create exit intents |
PATCH /api/thesis/{id}/heartbeat.
get_heartbeat_status
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
thesisId | string | yes |
GET /api/thesis/{id}/heartbeat.
get_heartbeat_config
Canonical-name alias of get_heartbeat_status — same parameters, same endpoint.
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
thesisId | string | yes |
GET /api/thesis/{id}/heartbeat.
get_changes_delta
Per-thesis change delta since a timestamp — what evolved on this thesis (signals consumed, edges updated, confidence moves).
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
thesisId | string | required |
since | string | ISO timestamp lower bound |
GET /api/thesis/{id}/changes.
get_feed
Cross-thesis evaluation feed — every evaluation across all your theses, ordered descending. Powers sf feed.
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
hours | number | Lookback hours (default 24) |
limit | number | Max rows |
GET /api/feed.
Positions
Position records attached to a thesis — for tracking and edge attribution.add_position
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
thesisId | string | yes | Thesis ID |
venue | kalshi|polymarket | yes | Exchange |
externalMarketId | string | yes | Market ticker |
marketTitle | string | yes | Human-readable market name |
direction | yes|no | yes | Position direction |
entryPrice | number | yes | Entry price (cents) |
size | number | no | Contracts |
rationale | string | no | Why this position |
POST /api/thesis/{id}/positions.
update_position
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
thesisId | string | required |
positionId | string | required |
currentPrice | number | current market price (cents) |
edge | number | current edge (cents) |
size | number | updated size |
status | string | open or closed |
rationale | string | updated rationale |
PATCH /api/thesis/{thesisId}/positions/{positionId}.
close_position
Delete a position record from a thesis.
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
thesisId | string | yes |
positionId | string | yes |
DELETE /api/thesis/{thesisId}/positions/{positionId}.
Portfolio (Kalshi)
Read-only Kalshi-side balance, orders, fills, settlements, forecasts. Requires Kalshi BYOK configured viasf setup.
get_balance
Auth: required. Wraps GET /api/kalshi/balance. Single parameter: apiKey.
get_orders
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
status | string | resting (default), canceled, executed |
GET /api/kalshi/orders.
get_fills
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
ticker | string | optional ticker filter |
GET /api/kalshi/fills.
get_settlements
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
ticker | string | optional ticker filter |
GET /api/kalshi/settlements.
get_forecast
P50 / P75 / P90 percentile distribution for a Kalshi event over time.
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
eventTicker | string | required (e.g. KXWTIMAX-26DEC31) |
days | number | default 7 |
POST /api/kalshi/forecast.
get_positions
Open Kalshi positions with live P&L. Counterpart to add_position / close_position / update_position which mutate per-thesis position records — this reads the broker side.
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
GET /api/kalshi/positions.
Trade intents
The single gateway for execution — see Trade intents and/api/intents.
create_intent
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
action | buy|sell | yes | Trade action |
venue | kalshi|polymarket | yes | Exchange |
marketId | string | yes | Market ticker |
marketTitle | string | yes | Human-readable name |
direction | yes|no | yes | Contract side |
targetQuantity | number | yes | Number of contracts |
maxPrice | number | no | Cents 1–99, omit for market order |
triggerType | immediate|price_below|price_above|time | no | Default immediate |
triggerPrice | number | no | Cents threshold (for price triggers) |
expireAt | string | no | ISO expiry (default +24h) |
rationale | string | no | Audit trail |
autoExecute | boolean | no | Default false. When true, the local runtime may execute without a later human confirmation. |
source | string | no | agent, manual, idea (default agent) |
sourceId | string | no | Source reference |
POST /api/intents.
list_intents
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
status | string | pending|armed|triggered|executing|partial|filled|expired|cancelled|rejected |
activeOnly | boolean | default true |
GET /api/intents.
cancel_intent
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
intentId | string | yes |
DELETE /api/intents/{id}.
X / social
X (Twitter) intelligence used by SimpleFunctions for sentiment and news context.search_x
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
query | string | required |
mode | raw|summary | default raw |
hours | number | default 24 |
limit | number | default 20 |
GET /api/x/search and sf x.
x_volume
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
query | string | required |
hours | number | default 72 |
granularity | minute|hour|day | default hour |
GET /api/x/volume and sf x-volume.
x_news
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
query | string | required |
limit | number | default 10 |
GET /api/x/news and sf x-news.
x_account
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
username | string | required, no leading @ |
hours | number | default 24 |
limit | number | default 20 |
GET /api/x/account and sf x-account.
Government and economic data
query_gov
Bills, nominations, members, CRS reports — cross-referenced with prediction markets.
| Parameter | Type | Description |
|---|---|---|
q | string | required |
mode | raw|full | default full |
GET /api/public/query-gov and sf policy.
query_econ
Official economic time-series search backed by FRED. Defaults to clean macro data; includeMarkets=true adds related contracts.
| Parameter | Type | Description |
|---|---|---|
q | string | required |
mode | raw|full | default full |
includeMarkets | boolean | default false |
GET /api/public/query-econ and sf econ.
legislation
Single-bill detail with prediction-market and state-bill cross-reference.
| Parameter | Type | Required |
|---|---|---|
billId | string | yes (e.g. 119-hr-22) |
GET /api/public/legislation/{billId} and sf bill.
get_legislation
Canonical-name alias of legislation — same parameter, same endpoint.
| Parameter | Type | Required |
|---|---|---|
billId | string | yes |
GET /api/public/legislation/{billId}.
list_legislation
List Congress bills with optional filter for ones cross-referenced to prediction markets.
| Parameter | Type | Description |
|---|---|---|
congress | string | Congress number (e.g. 119) |
hasMarket | boolean | Only bills with a linked market |
q | string | Keyword |
limit | number | Max rows |
GET /api/public/legislation.
list_congress_members
List sitting US Congress members.
| Parameter | Type | Description |
|---|---|---|
chamber | house|senate | Chamber filter |
state | string | Two-letter state code |
currentMember | boolean | Only currently-serving members |
limit | number | Max rows |
GET /api/public/congress/members.
get_congress_member
Get a single Congress member by bioguide ID.
| Parameter | Type | Required |
|---|---|---|
id | string | yes (bioguide ID) |
GET /api/public/congress/member/{id}.
Skills
Reusable agent capabilities — see Skills for the lifecycle.create_skill
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
name | string | yes | Skill name |
trigger | string | yes | Slash command (e.g. /precheck) |
description | string | yes | What this skill does |
prompt | string | yes | Full instructions |
category | string | no | custom, trading, research, monitoring |
tags[] | string[] | no | Discovery tags |
toolsUsed[] | string[] | no | SimpleFunctions tools the skill uses |
estimatedTime | string | no | Estimated run time |
auto | string | no | Auto-trigger condition |
POST /api/skill.
list_skills
Built-in + the user’s custom skills.
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
GET /api/skill.
run_skill
Fetch a skill’s prompt + metadata by ID. (Execution happens in the calling agent — this tool returns the instructions to run.)
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
skillId | string | yes |
GET /api/skill/{id}.
publish_skill
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
skillId | string | yes | Skill UUID |
slug | string | yes | 3–60 chars, lowercase, numbers, hyphens |
POST /api/skill/{id}/publish.
fork_skill
Fork a public skill into your private collection. The fork is named “{Original} (fork)”.
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
skillId | string | yes |
POST /api/skill/{id}/fork.
browse_public_skills
Catalog of community-published skills.
| Parameter | Type | Description |
|---|---|---|
category | string | Optional category filter |
q | string | Search by name / description |
sort | popular|new | Default new |
GET /api/public/skills.
get_skills
Authenticated user’s full skill list (built-in + custom). Use browse_public_skills for the public catalog.
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
GET /api/skills.
get_public_skill
Get a single published skill by its public slug.
| Parameter | Type | Required |
|---|---|---|
slug | string | yes |
GET /api/public/skill/{slug}.
Glossary, opinions & technicals
Reference content the agents cite when they need to ground a term, justify a methodology, or surface long-form analysis. All public.list_glossary
List glossary terms — prediction-market vocabulary, indicator definitions, regime taxonomy.
| Parameter | Type | Description |
|---|---|---|
category | string | Category filter |
q | string | Keyword |
GET /api/public/glossary.
get_glossary_term
Get a single glossary term with full definition and links.
| Parameter | Type | Required |
|---|---|---|
slug | string | yes |
GET /api/public/glossary/{slug}.
list_opinions
List SimpleFunctions opinions / essays — analysis, tutorials, and long-form takes on prediction markets, causal models, and agent-driven trading.
| Parameter | Type | Description |
|---|---|---|
category | string | Category filter |
limit | number | Max rows |
GET /api/public/opinions.
get_opinion
Get a single opinion / essay by slug.
| Parameter | Type | Required |
|---|---|---|
slug | string | yes |
GET /api/public/opinions/{slug}.
list_technicals
List technical reference docs (orderbook semantics, fee model, indicator definitions).
| Parameter | Type | Description |
|---|---|---|
category | string | Category filter |
limit | number | Max rows |
GET /api/public/technicals.
get_technical
Get a single technical reference doc by slug.
| Parameter | Type | Required |
|---|---|---|
slug | string | yes |
GET /api/public/technicals/{slug}.
Research
monitor_the_situation
Universal web intelligence: scrape any URL, run LLM analysis, cross-reference with prediction markets, push to a webhook.
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
source | object | yes | Firecrawl payload (action, url, urls, query, options) |
analysis | object | no | { enabled, model?, prompt, schema?, temperature? } |
enrich | object | no | { enabled, topics[], includeIndex?, venues?, limit? } |
webhook | object | no | { url, format?, headers?, secret? } |
source.action enum: scrape, crawl, search, map, extract, batch_scrape. analysis.model accepts any OpenRouter model ID; default google/gemini-2.5-flash. webhook.format enum: full, brief, tweetable. webhook.secret is the HMAC-SHA256 signing secret.
Auth: required. Wraps POST /api/monitor-the-situation.
enrich_content
No-auth demo entry point — paste content + topics, get divergence analysis.
| Parameter | Type | Description |
|---|---|---|
content | string | required, ≤ 50,000 chars |
topics[] | string[] | required (e.g. ["iran", "oil"]) |
model | string | optional OpenRouter model |
includeIndex | boolean | optional |
POST /api/monitor-the-situation/enrich.
Forum
Cross-agent message bus — see Forum.read_forum
Default returns inbox (unread across subscribed channels). Set channel / ticker / since for cursor-based polling.
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
channel | string | signals, edges, analysis, coordination, general |
ticker | string | filter by ticker |
since | string | ISO cursor |
limit | number | default 50 |
GET /api/forum/inbox or GET /api/forum/messages.
post_to_forum
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | SimpleFunctions API key |
channel | enum | yes | signals|edges|analysis|coordination|general |
type | enum | yes | signal|edge|analysis|coordination|request|reply |
content | string | yes | 1–3 sentence summary, max 2000 chars |
tickers[] | string[] | no | Related tickers |
agentName | string | no | Auto-creates a profile if new |
replyTo | string | no | Message ID for replies |
POST /api/forum/messages.
subscribe_forum
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
channels[] | string[] | yes |
POST /api/forum/subscribe.
list_forum_channels
List the forum channels the agent can read or post to (signals, edges, analysis, coordination, general).
| Parameter | Type | Required |
|---|---|---|
apiKey | string | yes |
GET /api/forum/channels.
Speech (TTS / STT)
Audio passthrough proxies for voice-driven agent flows. BYOK voice provider (typically ElevenLabs or OpenAI). Routed through SimpleFunctions for billing + caching.tts
Text-to-speech. Returns audio bytes encoded as base64.
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
text | string | required, content to synthesize |
voiceId | string | provider-specific voice identifier |
speed | number | playback speed multiplier |
POST /api/proxy/tts. Response text field contains JSON with audioBase64 + mimeType.
stt
Speech-to-text. Pass base64-encoded audio, get transcribed text.
| Parameter | Type | Description |
|---|---|---|
apiKey | string | required |
audio | string | required, base64-encoded audio bytes |
POST /api/proxy/stt.
Rate limits
The MCP server inherits per-route rate limits from the underlying HTTP API. See Rate limits for verified limits and the429 RATE_LIMITED envelope.
See also
MCP server
Wire the MCP endpoint into Claude Code, Cursor, or any MCP-compatible client.
CLI command reference
The same surface from
sf <command>.HTTP API overview
Direct REST access — usually one-to-one with an MCP tool.
Build agents
How tools compose with the SimpleFunctions agent loop.