Reads are cursor-paginated. The server stays at 20 tools or fewer; create, update, replay and other admin verbs are secondlayer <noun> ... --json in the CLI. Account tools register only when SECONDLAYER_API_URL is the hosted API.
Subgraphs
Tool
What it does
subgraphs_deploy
Deploy a subgraph from TypeScript code. Local only.
subgraphs_list
List all deployed subgraphs.
subgraphs_query
Query rows from a subgraph table (max 200 rows), reading the open /v1 surface — { rows, next_cursor, tip } envelope, cursor-paginated (no offset).
subgraphs_status
Get full details of a subgraph including schema, health (incl. health.emptyMapping when processed events wrote 0 rows), and table columns.
subgraphs_test
Prove a subgraph mapping writes rows against Index data before deploy. Local only.
Webhooks
Tool
What it does
webhooks_deliveries
List recent delivery attempts for a webhook — status code, attempt count, error, duration, timestamps.
webhooks_list
List all webhooks for the current account.
Index
Tool
What it does
batch_query
Run up to 10 public /v1 reads in one round trip (POST /v1/batch).
index_events
List chain events from the Index by event type.
index_print_schema
Empirical per-topic print payload schemas for a contract, inferred from sampled on-chain events: each topic's fields with observed Clarity types, decoded TS types, subgraph column types, and presence rates.
index_rune_activity
List Bitcoin Runes etch, mint, transfer, and burn events.
index_rune_balances
List current Bitcoin Runes balances per unspent output.
index_runes
List the Bitcoin Runes catalog: identity, supply, mints, and mint terms.
index_state_writes
List the exact contract-state writes each block committed, in node order: {block_height, ordinal, tx_index, key, value_hex}.
Streams
Tool
What it does
streams_tip
Current canonical chain tip as Streams sees it: block height/hash, burn height, finalized_height, lag_seconds, and the oldest seekable height/cursor for this key's retention window.
Contracts
Tool
What it does
contracts_find
Discover deployed Stacks contracts conforming to a trait (e.g. "sip-010", "sip-009", "sip-013").
contracts_get_abi
Fetch a single deployed contract's ABI from the registry (prod-safe).
Proofs
Tool
What it does
proofs_inspect
Proof inventory for one Stacks block: the state writes the block committed (not checked here) and the free /v1/proofs routes that serve every byte.
Account
Tool
What it does
account_whoami
Show the archive account email at api.secondlayer.tools, not the self-host instance. Hosted only.
billing_status
Read-only credits state for the account at api.secondlayer.tools: prepaid balance, this month's spend, auto-refill config, this month's usage and the 24h burn rate. Hosted only.
Cursors are opaque and per keyspace: contract-call cursors are not interchangeable with event cursors.
For subgraph tables, every page with rows returns next_cursor: poll with cursor = next_cursor ?? cursor to tail without streaming.