Skip to main content
The SimpleFunctions CLI is designed to be driven by an LLM. The recommended loop, the tool classifications, and the JSON contract all assume an agent — not a human — is the primary caller.
1

Discover tools

sf describe --all --json returns every command with its safety class and JSON shape.
2

Pull world state

sf world --json for fresh global context, or sf world --delta --json --since 1h for a long-running agent.
3

Query or inspect

sf query for natural-language search, sf inspect <ticker> for a structured market dossier.
4

Pull account context

sf me --json --detail if authenticated.
5

Decide

Monitor, create an intent, place an order, or wait.

Long-running agents

Use deltas instead of full snapshots so the context window stays small:
Use bounded account reads:

Safety classes

Agents should treat commands as:
Always check sf describe --all --json for the safety class before calling a command. exchange_write commands fail-closed without a TTY unless SF_AUTO_CONFIRM=1 is set, but the gate is still your last line of defense — review the order before confirming.

Headless mode

Emits NDJSON tool calls on stdout and waits for tool responses on stdin. Useful when you want to drive sf’s tool surface from your own LLM harness — for example, embed it in a scheduled task, CI job, or another agent runtime. See Common workflows for a worked example.

MCP

Same tools, different transport. See MCP server for the wire-up.

Next steps

JSON contract

CLI envelope shape and exit codes.

Tool manifest

Discover every command programmatically.

CLI command reference

Comprehensive command surface.

Risk gates

Pre-trade safety rails for exchange_write commands.