secondlayer is an MCP server published by tools.secondlayer, hosted at api.secondlayer.tools. When last checked on 2026-11-21 it was working: it answers and lists its tools. It declares 15 tools, including subgraphs_scaffold, index_ft_transfers, index_nft_transfers, index_events, index_contract_calls.
Stacks chain data: contracts, events, transfers, subgraph scaffolds. Hosted with browser sign-in.
Nothing else in the archive shares these values.
Inferred from the host name and headers: what a server runs on, not who runs it.
Generate a subgraph from observed print events when available; ABI token transfers or public functions only when the contract has never printed. Review the TypeScript, run subgraphs_test until ok: true with written >= 1, read skipped, then subgraphs_deploy. dryRun is DDL only.
| Parameter | Type | Description |
|---|---|---|
| contractId * | string | Fully qualified contract ID (e.g. SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.amm-pool-v2-01) |
| subgraphName | string | Override the subgraph name (defaults to contract name) |
{
"name": "subgraphs_scaffold",
"description": "Generate a subgraph from observed print events when available; ABI token transfers or public functions only when the contract has never printed. Review the TypeScript, run subgraphs_test until ok: true with written >= 1, read skipped, then subgraphs_deploy. dryRun is DDL only.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"contractId"
],
"properties": {
"contractId": {
"type": "string",
"description": "Fully qualified contract ID (e.g. SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.amm-pool-v2-01)"
},
"subgraphName": {
"type": "string",
"description": "Override the subgraph name (defaults to contract name)"
}
},
"additionalProperties": false
}
}None yet. Changes appear after a server's second daily check.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
List decoded SIP-010 fungible-token transfers from Index. Reads are keyless.
| Parameter | Type | Description |
|---|---|---|
| limit | number | Max rows for this page |
| order | string | asc (default) reads oldest first; desc reads newest first. A cursor only resumes under the order that issued it. |
| cursor | string | Opaque cursor from a prior response's next_cursor |
| sender | string | Filter by sender principal |
| toHeight | number | End block height (inclusive) |
| recipient | string | Filter by recipient principal |
| contractId | string | Filter by contract id |
| fromHeight | number | Start block height (inclusive) |
| assetIdentifier | string | Filter by asset identifier (contract::asset), e.g. SP…sbtc-token::sbtc-token |
{
"name": "index_ft_transfers",
"description": "List decoded SIP-010 fungible-token transfers from Index. Reads are keyless.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"limit": {
"type": "number",
"description": "Max rows for this page"
},
"order": {
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "asc (default) reads oldest first; desc reads newest first. A cursor only resumes under the order that issued it."
},
"cursor": {
"type": "string",
"description": "Opaque cursor from a prior response's next_cursor"
},
"sender": {
"type": "string",
"description": "Filter by sender principal"
},
"toHeight": {
"type": "number",
"description": "End block height (inclusive)"
},
"recipient": {
"type": "string",
"description": "Filter by recipient principal"
},
"contractId": {
"type": "string",
"description": "Filter by contract id"
},
"fromHeight": {
"type": "number",
"description": "Start block height (inclusive)"
},
"assetIdentifier": {
"type": "string",
"description": "Filter by asset identifier (contract::asset), e.g. SP…sbtc-token::sbtc-token"
}
},
"additionalProperties": false
}
}List decoded SIP-009 non-fungible-token transfers from Index. Reads are keyless.
| Parameter | Type | Description |
|---|---|---|
| limit | number | Max rows for this page |
| order | string | asc (default) reads oldest first; desc reads newest first. A cursor only resumes under the order that issued it. |
| cursor | string | Opaque cursor from a prior response's next_cursor |
| sender | string | Filter by sender principal |
| toHeight | number | End block height (inclusive) |
| recipient | string | Filter by recipient principal |
| contractId | string | Filter by contract id |
| fromHeight | number | Start block height (inclusive) |
| assetIdentifier | string | Filter by asset identifier (contract::asset) |
{
"name": "index_nft_transfers",
"description": "List decoded SIP-009 non-fungible-token transfers from Index. Reads are keyless.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"limit": {
"type": "number",
"description": "Max rows for this page"
},
"order": {
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "asc (default) reads oldest first; desc reads newest first. A cursor only resumes under the order that issued it."
},
"cursor": {
"type": "string",
"description": "Opaque cursor from a prior response's next_cursor"
},
"sender": {
"type": "string",
"description": "Filter by sender principal"
},
"toHeight": {
"type": "number",
"description": "End block height (inclusive)"
},
"recipient": {
"type": "string",
"description": "Filter by recipient principal"
},
"contractId": {
"type": "string",
"description": "Filter by contract id"
},
"fromHeight": {
"type": "number",
"description": "Start block height (inclusive)"
},
"assetIdentifier": {
"type": "string",
"description": "Filter by asset identifier (contract::asset)"
}
},
"additionalProperties": false
}
}List decoded chain events from the Index by event type. Use this for event types without a dedicated tool (stx_*, ft_mint/burn, nft_mint/burn, print), and for trait-scoped queries: set `trait` (e.g. sip-010) to match all contracts conforming to a standard — pair with contracts_find to discover traits. For ft/nft transfers without a trait prefer index_ft_transfers / index_nft_transfers.
| Parameter | Type | Description |
|---|---|---|
| limit | number | Max rows for this page |
| order | string | asc (default) reads oldest first; desc reads newest first. A cursor only resumes under the order that issued it. |
| trait | string | Match contracts conforming to a trait/standard (e.g. sip-010). Mutually exclusive with contractId; contract-keyed event types only. |
| cursor | string | Opaque cursor from a prior response's next_cursor |
| sender | string | Filter by sender principal |
| toHeight | number | End block height (inclusive) |
| eventType * | string | Required. Decoded event type to list. |
| recipient | string | Filter by recipient principal |
| txContext | boolean | Join the submitting transaction into each event (tx_sender, tx_type, tx_status, tx_contract_id, tx_function_name). For print events it's the only source of the submitting sender. |
| contractId | string | Filter by contract id |
| fromHeight | number | Start block height (inclusive) |
| assetIdentifier | string | Filter by asset identifier where applicable |
{
"name": "index_events",
"description": "List decoded chain events from the Index by event type. Use this for event types without a dedicated tool (stx_*, ft_mint/burn, nft_mint/burn, print), and for trait-scoped queries: set `trait` (e.g. sip-010) to match all contracts conforming to a standard — pair with contracts_find to discover traits. For ft/nft transfers without a trait prefer index_ft_transfers / index_nft_transfers.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"eventType"
],
"properties": {
"limit": {
"type": "number",
"description": "Max rows for this page"
},
"order": {
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "asc (default) reads oldest first; desc reads newest first. A cursor only resumes under the order that issued it."
},
"trait": {
"type": "string",
"description": "Match contracts conforming to a trait/standard (e.g. sip-010). Mutually exclusive with contractId; contract-keyed event types only."
},
"cursor": {
"type": "string",
"description": "Opaque cursor from a prior response's next_cursor"
},
"sender": {
"type": "string",
"description": "Filter by sender principal"
},
"toHeight": {
"type": "number",
"description": "End block height (inclusive)"
},
"eventType": {
"enum": [
"stx_transfer",
"stx_mint",
"stx_burn",
"stx_lock",
"ft_transfer",
"ft_mint",
"ft_burn",
"nft_transfer",
"nft_mint",
"nft_burn",
"print"
],
"type": "string",
"description": "Required. Decoded event type to list."
},
"recipient": {
"type": "string",
"description": "Filter by recipient principal"
},
"txContext": {
"type": "boolean",
"description": "Join the submitting transaction into each event (tx_sender, tx_type, tx_status, tx_contract_id, tx_function_name). For print events it's the only source of the submitting sender."
},
"contractId": {
"type": "string",
"description": "Filter by contract id"
},
"fromHeight": {
"type": "number",
"description": "Start block height (inclusive)"
},
"assetIdentifier": {
"type": "string",
"description": "Filter by asset identifier where applicable"
}
},
"additionalProperties": false
}
}List decoded contract calls from the Index (function name, args, result). Set `trait` (e.g. sip-010) to match calls to all contracts conforming to a standard. Note: contract-call cursors are a SEPARATE keyspace from event cursors — they are not interchangeable.
| Parameter | Type | Description |
|---|---|---|
| limit | number | Max rows for this page |
| trait | string | Match contracts conforming to a trait/standard (e.g. sip-010). Mutually exclusive with contractId. |
| cursor | string | Opaque cursor from a prior response's next_cursor |
| sender | string | Filter by caller principal |
| toHeight | number | End block height (inclusive) |
| contractId | string | Filter by contract id |
| fromHeight | number | Start block height (inclusive) |
| functionName | string | Filter by called function name |
{
"name": "index_contract_calls",
"description": "List decoded contract calls from the Index (function name, args, result). Set `trait` (e.g. sip-010) to match calls to all contracts conforming to a standard. Note: contract-call cursors are a SEPARATE keyspace from event cursors — they are not interchangeable.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"limit": {
"type": "number",
"description": "Max rows for this page"
},
"trait": {
"type": "string",
"description": "Match contracts conforming to a trait/standard (e.g. sip-010). Mutually exclusive with contractId."
},
"cursor": {
"type": "string",
"description": "Opaque cursor from a prior response's next_cursor"
},
"sender": {
"type": "string",
"description": "Filter by caller principal"
},
"toHeight": {
"type": "number",
"description": "End block height (inclusive)"
},
"contractId": {
"type": "string",
"description": "Filter by contract id"
},
"fromHeight": {
"type": "number",
"description": "Start block height (inclusive)"
},
"functionName": {
"type": "string",
"description": "Filter by called function name"
}
},
"additionalProperties": false
}
}List decoded blocks from Index. Reads are keyless.
| Parameter | Type | Description |
|---|---|---|
| limit | number | Max rows for this page |
| cursor | string | Opaque cursor from a prior response's next_cursor |
| toHeight | number | End block height (inclusive) |
| fromHeight | number | Start block height (inclusive) |
{
"name": "index_blocks",
"description": "List decoded blocks from Index. Reads are keyless.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"limit": {
"type": "number",
"description": "Max rows for this page"
},
"cursor": {
"type": "string",
"description": "Opaque cursor from a prior response's next_cursor"
},
"toHeight": {
"type": "number",
"description": "End block height (inclusive)"
},
"fromHeight": {
"type": "number",
"description": "Start block height (inclusive)"
}
},
"additionalProperties": false
}
}List decoded transactions from Index. Filter by type, sender, or contract. Reads are keyless.
| Parameter | Type | Description |
|---|---|---|
| type | string | Filter by transaction type |
| limit | number | Max rows for this page |
| cursor | string | Opaque cursor from a prior response's next_cursor |
| sender | string | Filter by sender principal |
| toHeight | number | End block height (inclusive) |
| contractId | string | Filter by contract id |
| fromHeight | number | Start block height (inclusive) |
{
"name": "index_transactions",
"description": "List decoded transactions from Index. Filter by type, sender, or contract. Reads are keyless.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"type": {
"type": "string",
"description": "Filter by transaction type"
},
"limit": {
"type": "number",
"description": "Max rows for this page"
},
"cursor": {
"type": "string",
"description": "Opaque cursor from a prior response's next_cursor"
},
"sender": {
"type": "string",
"description": "Filter by sender principal"
},
"toHeight": {
"type": "number",
"description": "End block height (inclusive)"
},
"contractId": {
"type": "string",
"description": "Filter by contract id"
},
"fromHeight": {
"type": "number",
"description": "Start block height (inclusive)"
}
},
"additionalProperties": false
}
}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. Use before writing print_event subgraph handlers to learn what's on e.data. Anonymous read.
| Parameter | Type | Description |
|---|---|---|
| contractId * | string | Contract id (SP….name) whose print events to profile |
{
"name": "index_print_schema",
"description": "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. Use before writing print_event subgraph handlers to learn what's on e.data. Anonymous read.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"contractId"
],
"properties": {
"contractId": {
"type": "string",
"description": "Contract id (SP….name) whose print events to profile"
}
},
"additionalProperties": false
}
}Discover the Index vocabulary: every event type and its columns, allowed/equality filters, and required-non-null fields (and which types accept `trait`). Read this before building Index queries instead of guessing filters. Anonymous read.
No parameters.
{
"name": "index_discover",
"description": "Discover the Index vocabulary: every event type and its columns, allowed/equality filters, and required-non-null fields (and which types accept `trait`). Read this before building Index queries instead of guessing filters. Anonymous read.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {},
"additionalProperties": false
}
}Run up to 10 public /v1 reads in one round trip (POST /v1/batch). Each item keeps its own auth/quota/pay-per-call semantics; results return in order with per-item status. Paths must start with /v1/index, /v1/subgraphs, /v1/streams, or /v1/contracts.
| Parameter | Type | Description |
|---|---|---|
| requests * | array | Read descriptors, executed concurrently |
{
"name": "batch_query",
"description": "Run up to 10 public /v1 reads in one round trip (POST /v1/batch). Each item keeps its own auth/quota/pay-per-call semantics; results return in order with per-item status. Paths must start with /v1/index, /v1/subgraphs, /v1/streams, or /v1/contracts.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"requests"
],
"properties": {
"requests": {
"type": "array",
"items": {
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"type": "string",
"description": "Public /v1 read path"
},
"params": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
}
},
"maxItems": 10,
"minItems": 1,
"description": "Read descriptors, executed concurrently"
}
},
"additionalProperties": false
}
}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. Call it before a cursor walk to know where the stream ends, and after an ingest to check lag.
No parameters.
{
"name": "streams_tip",
"description": "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. Call it before a cursor walk to know where the stream ends, and after an ingest to check lag.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {},
"additionalProperties": false
}
}List the Streams bulk parquet dumps manifest — coverage range, latest_finalized_cursor, and per-file metadata (block range, row count, size, sha256, signed URL). This is the cold backfill path for downloading all raw data; fetch the file URLs directly (e.g. with DuckDB). Requires the dumps base URL to be configured (SL_STREAMS_DUMPS_URL). For live reads use REST GET /v1/streams/events; for tip/lag use streams_tip.
No parameters.
{
"name": "streams_dumps",
"description": "List the Streams bulk parquet dumps manifest — coverage range, latest_finalized_cursor, and per-file metadata (block range, row count, size, sha256, signed URL). This is the cold backfill path for downloading all raw data; fetch the file URLs directly (e.g. with DuckDB). Requires the dumps base URL to be configured (SL_STREAMS_DUMPS_URL). For live reads use REST GET /v1/streams/events; for tip/lag use streams_tip.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {},
"additionalProperties": false
}
}Discover deployed Stacks contracts conforming to a trait (e.g. "sip-010", "sip-009", "sip-013"). The discovery endpoint for "which contracts implement X". Reads are public.
| Parameter | Type | Description |
|---|---|---|
| limit | number | Page size, 1–500 (default 100) |
| trait * | string | Required. Trait to match (e.g. "sip-010"). |
| cursor | string | Opaque cursor from a prior response's next_cursor |
| include | string | Set to "abi" to include each contract's full ABI |
| conformance | string | declared = parsed from source, inferred = ABI shape-match, any = either (default) |
{
"name": "contracts_find",
"description": "Discover deployed Stacks contracts conforming to a trait (e.g. \"sip-010\", \"sip-009\", \"sip-013\"). The discovery endpoint for \"which contracts implement X\". Reads are public.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"trait"
],
"properties": {
"limit": {
"type": "number",
"description": "Page size, 1–500 (default 100)"
},
"trait": {
"type": "string",
"description": "Required. Trait to match (e.g. \"sip-010\")."
},
"cursor": {
"type": "string",
"description": "Opaque cursor from a prior response's next_cursor"
},
"include": {
"type": "string",
"const": "abi",
"description": "Set to \"abi\" to include each contract's full ABI"
},
"conformance": {
"enum": [
"declared",
"inferred",
"any"
],
"type": "string",
"description": "declared = parsed from source, inferred = ABI shape-match, any = either (default)"
}
},
"additionalProperties": false
}
}Fetch a single deployed contract's ABI from the registry (prod-safe). Returns the contract's metadata + full ABI (functions, maps, variables, fungible/non-fungible tokens). Returns not_found if the contract isn't in the registry. Use it to inspect a contract before subgraphs_scaffold.
| Parameter | Type | Description |
|---|---|---|
| contractId * | string | Fully qualified contract id (e.g. SP….amm-pool-v2-01) |
{
"name": "contracts_get_abi",
"description": "Fetch a single deployed contract's ABI from the registry (prod-safe). Returns the contract's metadata + full ABI (functions, maps, variables, fungible/non-fungible tokens). Returns not_found if the contract isn't in the registry. Use it to inspect a contract before subgraphs_scaffold.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"contractId"
],
"properties": {
"contractId": {
"type": "string",
"description": "Fully qualified contract id (e.g. SP….amm-pool-v2-01)"
}
},
"additionalProperties": false
}
}Show the archive account email at api.secondlayer.tools, not the self-host instance.
No parameters.
{
"name": "account_whoami",
"description": "Show the archive account email at api.secondlayer.tools, not the self-host instance.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {},
"additionalProperties": false
}
}Names, descriptions and schemas were written by the server and are shown as data.