@secondlayer/mcp 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin-http.js +156 -93
- package/dist/bin-http.js.map +10 -10
- package/dist/bin.js +156 -93
- package/dist/bin.js.map +10 -10
- package/dist/index.js +156 -93
- package/dist/index.js.map +10 -10
- package/package.json +3 -2
package/dist/bin-http.js.map
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/bin-http.ts", "../src/server.ts", "../src/lib/client.ts", "../src/lib/format.ts", "../src/
|
|
3
|
+
"sources": ["../src/bin-http.ts", "../src/server.ts", "../src/lib/client.ts", "../src/lib/format.ts", "../src/lib/tool.ts", "../src/resources.ts", "../src/tools/account.ts", "../src/tools/contracts.ts", "../src/tools/datasets.ts", "../src/tools/index.ts", "../src/tools/scaffold.ts", "../src/tools/streams.ts", "../src/tools/subgraphs.ts", "../src/tools/subscriptions.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"#!/usr/bin/env node\nimport {\n\ttype IncomingMessage,\n\ttype ServerResponse,\n\tcreateServer as createHttpServer,\n} from \"node:http\";\nimport { StreamableHTTPServerTransport } from \"@modelcontextprotocol/sdk/server/streamableHttp.js\";\nimport { createServer } from \"./server.ts\";\n\nconst port = Number.parseInt(process.env.SECONDLAYER_MCP_PORT || \"3100\");\nconst secret = process.env.SECONDLAYER_MCP_SECRET;\nconst sessions = new Map<string, StreamableHTTPServerTransport>();\n\nfunction authenticate(req: IncomingMessage): boolean {\n\tif (!secret) return true;\n\treturn req.headers.authorization === `Bearer ${secret}`;\n}\n\nconst httpServer = createHttpServer(\n\tasync (req: IncomingMessage, res: ServerResponse) => {\n\t\t// Only handle /mcp endpoint\n\t\tconst url = new URL(req.url ?? \"/\", `http://localhost:${port}`);\n\t\tif (url.pathname !== \"/mcp\") {\n\t\t\tres.writeHead(404).end(JSON.stringify({ error: \"Not found\" }));\n\t\t\treturn;\n\t\t}\n\n\t\t// Auth check\n\t\tif (!authenticate(req)) {\n\t\t\tres.writeHead(401).end(JSON.stringify({ error: \"Unauthorized\" }));\n\t\t\treturn;\n\t\t}\n\n\t\tconst sessionId = req.headers[\"mcp-session-id\"] as string | undefined;\n\n\t\tif (req.method === \"POST\") {\n\t\t\t// Read body with 1MB limit\n\t\t\tconst MAX_BODY = 1_048_576;\n\t\t\tconst chunks: Buffer[] = [];\n\t\t\tlet totalSize = 0;\n\t\t\tfor await (const chunk of req) {\n\t\t\t\ttotalSize += (chunk as Buffer).length;\n\t\t\t\tif (totalSize > MAX_BODY) {\n\t\t\t\t\tres\n\t\t\t\t\t\t.writeHead(413)\n\t\t\t\t\t\t.end(JSON.stringify({ error: \"Request body too large\" }));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tchunks.push(chunk as Buffer);\n\t\t\t}\n\t\t\t// biome-ignore lint/suspicious/noExplicitAny: interop boundary or dynamic-shape value where typing adds friction without runtime safety\n\t\t\tlet body: any;\n\t\t\ttry {\n\t\t\t\tbody = JSON.parse(Buffer.concat(chunks).toString());\n\t\t\t} catch {\n\t\t\t\tres.writeHead(400).end(JSON.stringify({ error: \"Invalid JSON\" }));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check if this is an initialize request (new session)\n\t\t\tconst isInitialize = Array.isArray(body)\n\t\t\t\t? body.some((m: { method?: string }) => m.method === \"initialize\")\n\t\t\t\t: body.method === \"initialize\";\n\n\t\t\tif (isInitialize) {\n\t\t\t\t// Create new session\n\t\t\t\tconst transport = new StreamableHTTPServerTransport({\n\t\t\t\t\tsessionIdGenerator: () => crypto.randomUUID(),\n\t\t\t\t});\n\t\t\t\tconst server = createServer();\n\t\t\t\tawait server.connect(transport);\n\n\t\t\t\t// Store session after handling (sessionId is set after first request)\n\t\t\t\tawait transport.handleRequest(req, res, body);\n\n\t\t\t\tif (transport.sessionId) {\n\t\t\t\t\tsessions.set(transport.sessionId, transport);\n\t\t\t\t\ttransport.onclose = () => {\n\t\t\t\t\t\tif (transport.sessionId) sessions.delete(transport.sessionId);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Existing session\n\t\t\tif (!sessionId || !sessions.has(sessionId)) {\n\t\t\t\tres\n\t\t\t\t\t.writeHead(400)\n\t\t\t\t\t.end(JSON.stringify({ error: \"Invalid or missing session ID\" }));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tawait sessions.get(sessionId)?.handleRequest(req, res, body);\n\t\t} else if (req.method === \"GET\") {\n\t\t\t// SSE stream for existing session\n\t\t\tif (!sessionId || !sessions.has(sessionId)) {\n\t\t\t\tres\n\t\t\t\t\t.writeHead(400)\n\t\t\t\t\t.end(JSON.stringify({ error: \"Invalid or missing session ID\" }));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tawait sessions.get(sessionId)?.handleRequest(req, res);\n\t\t} else if (req.method === \"DELETE\") {\n\t\t\t// Session teardown\n\t\t\tif (sessionId && sessions.has(sessionId)) {\n\t\t\t\t// biome-ignore lint/style/noNonNullAssertion: value is non-null after preceding check or by construction; TS narrowing limitation\n\t\t\t\tconst transport = sessions.get(sessionId)!;\n\t\t\t\tawait transport.handleRequest(req, res);\n\t\t\t\tawait transport.close();\n\t\t\t\tsessions.delete(sessionId);\n\t\t\t} else {\n\t\t\t\tres\n\t\t\t\t\t.writeHead(400)\n\t\t\t\t\t.end(JSON.stringify({ error: \"Invalid or missing session ID\" }));\n\t\t\t}\n\t\t} else {\n\t\t\tres.writeHead(405).end(JSON.stringify({ error: \"Method not allowed\" }));\n\t\t}\n\t},\n);\n\nhttpServer.listen(port, () => {\n\tconsole.error(`SecondLayer MCP HTTP server listening on port ${port}`);\n\tif (!secret)\n\t\tconsole.error(\n\t\t\t\"Warning: SECONDLAYER_MCP_SECRET not set, authentication disabled\",\n\t\t);\n});\n",
|
|
6
6
|
"import { readFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { registerResources } from \"./resources.ts\";\nimport { registerAccountTools } from \"./tools/account.ts\";\nimport { registerContractTools } from \"./tools/contracts.ts\";\nimport { registerDatasetTools } from \"./tools/datasets.ts\";\nimport { registerIndexTools } from \"./tools/index.ts\";\nimport { registerScaffoldTools } from \"./tools/scaffold.ts\";\nimport { registerStreamsTools } from \"./tools/streams.ts\";\nimport { registerSubgraphTools } from \"./tools/subgraphs.ts\";\nimport { registerSubscriptionTools } from \"./tools/subscriptions.ts\";\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\nconst pkg = JSON.parse(\n\treadFileSync(join(__dirname, \"../package.json\"), \"utf-8\"),\n);\n\nexport function createServer(): McpServer {\n\tconst server = new McpServer({\n\t\tname: \"secondlayer\",\n\t\tversion: pkg.version,\n\t});\n\n\tregisterScaffoldTools(server);\n\tregisterSubgraphTools(server);\n\tregisterSubscriptionTools(server);\n\tregisterAccountTools(server);\n\tregisterDatasetTools(server);\n\tregisterIndexTools(server);\n\tregisterStreamsTools(server);\n\tregisterContractTools(server);\n\tregisterResources(server);\n\n\treturn server;\n}\n",
|
|
7
7
|
"import { SecondLayer } from \"@secondlayer/sdk\";\n\nlet instance: SecondLayer | null = null;\n\n/**\n * Read the API key from env. `SL_API_KEY` is the single credential var, matching\n * the CLI and SDK. (The former `SL_SERVICE_KEY` / `SECONDLAYER_API_KEY` aliases\n * were removed.)\n */\nfunction readApiKey(): string | undefined {\n\treturn process.env.SL_API_KEY;\n}\n\n/**\n * Lazy SDK singleton. Built keyless when no key is set so read tools (list,\n * get, query, spec) work during open beta — reads are public. Write tools\n * (deploy/reindex/delete) and account tools hit the API without a key and get\n * a 401, surfaced with a key hint via `keyHint` below.\n */\nexport function getClient(): SecondLayer {\n\tif (!instance) {\n\t\tconst apiKey = readApiKey();\n\t\tconst baseUrl = process.env.SECONDLAYER_API_URL;\n\t\tinstance = new SecondLayer({\n\t\t\t...(apiKey ? { apiKey } : {}),\n\t\t\torigin: \"mcp\",\n\t\t\t...(baseUrl ? { baseUrl } : {}),\n\t\t});\n\t}\n\treturn instance;\n}\n\n// Appended to 401/403 errors raised on keyless requests — the operation needs\n// a write/account key, so point at where to get one.\nexport const keyHint =\n\t\" — set SL_API_KEY to an sk-sl_ API key from \" +\n\t\"https://secondlayer.tools/platform/api-keys for write and account operations\";\n\n/** Raw fetch helper for API endpoints not covered by the SDK. */\nexport async function apiRequest<T>(\n\tmethod: string,\n\tpath: string,\n\tbody?: unknown,\n): Promise<T> {\n\tconst apiKey = readApiKey();\n\tconst baseUrl =\n\t\tprocess.env.SECONDLAYER_API_URL || \"https://api.secondlayer.tools\";\n\tconst res = await fetch(`${baseUrl}${path}`, {\n\t\tmethod,\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...(apiKey ? { Authorization: `Bearer ${apiKey}` } : {}),\n\t\t},\n\t\tbody: body ? JSON.stringify(body) : undefined,\n\t});\n\tif (!res.ok) {\n\t\tconst text = await res.text().catch(() => \"\");\n\t\tconst needsKey = !apiKey && (res.status === 401 || res.status === 403);\n\t\tthrow Object.assign(\n\t\t\tnew Error((text || `HTTP ${res.status}`) + (needsKey ? keyHint : \"\")),\n\t\t\t{ status: res.status },\n\t\t);\n\t}\n\tif (res.status === 204) return undefined as T;\n\treturn res.json() as Promise<T>;\n}\n",
|
|
8
8
|
"/** Summarize a subgraph for list responses. */\nexport function formatSubgraphSummary(s: {\n\tname: string;\n\tstatus: string;\n\ttables: string[] | Record<string, unknown>;\n\tlastProcessedBlock: number;\n}) {\n\treturn {\n\t\tname: s.name,\n\t\tstatus: s.status,\n\t\ttables: Array.isArray(s.tables) ? s.tables : Object.keys(s.tables),\n\t\tlastProcessedBlock: s.lastProcessedBlock,\n\t};\n}\n\n/** Cap array length and return truncation metadata. */\nexport function withCap<T>(\n\titems: T[],\n\tcap: number,\n): { items: T[]; truncated: boolean; total: number } {\n\treturn {\n\t\titems: items.slice(0, cap),\n\t\ttruncated: items.length > cap,\n\t\ttotal: items.length,\n\t};\n}\n\n/** Build MCP text response with JSON-serialized payload. */\nexport function jsonResponse(\n\tdata: unknown,\n\tisError?: boolean,\n): { content: Array<{ type: \"text\"; text: string }>; isError?: boolean } {\n\treturn {\n\t\tcontent: [{ type: \"text\", text: JSON.stringify(data, null, 2) }],\n\t\t...(isError && { isError: true }),\n\t};\n}\n\n/** Build MCP text response with plain text payload. */\nexport function textResponse(\n\ttext: string,\n\tisError?: boolean,\n): { content: Array<{ type: \"text\"; text: string }>; isError?: boolean } {\n\treturn {\n\t\tcontent: [{ type: \"text\", text }],\n\t\t...(isError && { isError: true }),\n\t};\n}\n",
|
|
9
|
-
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\
|
|
10
|
-
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport {
|
|
11
|
-
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\
|
|
9
|
+
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\n\ninterface ToolResult {\n\tcontent: Array<{ type: \"text\"; text: string }>;\n\tisError?: boolean;\n}\n\n// Names of every tool registered via defineTool, in registration order. The\n// context resource generates its capability list from this so CAPABILITIES can\n// never drift behind the actual tool surface (a new tool auto-appears). A Set\n// dedupes across repeated createServer() calls in tests.\nconst registeredToolNames = new Set<string>();\n\n/** Tool names registered so far this process (see {@link defineTool}). */\nexport function getRegisteredToolNames(): string[] {\n\treturn [...registeredToolNames];\n}\n\n/**\n * Type-safe wrapper around McpServer.tool() that avoids TS2589.\n *\n * The MCP SDK's Zod-generic `tool()` signature recurses past TypeScript's\n * instantiation depth limit when schemas contain discriminated unions or\n * nested optionals. This helper isolates the boundary cast to one place\n * so tool files stay fully typed via the explicit `T` generic.\n *\n * Schema is typed as Record<string, unknown> to prevent TypeScript from\n * resolving the deeply recursive ZodRawShapeCompat constraint. Zod still\n * validates at runtime.\n */\nexport function defineTool<T>(\n\tserver: McpServer,\n\tname: string,\n\tdescription: string,\n\tschema: Record<string, unknown>,\n\thandler: (args: T) => Promise<ToolResult> | ToolResult,\n): void {\n\tconst wrappedHandler = async (args: T): Promise<ToolResult> => {\n\t\ttry {\n\t\t\treturn await handler(args);\n\t\t} catch (err: unknown) {\n\t\t\tconst message = err instanceof Error ? err.message : String(err);\n\t\t\tconst status =\n\t\t\t\t// biome-ignore lint/suspicious/noExplicitAny: interop boundary or dynamic-shape value where typing adds friction without runtime safety\n\t\t\t\terr instanceof Error && \"status\" in err ? (err as any).status : 0;\n\t\t\tconst type =\n\t\t\t\tstatus === 401\n\t\t\t\t\t? \"unauthorized\"\n\t\t\t\t\t: status === 404\n\t\t\t\t\t\t? \"not_found\"\n\t\t\t\t\t\t: status === 429\n\t\t\t\t\t\t\t? \"rate_limited\"\n\t\t\t\t\t\t\t: status >= 500\n\t\t\t\t\t\t\t\t? \"server_error\"\n\t\t\t\t\t\t\t\t: \"error\";\n\t\t\treturn {\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: JSON.stringify({ error: { type, status, message } }),\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tisError: true,\n\t\t\t};\n\t\t}\n\t};\n\tregisteredToolNames.add(name);\n\t(server.tool as (...args: unknown[]) => unknown)(\n\t\tname,\n\t\tdescription,\n\t\tschema,\n\t\twrappedHandler,\n\t);\n}\n",
|
|
10
|
+
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { getClient } from \"./lib/client.ts\";\nimport { formatSubgraphSummary } from \"./lib/format.ts\";\nimport { getRegisteredToolNames } from \"./lib/tool.ts\";\n\n/** Filter types for blockchain events — SubgraphFilter vocabulary. */\nconst FILTERS_REFERENCE = [\n\t{\n\t\ttype: \"stx_transfer\",\n\t\tfields: [\"sender\", \"recipient\", \"minAmount\", \"maxAmount\"],\n\t},\n\t{ type: \"stx_mint\", fields: [\"recipient\", \"minAmount\"] },\n\t{ type: \"stx_burn\", fields: [\"sender\", \"minAmount\"] },\n\t{ type: \"stx_lock\", fields: [\"lockedAddress\", \"minAmount\"] },\n\t{\n\t\ttype: \"ft_transfer\",\n\t\tfields: [\n\t\t\t\"sender\",\n\t\t\t\"recipient\",\n\t\t\t\"assetIdentifier\",\n\t\t\t\"minAmount\",\n\t\t\t\"maxAmount\",\n\t\t],\n\t},\n\t{ type: \"ft_mint\", fields: [\"recipient\", \"assetIdentifier\", \"minAmount\"] },\n\t{ type: \"ft_burn\", fields: [\"sender\", \"assetIdentifier\", \"minAmount\"] },\n\t{\n\t\ttype: \"nft_transfer\",\n\t\tfields: [\"sender\", \"recipient\", \"assetIdentifier\", \"tokenId\"],\n\t},\n\t{ type: \"nft_mint\", fields: [\"recipient\", \"assetIdentifier\", \"tokenId\"] },\n\t{ type: \"nft_burn\", fields: [\"sender\", \"assetIdentifier\", \"tokenId\"] },\n\t{ type: \"contract_call\", fields: [\"contract\", \"function\"] },\n\t{ type: \"contract_deploy\", fields: [\"contract\"] },\n\t{ type: \"print_event\", fields: [\"contract\", \"event\", \"contains\"] },\n];\n\nconst COLUMN_TYPES = [\n\t{\n\t\ttype: \"uint\",\n\t\tsqlType: \"bigint\",\n\t\tdescription: \"Unsigned integer (Clarity uint)\",\n\t},\n\t{\n\t\ttype: \"int\",\n\t\tsqlType: \"bigint\",\n\t\tdescription: \"Signed integer (Clarity int)\",\n\t},\n\t{ type: \"text\", sqlType: \"text\", description: \"UTF-8 string\" },\n\t{\n\t\ttype: \"principal\",\n\t\tsqlType: \"text\",\n\t\tdescription: \"Stacks address (standard or contract)\",\n\t},\n\t{ type: \"bool\", sqlType: \"boolean\", description: \"Boolean value\" },\n\t{ type: \"json\", sqlType: \"jsonb\", description: \"Arbitrary JSON data\" },\n\t{\n\t\toptions: [\"nullable\", \"indexed\", \"search\"],\n\t\tdescription:\n\t\t\t\"Column options: nullable allows NULL, indexed creates a B-tree index, search enables full-text search\",\n\t},\n];\n\n// One-line human blurb per product surface; the tool list for each is\n// generated from the live tool registry (see buildCapabilities) so it can't\n// drift behind the actual surface.\nconst PRODUCT_BLURBS: Record<string, string> = {\n\tdatasets: \"public foundation datasets\",\n\tindex:\n\t\t\"decoded L2 events, contract calls, blocks, transactions, stacking, mempool\",\n\tstreams: \"raw canonical chain event firehose\",\n\tcontracts: \"trait-based contract discovery\",\n\tsubgraphs: \"author/deploy/query custom indexes\",\n\tsubscriptions: \"webhook delivery on subgraph rows or raw chain events\",\n\taccount: \"identity, plan, billing, and API keys\",\n\tscaffold: \"generate typed contract clients from a deployment or ABI\",\n};\n\nconst PRODUCT_ORDER = [\n\t\"datasets\",\n\t\"index\",\n\t\"streams\",\n\t\"contracts\",\n\t\"subgraphs\",\n\t\"subscriptions\",\n\t\"account\",\n\t\"scaffold\",\n];\n\n/**\n * \"What you can do\" overview, generated from the registered tool names so every\n * tool surfaces under its product without a hand-maintained list to fall stale.\n * Tools register (via defineTool) before registerResources runs, so the\n * registry is fully populated by the time a context read calls this.\n */\nexport function buildCapabilities() {\n\tconst byPrefix = new Map<string, string[]>();\n\tfor (const name of getRegisteredToolNames()) {\n\t\tconst prefix = name.slice(0, name.indexOf(\"_\"));\n\t\tconst tools = byPrefix.get(prefix) ?? [];\n\t\ttools.push(name);\n\t\tbyPrefix.set(prefix, tools);\n\t}\n\tconst order = [\n\t\t...PRODUCT_ORDER.filter((p) => byPrefix.has(p)),\n\t\t...[...byPrefix.keys()].filter((p) => !PRODUCT_ORDER.includes(p)),\n\t];\n\tconst products = order.map((p) => {\n\t\tconst tools = byPrefix.get(p) ?? [];\n\t\tconst blurb = PRODUCT_BLURBS[p];\n\t\treturn blurb\n\t\t\t? `${p} — ${blurb} (${tools.join(\", \")})`\n\t\t\t: `${p} (${tools.join(\", \")})`;\n\t});\n\treturn {\n\t\tproducts,\n\t\tdiscoverFirst:\n\t\t\t\"Call datasets_list / contracts_find to learn what exists before querying.\",\n\t};\n}\n\n/** Per-product read-auth tiers — what an agent must know before reading. */\nconst READ_AUTH_TIERS = {\n\tdatasets: \"open — no API key required\",\n\tindex:\n\t\t\"anonymous reads allowed; free-tier API keys are rejected (Build+ required)\",\n\tstreams: \"API key required (SL_API_KEY) — keyless calls return 401\",\n\tsubgraphs: \"reads public during open beta; writes require an API key\",\n};\n\ntype ContextDeps = {\n\tclientProvider: typeof getClient;\n};\n\n/**\n * Assemble the live agent context read at connect: who you are, the live\n * Streams/Index tips, what you own (subgraphs/subscriptions), any in-flight\n * reindex operations, what the agent can do, and the read-auth tiers. The\n * snapshot comes from the SDK's `context()` (shared with non-MCP agents); each\n * field that couldn't be read becomes a sentinel string so the resource never\n * throws and always orients the agent.\n */\nexport async function buildContext(\n\tdeps: ContextDeps = { clientProvider: getClient },\n) {\n\tconst unavailable = \"unavailable: set SL_API_KEY\";\n\tconst orNull = <T>(v: T | null | undefined) => (v == null ? unavailable : v);\n\n\tconst snap = await deps\n\t\t.clientProvider()\n\t\t.context()\n\t\t.catch(() => null);\n\n\treturn {\n\t\tauthState: { apiKeySet: Boolean(process.env.SL_API_KEY) },\n\t\twhatExists: {\n\t\t\taccount: orNull(snap?.account),\n\t\t\tstreamsTip: orNull(snap?.streamsTip),\n\t\t\tindexTip: orNull(snap?.indexTip),\n\t\t\tsubgraphs: snap?.subgraphs\n\t\t\t\t? snap.subgraphs.map(formatSubgraphSummary)\n\t\t\t\t: unavailable,\n\t\t\tsubscriptions: orNull(snap?.subscriptions),\n\t\t\tactiveOperations: orNull(snap?.activeOperations),\n\t\t},\n\t\twhatYouCanDo: buildCapabilities(),\n\t\treadAuthTiers: READ_AUTH_TIERS,\n\t};\n}\n\nexport function registerResources(server: McpServer) {\n\tserver.resource(\n\t\t\"context\",\n\t\t\"secondlayer://context\",\n\t\t{\n\t\t\tdescription:\n\t\t\t\t\"Live agent context — what exists (your subgraphs, subscriptions, account), what you can do, and read-auth tiers. Read this first.\",\n\t\t},\n\t\tasync () => ({\n\t\t\tcontents: [\n\t\t\t\t{\n\t\t\t\t\turi: \"secondlayer://context\",\n\t\t\t\t\tmimeType: \"application/json\",\n\t\t\t\t\ttext: JSON.stringify(await buildContext(), null, 2),\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t);\n\n\tserver.resource(\n\t\t\"filters\",\n\t\t\"secondlayer://filters\",\n\t\t{ description: \"Event filter types and their available fields\" },\n\t\tasync () => ({\n\t\t\tcontents: [\n\t\t\t\t{\n\t\t\t\t\turi: \"secondlayer://filters\",\n\t\t\t\t\tmimeType: \"application/json\",\n\t\t\t\t\ttext: JSON.stringify(FILTERS_REFERENCE, null, 2),\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t);\n\n\tserver.resource(\n\t\t\"column-types\",\n\t\t\"secondlayer://column-types\",\n\t\t{ description: \"Subgraph column types, SQL mappings, and options\" },\n\t\tasync () => ({\n\t\t\tcontents: [\n\t\t\t\t{\n\t\t\t\t\turi: \"secondlayer://column-types\",\n\t\t\t\t\tmimeType: \"application/json\",\n\t\t\t\t\ttext: JSON.stringify(COLUMN_TYPES, null, 2),\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t);\n}\n",
|
|
11
|
+
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod/v4\";\nimport { apiRequest, getClient } from \"../lib/client.ts\";\nimport { jsonResponse } from \"../lib/format.ts\";\nimport { defineTool } from \"../lib/tool.ts\";\n\nexport function registerAccountTools(server: McpServer) {\n\tdefineTool<Record<string, never>>(\n\t\tserver,\n\t\t\"account_whoami\",\n\t\t\"Show the authenticated account's email and plan.\",\n\t\t{},\n\t\tasync () => {\n\t\t\tconst result = await apiRequest<{ email: string; plan: string }>(\n\t\t\t\t\"GET\",\n\t\t\t\t\"/api/accounts/me\",\n\t\t\t);\n\t\t\treturn jsonResponse(result);\n\t\t},\n\t);\n\n\tdefineTool<{ displayName?: string; bio?: string; slug?: string }>(\n\t\tserver,\n\t\t\"account_update\",\n\t\t\"Update the authenticated account's profile. Requires an API key.\",\n\t\t{\n\t\t\tdisplayName: z.string().optional().describe(\"Display name\"),\n\t\t\tbio: z.string().optional().describe(\"Profile bio\"),\n\t\t\tslug: z.string().optional().describe(\"Account URL slug\"),\n\t\t},\n\t\tasync ({ displayName, bio, slug }) => {\n\t\t\tconst body: Record<string, string> = {};\n\t\t\tif (displayName !== undefined) body.display_name = displayName;\n\t\t\tif (bio !== undefined) body.bio = bio;\n\t\t\tif (slug !== undefined) body.slug = slug;\n\t\t\tconst result = await apiRequest(\"PATCH\", \"/api/accounts/me\", body);\n\t\t\treturn jsonResponse(result);\n\t\t},\n\t);\n\n\tdefineTool<Record<string, never>>(\n\t\tserver,\n\t\t\"account_billing\",\n\t\t\"Show the account's plan and subscription/billing status. Requires an API key.\",\n\t\t{},\n\t\tasync () => {\n\t\t\tconst result = await apiRequest(\"GET\", \"/api/billing/status\");\n\t\t\treturn jsonResponse(result);\n\t\t},\n\t);\n\n\tdefineTool<{ product?: \"streams\" | \"index\"; name?: string }>(\n\t\tserver,\n\t\t\"account_create_key\",\n\t\t\"Mint a scoped streams/index read API key so the agent can self-provision access. Requires an account-level (owner) API key. The returned `key` is shown ONCE — forward it to the user to set as SL_API_KEY.\",\n\t\t{\n\t\t\tproduct: z\n\t\t\t\t.enum([\"streams\", \"index\"])\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Key scope (default streams)\"),\n\t\t\tname: z.string().optional().describe(\"Optional label for the key\"),\n\t\t},\n\t\tasync ({ product, name }) =>\n\t\t\tjsonResponse(await getClient().apiKeys.create({ product, name })),\n\t);\n}\n",
|
|
12
12
|
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod/v4\";\nimport { getClient } from \"../lib/client.ts\";\nimport { jsonResponse } from \"../lib/format.ts\";\nimport { defineTool } from \"../lib/tool.ts\";\n\ntype ClientProvider = typeof getClient;\n\nexport function registerContractTools(\n\tserver: McpServer,\n\tclientProvider: ClientProvider = getClient,\n) {\n\tdefineTool<{\n\t\ttrait: string;\n\t\tconformance?: \"declared\" | \"inferred\" | \"any\";\n\t\tinclude?: \"abi\";\n\t\tlimit?: number;\n\t\tcursor?: string;\n\t}>(\n\t\tserver,\n\t\t\"contracts_find\",\n\t\t'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.',\n\t\t{\n\t\t\ttrait: z.string().describe('Required. Trait to match (e.g. \"sip-010\").'),\n\t\t\tconformance: z\n\t\t\t\t.enum([\"declared\", \"inferred\", \"any\"])\n\t\t\t\t.optional()\n\t\t\t\t.describe(\n\t\t\t\t\t\"declared = parsed from source, inferred = ABI shape-match, any = either (default)\",\n\t\t\t\t),\n\t\t\tinclude: z\n\t\t\t\t.literal(\"abi\")\n\t\t\t\t.optional()\n\t\t\t\t.describe('Set to \"abi\" to include each contract\\'s full ABI'),\n\t\t\tlimit: z.number().optional().describe(\"Page size, 1–500 (default 100)\"),\n\t\t\tcursor: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Opaque cursor from a prior response's next_cursor\"),\n\t\t},\n\t\tasync (params) =>\n\t\t\tjsonResponse(await clientProvider().contracts.list(params)),\n\t);\n}\n",
|
|
13
13
|
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod/v4\";\nimport { getClient } from \"../lib/client.ts\";\nimport { jsonResponse } from \"../lib/format.ts\";\nimport { defineTool } from \"../lib/tool.ts\";\n\ntype ClientProvider = typeof getClient;\n\nexport function registerDatasetTools(\n\tserver: McpServer,\n\tclientProvider: ClientProvider = getClient,\n) {\n\tdefineTool<Record<string, never>>(\n\t\tserver,\n\t\t\"datasets_list\",\n\t\t\"List the Foundation Datasets catalog with freshness — the discovery endpoint for what dataset slugs exist and how current each is. Reads are public.\",\n\t\t{},\n\t\tasync () => {\n\t\t\tconst catalog = await clientProvider().datasets.listDatasets();\n\t\t\treturn jsonResponse(catalog);\n\t\t},\n\t);\n\n\tdefineTool<{\n\t\tslug: string;\n\t\tfilters?: Record<string, string>;\n\t\tlimit?: number;\n\t\tcursor?: string;\n\t}>(\n\t\tserver,\n\t\t\"datasets_query\",\n\t\t'Query a cursor-paginated Foundation Dataset by slug (e.g. \"stx-transfers\", \"sbtc/events\", \"pox-4/calls\", \"bns/events\"). Filters are passed through as documented query params (e.g. {\"sender\": \"SP...\", \"from_block\": \"150000\"}). Returns { rows, next_cursor, tip }. Call datasets_list first to discover slugs.',\n\t\t{\n\t\t\tslug: z\n\t\t\t\t.string()\n\t\t\t\t.describe(\"Dataset slug from datasets_list (e.g. stx-transfers)\"),\n\t\t\tfilters: z\n\t\t\t\t.record(z.string(), z.string())\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Documented per-dataset query params (snake_case values)\"),\n\t\t\tlimit: z.number().optional().describe(\"Max rows for this page\"),\n\t\t\tcursor: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Opaque cursor from a prior response's next_cursor\"),\n\t\t},\n\t\tasync ({ slug, filters, limit, cursor }) => {\n\t\t\tconst params: Record<string, unknown> = { ...(filters ?? {}) };\n\t\t\tif (limit !== undefined) params.limit = limit;\n\t\t\tif (cursor !== undefined) params.cursor = cursor;\n\t\t\tconst result = await clientProvider().datasets.query(slug, params);\n\t\t\treturn jsonResponse(result);\n\t\t},\n\t);\n}\n",
|
|
14
|
-
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod/v4\";\nimport { getClient } from \"../lib/client.ts\";\nimport { jsonResponse } from \"../lib/format.ts\";\nimport { defineTool } from \"../lib/tool.ts\";\n\ntype ClientProvider = typeof getClient;\n\nconst INDEX_EVENT_TYPES =
|
|
14
|
+
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { DECODED_EVENT_TYPES } from \"@secondlayer/shared\";\nimport { z } from \"zod/v4\";\nimport { getClient } from \"../lib/client.ts\";\nimport { jsonResponse } from \"../lib/format.ts\";\nimport { defineTool } from \"../lib/tool.ts\";\n\ntype ClientProvider = typeof getClient;\n\nconst INDEX_EVENT_TYPES = DECODED_EVENT_TYPES;\n\n/** Filters shared by the height/cursor-paginated Index endpoints. */\nconst rangeFilters = {\n\tcontractId: z.string().optional().describe(\"Filter by contract id\"),\n\tfromHeight: z.number().optional().describe(\"Start block height (inclusive)\"),\n\ttoHeight: z.number().optional().describe(\"End block height (inclusive)\"),\n\tcursor: z\n\t\t.string()\n\t\t.optional()\n\t\t.describe(\"Opaque cursor from a prior response's next_cursor\"),\n\tlimit: z.number().optional().describe(\"Max rows for this page\"),\n};\n\n/** Height-range subset for endpoints that don't filter by contract (canonical, blocks). */\nconst heightFilters = {\n\tfromHeight: rangeFilters.fromHeight,\n\ttoHeight: rangeFilters.toHeight,\n\tcursor: rangeFilters.cursor,\n\tlimit: rangeFilters.limit,\n};\n\n/** SDK get(...) resolves null on 404; surface that as a structured not_found. */\nconst notFound = (message: string) =>\n\tjsonResponse({ error: { type: \"not_found\", status: 404, message } }, true);\n\nexport function registerIndexTools(\n\tserver: McpServer,\n\tclientProvider: ClientProvider = getClient,\n) {\n\tdefineTool<{\n\t\tcontractId?: string;\n\t\tsender?: string;\n\t\trecipient?: string;\n\t\tfromHeight?: number;\n\t\ttoHeight?: number;\n\t\tcursor?: string;\n\t\tlimit?: number;\n\t}>(\n\t\tserver,\n\t\t\"index_ft_transfers\",\n\t\t\"List decoded SIP-010 fungible-token transfers from the Index (L2 decoded layer). Anonymous reads allowed (free-tier API keys are rejected — Build+ required).\",\n\t\t{\n\t\t\t...rangeFilters,\n\t\t\tsender: z.string().optional().describe(\"Filter by sender principal\"),\n\t\t\trecipient: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Filter by recipient principal\"),\n\t\t},\n\t\tasync (params) =>\n\t\t\tjsonResponse(await clientProvider().index.ftTransfers.list(params)),\n\t);\n\n\tdefineTool<{\n\t\tcontractId?: string;\n\t\tsender?: string;\n\t\trecipient?: string;\n\t\tassetIdentifier?: string;\n\t\tfromHeight?: number;\n\t\ttoHeight?: number;\n\t\tcursor?: string;\n\t\tlimit?: number;\n\t}>(\n\t\tserver,\n\t\t\"index_nft_transfers\",\n\t\t\"List decoded SIP-009 non-fungible-token transfers from the Index. Anonymous reads allowed (free-tier keys rejected).\",\n\t\t{\n\t\t\t...rangeFilters,\n\t\t\tsender: z.string().optional().describe(\"Filter by sender principal\"),\n\t\t\trecipient: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Filter by recipient principal\"),\n\t\t\tassetIdentifier: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Filter by asset identifier (contract::asset)\"),\n\t\t},\n\t\tasync (params) =>\n\t\t\tjsonResponse(await clientProvider().index.nftTransfers.list(params)),\n\t);\n\n\tdefineTool<{\n\t\teventType: (typeof INDEX_EVENT_TYPES)[number];\n\t\tcontractId?: string;\n\t\tsender?: string;\n\t\trecipient?: string;\n\t\tassetIdentifier?: string;\n\t\tfromHeight?: number;\n\t\ttoHeight?: number;\n\t\tcursor?: string;\n\t\tlimit?: number;\n\t}>(\n\t\tserver,\n\t\t\"index_events\",\n\t\t\"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). For ft/nft transfers prefer index_ft_transfers / index_nft_transfers.\",\n\t\t{\n\t\t\teventType: z\n\t\t\t\t.enum(INDEX_EVENT_TYPES)\n\t\t\t\t.describe(\"Required. Decoded event type to list.\"),\n\t\t\t...rangeFilters,\n\t\t\tsender: z.string().optional().describe(\"Filter by sender principal\"),\n\t\t\trecipient: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Filter by recipient principal\"),\n\t\t\tassetIdentifier: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Filter by asset identifier where applicable\"),\n\t\t},\n\t\tasync (params) =>\n\t\t\tjsonResponse(await clientProvider().index.events.list(params)),\n\t);\n\n\tdefineTool<{\n\t\tcontractId?: string;\n\t\tfunctionName?: string;\n\t\tsender?: string;\n\t\tfromHeight?: number;\n\t\ttoHeight?: number;\n\t\tcursor?: string;\n\t\tlimit?: number;\n\t}>(\n\t\tserver,\n\t\t\"index_contract_calls\",\n\t\t\"List decoded contract calls from the Index (function name, args, result). Note: contract-call cursors are a SEPARATE keyspace from event cursors — they are not interchangeable.\",\n\t\t{\n\t\t\t...rangeFilters,\n\t\t\tfunctionName: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Filter by called function name\"),\n\t\t\tsender: z.string().optional().describe(\"Filter by caller principal\"),\n\t\t},\n\t\tasync (params) =>\n\t\t\tjsonResponse(await clientProvider().index.contractCalls.list(params)),\n\t);\n\n\tdefineTool<{\n\t\tfromHeight?: number;\n\t\ttoHeight?: number;\n\t\tcursor?: string;\n\t\tlimit?: number;\n\t}>(\n\t\tserver,\n\t\t\"index_canonical\",\n\t\t\"List the canonical Stacks block sequence from the Index (height + hash). Anonymous reads allowed (free-tier keys rejected).\",\n\t\t{ ...heightFilters },\n\t\tasync (params) =>\n\t\t\tjsonResponse(await clientProvider().index.canonical.list(params)),\n\t);\n\n\tdefineTool<{\n\t\tfromHeight?: number;\n\t\ttoHeight?: number;\n\t\tcursor?: string;\n\t\tlimit?: number;\n\t}>(\n\t\tserver,\n\t\t\"index_blocks\",\n\t\t\"List decoded blocks from the Index. Anonymous reads allowed (free-tier keys rejected).\",\n\t\t{ ...heightFilters },\n\t\tasync (params) =>\n\t\t\tjsonResponse(await clientProvider().index.blocks.list(params)),\n\t);\n\n\tdefineTool<{ ref: string }>(\n\t\tserver,\n\t\t\"index_block\",\n\t\t\"Get a single block from the Index by height or block hash. Returns not_found if unknown.\",\n\t\t{\n\t\t\tref: z\n\t\t\t\t.string()\n\t\t\t\t.describe(\"Block height (digits) or block hash (0x… string)\"),\n\t\t},\n\t\tasync ({ ref }) => {\n\t\t\tconst block = await clientProvider().index.blocks.get(\n\t\t\t\t/^\\d+$/.test(ref) ? Number(ref) : ref,\n\t\t\t);\n\t\t\treturn block ? jsonResponse(block) : notFound(`No block for ref ${ref}`);\n\t\t},\n\t);\n\n\tdefineTool<{\n\t\ttype?: string;\n\t\tsender?: string;\n\t\tcontractId?: string;\n\t\tfromHeight?: number;\n\t\ttoHeight?: number;\n\t\tcursor?: string;\n\t\tlimit?: number;\n\t}>(\n\t\tserver,\n\t\t\"index_transactions\",\n\t\t\"List decoded transactions from the Index. Filter by type, sender, or contract. Anonymous reads allowed (free-tier keys rejected).\",\n\t\t{\n\t\t\t...rangeFilters,\n\t\t\ttype: z.string().optional().describe(\"Filter by transaction type\"),\n\t\t\tsender: z.string().optional().describe(\"Filter by sender principal\"),\n\t\t},\n\t\tasync (params) =>\n\t\t\tjsonResponse(await clientProvider().index.transactions.list(params)),\n\t);\n\n\tdefineTool<{ txId: string }>(\n\t\tserver,\n\t\t\"index_transaction\",\n\t\t\"Get a single transaction from the Index by tx_id. Returns not_found if unknown.\",\n\t\t{ txId: z.string().describe(\"Transaction id (0x… hash)\") },\n\t\tasync ({ txId }) => {\n\t\t\tconst tx = await clientProvider().index.transactions.get(txId);\n\t\t\treturn tx ? jsonResponse(tx) : notFound(`No transaction for ${txId}`);\n\t\t},\n\t);\n\n\tdefineTool<{\n\t\tfunctionName?: string;\n\t\tstacker?: string;\n\t\tcaller?: string;\n\t\tfromHeight?: number;\n\t\ttoHeight?: number;\n\t\tcursor?: string;\n\t\tlimit?: number;\n\t}>(\n\t\tserver,\n\t\t\"index_stacking\",\n\t\t\"List decoded PoX-4 stacking actions from the Index (stack-stx, delegate-stx, etc.). Anonymous reads allowed (free-tier keys rejected).\",\n\t\t{\n\t\t\t...heightFilters,\n\t\t\tfunctionName: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Filter by PoX function name\"),\n\t\t\tstacker: z.string().optional().describe(\"Filter by stacker principal\"),\n\t\t\tcaller: z.string().optional().describe(\"Filter by caller principal\"),\n\t\t},\n\t\tasync (params) =>\n\t\t\tjsonResponse(await clientProvider().index.stacking.list(params)),\n\t);\n\n\tdefineTool<{\n\t\tsender?: string;\n\t\ttype?: string;\n\t\tcontractId?: string;\n\t\tcursor?: string;\n\t\tlimit?: number;\n\t}>(\n\t\tserver,\n\t\t\"index_mempool\",\n\t\t\"List pending (unconfirmed) transactions from the Index mempool. Sequence-cursor paginated (no height range). Anonymous reads allowed (free-tier keys rejected).\",\n\t\t{\n\t\t\tsender: z.string().optional().describe(\"Filter by sender principal\"),\n\t\t\ttype: z.string().optional().describe(\"Filter by transaction type\"),\n\t\t\tcontractId: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Filter to pending calls to a single contract\"),\n\t\t\tcursor: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Opaque cursor from a prior response's next_cursor\"),\n\t\t\tlimit: z.number().optional().describe(\"Max rows for this page\"),\n\t\t},\n\t\tasync (params) =>\n\t\t\tjsonResponse(await clientProvider().index.mempool.list(params)),\n\t);\n\n\tdefineTool<{ txId: string }>(\n\t\tserver,\n\t\t\"index_mempool_tx\",\n\t\t\"Get a single pending transaction from the Index mempool by tx_id. Returns not_found once it is mined or dropped.\",\n\t\t{ txId: z.string().describe(\"Transaction id (0x… hash)\") },\n\t\tasync ({ txId }) => {\n\t\t\tconst tx = await clientProvider().index.mempool.get(txId);\n\t\t\treturn tx ? jsonResponse(tx) : notFound(`No pending tx for ${txId}`);\n\t\t},\n\t);\n\n\tdefineTool<Record<string, never>>(\n\t\tserver,\n\t\t\"index_usage\",\n\t\t\"Your own Index consumption (decoded events today + this month) and tier limits. Requires a Build+ API key (anonymous reads can't report usage).\",\n\t\t{},\n\t\tasync () => jsonResponse(await clientProvider().index.usage()),\n\t);\n}\n",
|
|
15
15
|
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { generateSubgraphCode } from \"@secondlayer/scaffold\";\nimport type { AbiFunction, AbiMap } from \"@secondlayer/scaffold\";\nimport { z } from \"zod/v4\";\nimport { defineTool } from \"../lib/tool.ts\";\n\nconst API_BASE =\n\tprocess.env.SECONDLAYER_API_URL || \"https://api.secondlayer.tools\";\n\nasync function fetchAbi(\n\tcontractId: string,\n): Promise<{ functions: AbiFunction[]; maps: AbiMap[] }> {\n\tconst res = await fetch(`${API_BASE}/api/node/contracts/${contractId}/abi`, {\n\t\tsignal: AbortSignal.timeout(10_000),\n\t});\n\tif (!res.ok) {\n\t\tif (res.status === 404)\n\t\t\tthrow new Error(`Contract not found: ${contractId}`);\n\t\tthrow new Error(`Failed to fetch ABI: HTTP ${res.status}`);\n\t}\n\tconst abi = (await res.json()) as {\n\t\tfunctions?: AbiFunction[];\n\t\tmaps?: AbiMap[];\n\t};\n\treturn {\n\t\tfunctions: abi.functions ?? [],\n\t\tmaps: abi.maps ?? [],\n\t};\n}\n\nexport function registerScaffoldTools(server: McpServer) {\n\tdefineTool<{ contractId: string; subgraphName?: string }>(\n\t\tserver,\n\t\t\"scaffold_from_contract\",\n\t\t\"Generate a subgraph scaffold from a deployed Stacks contract. Fetches the ABI automatically.\",\n\t\t{\n\t\t\tcontractId: z\n\t\t\t\t.string()\n\t\t\t\t.describe(\n\t\t\t\t\t\"Fully qualified contract ID (e.g. SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.amm-pool-v2-01)\",\n\t\t\t\t),\n\t\t\tsubgraphName: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Override the subgraph name (defaults to contract name)\"),\n\t\t},\n\t\tasync ({ contractId, subgraphName }) => {\n\t\t\tconst { functions, maps } = await fetchAbi(contractId);\n\t\t\tconst code = generateSubgraphCode(\n\t\t\t\tcontractId,\n\t\t\t\tfunctions,\n\t\t\t\tsubgraphName,\n\t\t\t\tmaps,\n\t\t\t);\n\t\t\treturn { content: [{ type: \"text\", text: code }] };\n\t\t},\n\t);\n\n\tdefineTool<{ abi: string; contractId: string; subgraphName?: string }>(\n\t\tserver,\n\t\t\"scaffold_from_abi\",\n\t\t\"Generate a subgraph scaffold from a provided ABI JSON. Use when you already have the ABI.\",\n\t\t{\n\t\t\tabi: z\n\t\t\t\t.string()\n\t\t\t\t.describe(\"ABI JSON string (the full contract ABI object)\"),\n\t\t\tcontractId: z.string().describe(\"Fully qualified contract ID\"),\n\t\t\tsubgraphName: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Override the subgraph name\"),\n\t\t},\n\t\tasync ({ abi, contractId, subgraphName }) => {\n\t\t\tlet parsed: { functions?: AbiFunction[]; maps?: AbiMap[] };\n\t\t\ttry {\n\t\t\t\tparsed = JSON.parse(abi);\n\t\t\t} catch {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\", text: \"Invalid ABI JSON\" }],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst code = generateSubgraphCode(\n\t\t\t\tcontractId,\n\t\t\t\tparsed.functions ?? [],\n\t\t\t\tsubgraphName,\n\t\t\t\tparsed.maps ?? [],\n\t\t\t);\n\t\t\treturn { content: [{ type: \"text\", text: code }] };\n\t\t},\n\t);\n}\n",
|
|
16
|
-
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { AuthError } from \"@secondlayer/sdk\";\nimport { z } from \"zod/v4\";\nimport { getClient, keyHint } from \"../lib/client.ts\";\nimport { jsonResponse } from \"../lib/format.ts\";\nimport { defineTool } from \"../lib/tool.ts\";\n\ntype ClientProvider = typeof getClient;\n\nconst STREAMS_EVENT_TYPES =
|
|
17
|
-
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { bundleSubgraphCode } from \"@secondlayer/bundler\";\nimport { z } from \"zod/v4\";\nimport { getClient } from \"../lib/client.ts\";\nimport { formatSubgraphSummary, withCap } from \"../lib/format.ts\";\nimport { defineTool } from \"../lib/tool.ts\";\n\ntype SubgraphClientProvider = typeof getClient;\n\nexport function registerSubgraphTools(\n\tserver: McpServer,\n\tclientProvider: SubgraphClientProvider = getClient,\n) {\n\tdefineTool<Record<string, never>>(\n\t\tserver,\n\t\t\"subgraphs_list\",\n\t\t\"List all deployed subgraphs. Returns summary fields only.\",\n\t\t{},\n\t\tasync () => {\n\t\t\tconst { data } = await clientProvider().subgraphs.list();\n\t\t\treturn {\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: JSON.stringify(data.map(formatSubgraphSummary), null, 2),\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ name: string }>(\n\t\tserver,\n\t\t\"subgraphs_get\",\n\t\t\"Get full details of a subgraph including schema, health, and table columns.\",\n\t\t{ name: z.string().describe(\"Subgraph name\") },\n\t\tasync ({ name }) => {\n\t\t\tconst detail = await clientProvider().subgraphs.get(name);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(detail, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{\n\t\tname: string;\n\t\tformat?: \"agent\" | \"openapi\" | \"markdown\";\n\t\tserverUrl?: string;\n\t}>(\n\t\tserver,\n\t\t\"subgraphs_spec\",\n\t\t\"Get generated API documentation for a subgraph. Defaults to compact agent schema; supports OpenAPI JSON and Markdown.\",\n\t\t{\n\t\t\tname: z.string().describe(\"Subgraph name\"),\n\t\t\tformat: z\n\t\t\t\t.enum([\"agent\", \"openapi\", \"markdown\"])\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Spec format to return. Defaults to agent.\"),\n\t\t\tserverUrl: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Override the server URL embedded in generated docs.\"),\n\t\t},\n\t\tasync ({ name, format = \"agent\", serverUrl }) => {\n\t\t\tconst options = serverUrl ? { serverUrl } : undefined;\n\t\t\tconst spec =\n\t\t\t\tformat === \"openapi\"\n\t\t\t\t\t? await clientProvider().subgraphs.openapi(name, options)\n\t\t\t\t\t: format === \"markdown\"\n\t\t\t\t\t\t? await clientProvider().subgraphs.markdown(name, options)\n\t\t\t\t\t\t: await clientProvider().subgraphs.schema(name, options);\n\t\t\treturn {\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext:\n\t\t\t\t\t\t\ttypeof spec === \"string\" ? spec : JSON.stringify(spec, null, 2),\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{\n\t\tname: string;\n\t\ttable: string;\n\t\tfilters?: Record<string, string>;\n\t\tsort?: string;\n\t\torder?: string;\n\t\tlimit?: number;\n\t\toffset?: number;\n\t\tfields?: string;\n\t\tcount?: boolean;\n\t}>(\n\t\tserver,\n\t\t\"subgraphs_query\",\n\t\t'Query rows from a subgraph table (max 200 rows). Filters support operators: \"amount.gte\": \"1000\", \"sender.neq\": \"SP...\", \"name.like\": \"%token%\". Available operators: eq, neq, gt, gte, lt, lte, like.',\n\t\t{\n\t\t\tname: z.string().describe(\"Subgraph name\"),\n\t\t\ttable: z.string().describe(\"Table name\"),\n\t\t\tfilters: z\n\t\t\t\t.record(z.string(), z.string())\n\t\t\t\t.optional()\n\t\t\t\t.describe(\n\t\t\t\t\t'Column filters — plain values or with operators (e.g. {\"amount.gte\": \"1000\", \"sender\": \"SP...\"})',\n\t\t\t\t),\n\t\t\tsort: z.string().optional().describe(\"Column to sort by\"),\n\t\t\torder: z.enum([\"asc\", \"desc\"]).optional().describe(\"Sort order\"),\n\t\t\tlimit: z\n\t\t\t\t.number()\n\t\t\t\t.max(200)\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Max rows (default 50, max 200)\"),\n\t\t\toffset: z.number().optional().describe(\"Offset for pagination\"),\n\t\t\tfields: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\n\t\t\t\t\t'Comma-separated column list to return (e.g. \"sender,amount\")',\n\t\t\t\t),\n\t\t\tcount: z\n\t\t\t\t.boolean()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"If true, return row count instead of rows\"),\n\t\t},\n\t\tasync ({\n\t\t\tname,\n\t\t\ttable,\n\t\t\tfilters,\n\t\t\tsort,\n\t\t\torder,\n\t\t\tlimit,\n\t\t\toffset,\n\t\t\tfields,\n\t\t\tcount,\n\t\t}) => {\n\t\t\tif (count) {\n\t\t\t\tconst result = await clientProvider().subgraphs.queryTableCount(\n\t\t\t\t\tname,\n\t\t\t\t\ttable,\n\t\t\t\t\t{ filters, sort, order },\n\t\t\t\t);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(result, null, 2) }],\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst rows = await clientProvider().subgraphs.queryTable(name, table, {\n\t\t\t\tfilters,\n\t\t\t\tsort,\n\t\t\t\torder,\n\t\t\t\tlimit: limit ?? 50,\n\t\t\t\toffset,\n\t\t\t\tfields,\n\t\t\t});\n\t\t\tconst cap = limit ?? 50;\n\t\t\tconst result = withCap(\n\t\t\t\trows as Record<string, unknown>[],\n\t\t\t\tcap > 200 ? 200 : cap,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(result, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ name: string; fromBlock?: number; toBlock?: number }>(\n\t\tserver,\n\t\t\"subgraphs_reindex\",\n\t\t\"Reindex a subgraph from a specific block range.\",\n\t\t{\n\t\t\tname: z.string().describe(\"Subgraph name\"),\n\t\t\tfromBlock: z\n\t\t\t\t.number()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Start block (defaults to beginning)\"),\n\t\t\ttoBlock: z.number().optional().describe(\"End block (defaults to latest)\"),\n\t\t},\n\t\tasync ({ name, fromBlock, toBlock }) => {\n\t\t\tconst result = await clientProvider().subgraphs.reindex(name, {\n\t\t\t\tfromBlock,\n\t\t\t\ttoBlock,\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(result, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ name: string }>(\n\t\tserver,\n\t\t\"subgraphs_delete\",\n\t\t\"Delete a subgraph permanently.\",\n\t\t{ name: z.string().describe(\"Subgraph name\") },\n\t\tasync ({ name }) => {\n\t\t\tconst result = await clientProvider().subgraphs.delete(name);\n\t\t\treturn { content: [{ type: \"text\", text: result.message }] };\n\t\t},\n\t);\n\n\tdefineTool<{ code: string; startBlock?: number }>(\n\t\tserver,\n\t\t\"subgraphs_deploy\",\n\t\t\"Deploy a subgraph from TypeScript code. Pass the full defineSubgraph() source — it will be bundled, validated, and deployed. Optional startBlock overrides the source definition for this deploy. Call `subgraphs_reindex` separately if you need a forced reindex.\",\n\t\t{\n\t\t\tcode: z\n\t\t\t\t.string()\n\t\t\t\t.describe(\"TypeScript source code containing a defineSubgraph() call\"),\n\t\t\tstartBlock: z\n\t\t\t\t.number()\n\t\t\t\t.int()\n\t\t\t\t.nonnegative()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Override the definition startBlock for this deploy\"),\n\t\t},\n\t\tasync ({ code, startBlock }) => {\n\t\t\tconst bundled = await bundleSubgraphCode(code);\n\t\t\tconst result = await clientProvider().subgraphs.deploy({\n\t\t\t\tname: bundled.name,\n\t\t\t\tversion: bundled.version,\n\t\t\t\tdescription: bundled.description,\n\t\t\t\tsources: bundled.sources,\n\t\t\t\tschema: bundled.schema,\n\t\t\t\thandlerCode: bundled.handlerCode,\n\t\t\t\tsourceCode: code,\n\t\t\t\t...(startBlock !== undefined ? { startBlock } : {}),\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(result, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ name: string }>(\n\t\tserver,\n\t\t\"subgraphs_read_source\",\n\t\t\"Fetch the deployed TypeScript source of a subgraph (plus its stored version). Returns a readOnly payload for subgraphs deployed before source capture — in that case the caller should redeploy via CLI before editing.\",\n\t\t{ name: z.string().describe(\"Subgraph name\") },\n\t\tasync ({ name }) => {\n\t\t\tconst source = await clientProvider().subgraphs.getSource(name);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(source, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n}\n",
|
|
18
|
-
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type {\n\tChainTrigger,\n\tCreateSubscriptionRequest,\n\tUpdateSubscriptionRequest,\n} from \"@secondlayer/sdk\";\nimport { z } from \"zod/v4\";\nimport { getClient } from \"../lib/client.ts\";\nimport { defineTool } from \"../lib/tool.ts\";\n\ntype SubscriptionClientProvider = typeof getClient;\n\n/**\n * Subscription MCP tools — let agents list, configure, test, and replay\n * subgraph event subscriptions. Mirrors the HTTP API 1:1; structured\n * errors bubble through the SDK's ApiError.\n */\nexport function registerSubscriptionTools(\n\tserver: McpServer,\n\tclientProvider: SubscriptionClientProvider = getClient,\n) {\n\tdefineTool<Record<string, never>>(\n\t\tserver,\n\t\t\"subscriptions_list\",\n\t\t\"List all subscriptions for the current account. Returns summary fields (no secrets).\",\n\t\t{},\n\t\tasync () => {\n\t\t\tconst { data } = await clientProvider().subscriptions.list();\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(data, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_get\",\n\t\t\"Get full detail for a subscription (filter, auth, retry config, circuit state).\",\n\t\t{ id: z.string().describe(\"Subscription id\") },\n\t\tasync ({ id }) => {\n\t\t\tconst detail = await clientProvider().subscriptions.get(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(detail, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{\n\t\tname: string;\n\t\tsubgraphName?: string;\n\t\ttableName?: string;\n\t\ttriggers?: ChainTrigger[];\n\t\turl: string;\n\t\tformat?:\n\t\t\t| \"standard-webhooks\"\n\t\t\t| \"inngest\"\n\t\t\t| \"trigger\"\n\t\t\t| \"cloudflare\"\n\t\t\t| \"cloudevents\"\n\t\t\t| \"raw\";\n\t\truntime?: \"inngest\" | \"trigger\" | \"cloudflare\" | \"node\";\n\t\tfilter?: Record<string, unknown>;\n\t}>(\n\t\tserver,\n\t\t\"subscriptions_create\",\n\t\t\"Create a subscription. Two kinds (mutually exclusive): a SUBGRAPH subscription fires on a subgraph table's rows (set subgraphName + tableName + optional filter); a CHAIN subscription fires on raw chain events with no subgraph (set triggers). Returns `signingSecret` ONCE — forward it to the user so they can wire it into their receiver.\",\n\t\t{\n\t\t\tname: z.string().describe(\"Human-readable name, unique per account\"),\n\t\t\tsubgraphName: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Subgraph to subscribe to (subgraph subscription)\"),\n\t\t\ttableName: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Table within the subgraph (subgraph subscription)\"),\n\t\t\ttriggers: z\n\t\t\t\t.array(\n\t\t\t\t\tz.object({\n\t\t\t\t\t\ttype: z.enum([\n\t\t\t\t\t\t\t\"stx_transfer\",\n\t\t\t\t\t\t\t\"stx_mint\",\n\t\t\t\t\t\t\t\"stx_burn\",\n\t\t\t\t\t\t\t\"stx_lock\",\n\t\t\t\t\t\t\t\"ft_transfer\",\n\t\t\t\t\t\t\t\"ft_mint\",\n\t\t\t\t\t\t\t\"ft_burn\",\n\t\t\t\t\t\t\t\"nft_transfer\",\n\t\t\t\t\t\t\t\"nft_mint\",\n\t\t\t\t\t\t\t\"nft_burn\",\n\t\t\t\t\t\t\t\"contract_call\",\n\t\t\t\t\t\t\t\"contract_deploy\",\n\t\t\t\t\t\t\t\"print_event\",\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcontractId: z.string().optional(),\n\t\t\t\t\t\tfunctionName: z.string().optional(),\n\t\t\t\t\t\tcaller: z.string().optional(),\n\t\t\t\t\t\tsender: z.string().optional(),\n\t\t\t\t\t\trecipient: z.string().optional(),\n\t\t\t\t\t\tassetIdentifier: z.string().optional(),\n\t\t\t\t\t\tdeployer: z.string().optional(),\n\t\t\t\t\t\tcontractName: z.string().optional(),\n\t\t\t\t\t\ttopic: z.string().optional(),\n\t\t\t\t\t\tlockedAddress: z.string().optional(),\n\t\t\t\t\t\ttrait: z.string().optional(),\n\t\t\t\t\t\tminAmount: z.union([z.string(), z.number()]).optional(),\n\t\t\t\t\t\tmaxAmount: z.union([z.string(), z.number()]).optional(),\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t.optional()\n\t\t\t\t.describe(\n\t\t\t\t\t\"Chain triggers (chain subscription) — provide INSTEAD of subgraphName/tableName. Each targets a raw chain event/tx; string fields accept `*` wildcards, `trait` scopes to a SIP/trait. Forward-looking: starts at chain tip, no backfill.\",\n\t\t\t\t),\n\t\t\turl: z.string().describe(\"Webhook URL\"),\n\t\t\tformat: z\n\t\t\t\t.enum([\n\t\t\t\t\t\"standard-webhooks\",\n\t\t\t\t\t\"inngest\",\n\t\t\t\t\t\"trigger\",\n\t\t\t\t\t\"cloudflare\",\n\t\t\t\t\t\"cloudevents\",\n\t\t\t\t\t\"raw\",\n\t\t\t\t])\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Wire format (default standard-webhooks)\"),\n\t\t\truntime: z\n\t\t\t\t.enum([\"inngest\", \"trigger\", \"cloudflare\", \"node\"])\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Receiver runtime label (display only)\"),\n\t\t\tfilter: z\n\t\t\t\t.record(z.string(), z.unknown())\n\t\t\t\t.optional()\n\t\t\t\t.describe(\n\t\t\t\t\t'Scalar filter DSL, e.g. {\"amount\": {\"gte\": 100}, \"sender\": \"SP...\"}',\n\t\t\t\t),\n\t\t},\n\t\tasync (input) => {\n\t\t\tconst res = await clientProvider().subscriptions.create(\n\t\t\t\tinput as CreateSubscriptionRequest,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{\n\t\tid: string;\n\t\turl?: string;\n\t\tfilter?: Record<string, unknown>;\n\t\tformat?:\n\t\t\t| \"standard-webhooks\"\n\t\t\t| \"inngest\"\n\t\t\t| \"trigger\"\n\t\t\t| \"cloudflare\"\n\t\t\t| \"cloudevents\"\n\t\t\t| \"raw\";\n\t\truntime?: \"inngest\" | \"trigger\" | \"cloudflare\" | \"node\" | null;\n\t\tmaxRetries?: number;\n\t\ttimeoutMs?: number;\n\t\tconcurrency?: number;\n\t}>(\n\t\tserver,\n\t\t\"subscriptions_update\",\n\t\t\"Patch a subscription (url, filter, format, runtime, retry, timeout, concurrency).\",\n\t\t{\n\t\t\tid: z.string(),\n\t\t\turl: z.string().optional(),\n\t\t\tfilter: z.record(z.string(), z.unknown()).optional(),\n\t\t\tformat: z\n\t\t\t\t.enum([\n\t\t\t\t\t\"standard-webhooks\",\n\t\t\t\t\t\"inngest\",\n\t\t\t\t\t\"trigger\",\n\t\t\t\t\t\"cloudflare\",\n\t\t\t\t\t\"cloudevents\",\n\t\t\t\t\t\"raw\",\n\t\t\t\t])\n\t\t\t\t.optional(),\n\t\t\truntime: z\n\t\t\t\t.enum([\"inngest\", \"trigger\", \"cloudflare\", \"node\"])\n\t\t\t\t.nullable()\n\t\t\t\t.optional(),\n\t\t\tmaxRetries: z.number().int().min(0).optional(),\n\t\t\ttimeoutMs: z.number().int().min(100).optional(),\n\t\t\tconcurrency: z.number().int().min(1).optional(),\n\t\t},\n\t\tasync ({ id, ...patch }) => {\n\t\t\tconst res = await clientProvider().subscriptions.update(\n\t\t\t\tid,\n\t\t\t\tpatch as UpdateSubscriptionRequest,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_pause\",\n\t\t\"Pause a subscription. Pending rows remain queued until resumed.\",\n\t\t{ id: z.string() },\n\t\tasync ({ id }) => {\n\t\t\tconst res = await clientProvider().subscriptions.pause(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_resume\",\n\t\t\"Resume a paused or circuit-open subscription and reset circuit failures.\",\n\t\t{ id: z.string() },\n\t\tasync ({ id }) => {\n\t\t\tconst res = await clientProvider().subscriptions.resume(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_delete\",\n\t\t\"Delete a subscription. Pending outbox rows are cascade-deleted.\",\n\t\t{ id: z.string() },\n\t\tasync ({ id }) => {\n\t\t\tconst res = await clientProvider().subscriptions.delete(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_rotate_secret\",\n\t\t\"Rotate a subscription signing secret. Returns the new plaintext secret once.\",\n\t\t{ id: z.string() },\n\t\tasync ({ id }) => {\n\t\t\tconst res = await clientProvider().subscriptions.rotateSecret(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string; fromBlock: number; toBlock: number }>(\n\t\tserver,\n\t\t\"subscriptions_replay\",\n\t\t\"Replay a block range for a subscription. Replays run at 10% of batch capacity — use sparingly.\",\n\t\t{\n\t\t\tid: z.string(),\n\t\t\tfromBlock: z.number().int().nonnegative(),\n\t\t\ttoBlock: z.number().int().nonnegative(),\n\t\t},\n\t\tasync ({ id, fromBlock, toBlock }) => {\n\t\t\tconst res = await clientProvider().subscriptions.replay(id, {\n\t\t\t\tfromBlock,\n\t\t\t\ttoBlock,\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_dead\",\n\t\t\"Return the last 100 dead-letter outbox rows for a subscription.\",\n\t\t{ id: z.string() },\n\t\tasync ({ id }) => {\n\t\t\tconst { data } = await clientProvider().subscriptions.dead(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(data, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string; outboxId: string }>(\n\t\tserver,\n\t\t\"subscriptions_requeue_dead\",\n\t\t\"Requeue one dead-letter outbox row for delivery retry.\",\n\t\t{\n\t\t\tid: z.string(),\n\t\t\toutboxId: z.string(),\n\t\t},\n\t\tasync ({ id, outboxId }) => {\n\t\t\tconst res = await clientProvider().subscriptions.requeueDead(\n\t\t\t\tid,\n\t\t\t\toutboxId,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_recent_deliveries\",\n\t\t\"Return the last 100 delivery attempts (attempt #, status code, duration, truncated response).\",\n\t\t{ id: z.string() },\n\t\tasync ({ id }) => {\n\t\t\tconst { data } =\n\t\t\t\tawait clientProvider().subscriptions.recentDeliveries(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(data, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n}\n"
|
|
16
|
+
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { AuthError } from \"@secondlayer/sdk\";\nimport { DECODED_EVENT_TYPES } from \"@secondlayer/shared\";\nimport { z } from \"zod/v4\";\nimport { getClient, keyHint } from \"../lib/client.ts\";\nimport { jsonResponse } from \"../lib/format.ts\";\nimport { defineTool } from \"../lib/tool.ts\";\n\ntype ClientProvider = typeof getClient;\n\nconst STREAMS_EVENT_TYPES = DECODED_EVENT_TYPES;\n\n/**\n * Streams is key-mandatory — a keyless call rejects with the SDK's `AuthError`\n * (HTTP 401), unlike the public datasets/index reads. Decorate that one case\n * with the key hint so the agent learns it must set SL_API_KEY; rethrow so\n * defineTool surfaces it as a structured `unauthorized` error.\n */\nasync function withStreamsAuthHint<T>(fn: () => Promise<T>): Promise<T> {\n\ttry {\n\t\treturn await fn();\n\t} catch (err) {\n\t\tif (err instanceof AuthError) {\n\t\t\tthrow Object.assign(new Error(err.message + keyHint), { status: 401 });\n\t\t}\n\t\tthrow err;\n\t}\n}\n\nexport function registerStreamsTools(\n\tserver: McpServer,\n\tclientProvider: ClientProvider = getClient,\n) {\n\tdefineTool<Record<string, never>>(\n\t\tserver,\n\t\t\"streams_tip\",\n\t\t\"Get the current Streams chain tip (latest processed block + lag). Streams requires an API key (SL_API_KEY).\",\n\t\t{},\n\t\tasync () =>\n\t\t\twithStreamsAuthHint(async () =>\n\t\t\t\tjsonResponse(await clientProvider().streams.tip()),\n\t\t\t),\n\t);\n\n\tdefineTool<{\n\t\ttypes?: (typeof STREAMS_EVENT_TYPES)[number][];\n\t\tnotTypes?: (typeof STREAMS_EVENT_TYPES)[number][];\n\t\tcontractId?: string;\n\t\tsender?: string;\n\t\trecipient?: string;\n\t\tassetIdentifier?: string;\n\t\tfromHeight?: number;\n\t\ttoHeight?: number;\n\t\tcursor?: string;\n\t\tlimit?: number;\n\t}>(\n\t\tserver,\n\t\t\"streams_events\",\n\t\t\"List raw chain events from the Streams firehose. Streams requires an API key (SL_API_KEY). Filter by event types, principals, contract, asset, or block range; page with cursor.\",\n\t\t{\n\t\t\ttypes: z\n\t\t\t\t.array(z.enum(STREAMS_EVENT_TYPES))\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Event types to include\"),\n\t\t\tnotTypes: z\n\t\t\t\t.array(z.enum(STREAMS_EVENT_TYPES))\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Event types to exclude (applied after types)\"),\n\t\t\tcontractId: z.string().optional().describe(\"Filter by contract id\"),\n\t\t\tsender: z.string().optional().describe(\"Filter by sender principal\"),\n\t\t\trecipient: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Filter by recipient principal\"),\n\t\t\tassetIdentifier: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Filter by asset identifier\"),\n\t\t\tfromHeight: z\n\t\t\t\t.number()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Start block height (inclusive)\"),\n\t\t\ttoHeight: z.number().optional().describe(\"End block height (inclusive)\"),\n\t\t\tcursor: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Opaque cursor from a prior response\"),\n\t\t\tlimit: z.number().optional().describe(\"Max events for this page\"),\n\t\t},\n\t\tasync (params) =>\n\t\t\twithStreamsAuthHint(async () =>\n\t\t\t\tjsonResponse(await clientProvider().streams.events.list(params)),\n\t\t\t),\n\t);\n\n\tdefineTool<{ txId: string }>(\n\t\tserver,\n\t\t\"streams_event_by_txid\",\n\t\t\"List all Streams events emitted by a single transaction. Streams requires an API key (SL_API_KEY).\",\n\t\t{ txId: z.string().describe(\"Transaction id (0x… hash)\") },\n\t\tasync ({ txId }) =>\n\t\t\twithStreamsAuthHint(async () =>\n\t\t\t\tjsonResponse(await clientProvider().streams.events.byTxId(txId)),\n\t\t\t),\n\t);\n\n\tdefineTool<{ heightOrHash: string }>(\n\t\tserver,\n\t\t\"streams_block_events\",\n\t\t\"List all Streams events in a single block, by height or block hash. Streams requires an API key (SL_API_KEY).\",\n\t\t{\n\t\t\theightOrHash: z\n\t\t\t\t.string()\n\t\t\t\t.describe(\"Block height (digits) or block hash (0x… string)\"),\n\t\t},\n\t\tasync ({ heightOrHash }) =>\n\t\t\twithStreamsAuthHint(async () =>\n\t\t\t\tjsonResponse(\n\t\t\t\t\tawait clientProvider().streams.blocks.events(\n\t\t\t\t\t\t/^\\d+$/.test(heightOrHash) ? Number(heightOrHash) : heightOrHash,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t);\n\n\tdefineTool<{ since: string; limit?: number }>(\n\t\tserver,\n\t\t\"streams_reorgs\",\n\t\t\"List chain reorgs observed by Streams since a cursor. Streams requires an API key (SL_API_KEY).\",\n\t\t{\n\t\t\tsince: z\n\t\t\t\t.string()\n\t\t\t\t.describe(\"Cursor to list reorgs since (block:index or ISO timestamp)\"),\n\t\t\tlimit: z.number().optional().describe(\"Max reorgs to return\"),\n\t\t},\n\t\tasync (params) =>\n\t\t\twithStreamsAuthHint(async () =>\n\t\t\t\tjsonResponse(await clientProvider().streams.reorgs.list(params)),\n\t\t\t),\n\t);\n\n\tdefineTool<{ height: number }>(\n\t\tserver,\n\t\t\"streams_canonical\",\n\t\t\"Get the canonical block at a given height from Streams (height + hashes + is_canonical). Streams requires an API key (SL_API_KEY).\",\n\t\t{ height: z.number().describe(\"Block height\") },\n\t\tasync ({ height }) =>\n\t\t\twithStreamsAuthHint(async () =>\n\t\t\t\tjsonResponse(await clientProvider().streams.canonical(height)),\n\t\t\t),\n\t);\n\n\tdefineTool<Record<string, never>>(\n\t\tserver,\n\t\t\"streams_usage\",\n\t\t\"Your own Streams consumption (events today + this month) and tier limits (rate limit, retention). Streams requires an API key (SL_API_KEY).\",\n\t\t{},\n\t\tasync () =>\n\t\t\twithStreamsAuthHint(async () =>\n\t\t\t\tjsonResponse(await clientProvider().streams.usage()),\n\t\t\t),\n\t);\n}\n",
|
|
17
|
+
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { bundleSubgraphCode } from \"@secondlayer/bundler\";\nimport { z } from \"zod/v4\";\nimport { getClient } from \"../lib/client.ts\";\nimport { formatSubgraphSummary, withCap } from \"../lib/format.ts\";\nimport { defineTool } from \"../lib/tool.ts\";\n\ntype SubgraphClientProvider = typeof getClient;\n\nexport function registerSubgraphTools(\n\tserver: McpServer,\n\tclientProvider: SubgraphClientProvider = getClient,\n) {\n\tdefineTool<Record<string, never>>(\n\t\tserver,\n\t\t\"subgraphs_list\",\n\t\t\"List all deployed subgraphs. Returns summary fields only.\",\n\t\t{},\n\t\tasync () => {\n\t\t\tconst { data } = await clientProvider().subgraphs.list();\n\t\t\treturn {\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: JSON.stringify(data.map(formatSubgraphSummary), null, 2),\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ name: string }>(\n\t\tserver,\n\t\t\"subgraphs_get\",\n\t\t\"Get full details of a subgraph including schema, health, and table columns.\",\n\t\t{ name: z.string().describe(\"Subgraph name\") },\n\t\tasync ({ name }) => {\n\t\t\tconst detail = await clientProvider().subgraphs.get(name);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(detail, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{\n\t\tname: string;\n\t\tformat?: \"agent\" | \"openapi\" | \"markdown\";\n\t\tserverUrl?: string;\n\t}>(\n\t\tserver,\n\t\t\"subgraphs_spec\",\n\t\t\"Get generated API documentation for a subgraph. Defaults to compact agent schema; supports OpenAPI JSON and Markdown.\",\n\t\t{\n\t\t\tname: z.string().describe(\"Subgraph name\"),\n\t\t\tformat: z\n\t\t\t\t.enum([\"agent\", \"openapi\", \"markdown\"])\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Spec format to return. Defaults to agent.\"),\n\t\t\tserverUrl: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Override the server URL embedded in generated docs.\"),\n\t\t},\n\t\tasync ({ name, format = \"agent\", serverUrl }) => {\n\t\t\tconst options = serverUrl ? { serverUrl } : undefined;\n\t\t\tconst spec =\n\t\t\t\tformat === \"openapi\"\n\t\t\t\t\t? await clientProvider().subgraphs.openapi(name, options)\n\t\t\t\t\t: format === \"markdown\"\n\t\t\t\t\t\t? await clientProvider().subgraphs.markdown(name, options)\n\t\t\t\t\t\t: await clientProvider().subgraphs.schema(name, options);\n\t\t\treturn {\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext:\n\t\t\t\t\t\t\ttypeof spec === \"string\" ? spec : JSON.stringify(spec, null, 2),\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{\n\t\tname: string;\n\t\ttable: string;\n\t\tfilters?: Record<string, string>;\n\t\tsort?: string;\n\t\torder?: string;\n\t\tlimit?: number;\n\t\toffset?: number;\n\t\tfields?: string;\n\t\tcount?: boolean;\n\t}>(\n\t\tserver,\n\t\t\"subgraphs_query\",\n\t\t'Query rows from a subgraph table (max 200 rows). Filters support operators: \"amount.gte\": \"1000\", \"sender.neq\": \"SP...\", \"name.like\": \"%token%\". Available operators: eq, neq, gt, gte, lt, lte, like.',\n\t\t{\n\t\t\tname: z.string().describe(\"Subgraph name\"),\n\t\t\ttable: z.string().describe(\"Table name\"),\n\t\t\tfilters: z\n\t\t\t\t.record(z.string(), z.string())\n\t\t\t\t.optional()\n\t\t\t\t.describe(\n\t\t\t\t\t'Column filters — plain values or with operators (e.g. {\"amount.gte\": \"1000\", \"sender\": \"SP...\"})',\n\t\t\t\t),\n\t\t\tsort: z.string().optional().describe(\"Column to sort by\"),\n\t\t\torder: z.enum([\"asc\", \"desc\"]).optional().describe(\"Sort order\"),\n\t\t\tlimit: z\n\t\t\t\t.number()\n\t\t\t\t.max(200)\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Max rows (default 50, max 200)\"),\n\t\t\toffset: z.number().optional().describe(\"Offset for pagination\"),\n\t\t\tfields: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\n\t\t\t\t\t'Comma-separated column list to return (e.g. \"sender,amount\")',\n\t\t\t\t),\n\t\t\tcount: z\n\t\t\t\t.boolean()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"If true, return row count instead of rows\"),\n\t\t},\n\t\tasync ({\n\t\t\tname,\n\t\t\ttable,\n\t\t\tfilters,\n\t\t\tsort,\n\t\t\torder,\n\t\t\tlimit,\n\t\t\toffset,\n\t\t\tfields,\n\t\t\tcount,\n\t\t}) => {\n\t\t\tif (count) {\n\t\t\t\tconst result = await clientProvider().subgraphs.queryTableCount(\n\t\t\t\t\tname,\n\t\t\t\t\ttable,\n\t\t\t\t\t{ filters, sort, order },\n\t\t\t\t);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(result, null, 2) }],\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst rows = await clientProvider().subgraphs.queryTable(name, table, {\n\t\t\t\tfilters,\n\t\t\t\tsort,\n\t\t\t\torder,\n\t\t\t\tlimit: limit ?? 50,\n\t\t\t\toffset,\n\t\t\t\tfields,\n\t\t\t});\n\t\t\tconst cap = limit ?? 50;\n\t\t\tconst result = withCap(\n\t\t\t\trows as Record<string, unknown>[],\n\t\t\t\tcap > 200 ? 200 : cap,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(result, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ name: string; fromBlock?: number; toBlock?: number }>(\n\t\tserver,\n\t\t\"subgraphs_reindex\",\n\t\t\"Reindex a subgraph from a specific block range. Returns an operationId — poll subgraphs_operation to track progress to completion.\",\n\t\t{\n\t\t\tname: z.string().describe(\"Subgraph name\"),\n\t\t\tfromBlock: z\n\t\t\t\t.number()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Start block (defaults to beginning)\"),\n\t\t\ttoBlock: z.number().optional().describe(\"End block (defaults to latest)\"),\n\t\t},\n\t\tasync ({ name, fromBlock, toBlock }) => {\n\t\t\tconst result = await clientProvider().subgraphs.reindex(name, {\n\t\t\t\tfromBlock,\n\t\t\t\ttoBlock,\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(result, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ name: string; operationId?: string }>(\n\t\tserver,\n\t\t\"subgraphs_operation\",\n\t\t\"Check reindex/backfill progress. With operationId, returns that operation's status (poll until status is completed/failed/cancelled); without it, lists recent operations for the subgraph.\",\n\t\t{\n\t\t\tname: z.string().describe(\"Subgraph name\"),\n\t\t\toperationId: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\n\t\t\t\t\t\"Operation id from reindex/backfill/stop; omit to list recent operations\",\n\t\t\t\t),\n\t\t},\n\t\tasync ({ name, operationId }) => {\n\t\t\tconst result = operationId\n\t\t\t\t? await clientProvider().subgraphs.getOperation(name, operationId)\n\t\t\t\t: await clientProvider().subgraphs.operations(name);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(result, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ name: string }>(\n\t\tserver,\n\t\t\"subgraphs_delete\",\n\t\t\"Delete a subgraph permanently.\",\n\t\t{ name: z.string().describe(\"Subgraph name\") },\n\t\tasync ({ name }) => {\n\t\t\tconst result = await clientProvider().subgraphs.delete(name);\n\t\t\treturn { content: [{ type: \"text\", text: result.message }] };\n\t\t},\n\t);\n\n\tdefineTool<{ code: string; startBlock?: number }>(\n\t\tserver,\n\t\t\"subgraphs_deploy\",\n\t\t\"Deploy a subgraph from TypeScript code. Pass the full defineSubgraph() source — it will be bundled, validated, and deployed. Optional startBlock overrides the source definition for this deploy. Call `subgraphs_reindex` separately if you need a forced reindex.\",\n\t\t{\n\t\t\tcode: z\n\t\t\t\t.string()\n\t\t\t\t.describe(\"TypeScript source code containing a defineSubgraph() call\"),\n\t\t\tstartBlock: z\n\t\t\t\t.number()\n\t\t\t\t.int()\n\t\t\t\t.nonnegative()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Override the definition startBlock for this deploy\"),\n\t\t},\n\t\tasync ({ code, startBlock }) => {\n\t\t\tconst bundled = await bundleSubgraphCode(code);\n\t\t\tconst result = await clientProvider().subgraphs.deploy({\n\t\t\t\tname: bundled.name,\n\t\t\t\tversion: bundled.version,\n\t\t\t\tdescription: bundled.description,\n\t\t\t\tsources: bundled.sources,\n\t\t\t\tschema: bundled.schema,\n\t\t\t\thandlerCode: bundled.handlerCode,\n\t\t\t\tsourceCode: code,\n\t\t\t\t...(startBlock !== undefined ? { startBlock } : {}),\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(result, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ name: string }>(\n\t\tserver,\n\t\t\"subgraphs_read_source\",\n\t\t\"Fetch the deployed TypeScript source of a subgraph (plus its stored version). Returns a readOnly payload for subgraphs deployed before source capture — in that case the caller should redeploy via CLI before editing.\",\n\t\t{ name: z.string().describe(\"Subgraph name\") },\n\t\tasync ({ name }) => {\n\t\t\tconst source = await clientProvider().subgraphs.getSource(name);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(source, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n}\n",
|
|
18
|
+
"import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type {\n\tChainTrigger,\n\tCreateSubscriptionRequest,\n\tUpdateSubscriptionRequest,\n} from \"@secondlayer/sdk\";\nimport { CHAIN_TRIGGER_TYPES } from \"@secondlayer/shared\";\nimport { z } from \"zod/v4\";\nimport { getClient } from \"../lib/client.ts\";\nimport { defineTool } from \"../lib/tool.ts\";\n\ntype SubscriptionClientProvider = typeof getClient;\n\n/**\n * Subscription MCP tools — let agents list, configure, test, and replay\n * subgraph event subscriptions. Mirrors the HTTP API 1:1; structured\n * errors bubble through the SDK's ApiError.\n */\nexport function registerSubscriptionTools(\n\tserver: McpServer,\n\tclientProvider: SubscriptionClientProvider = getClient,\n) {\n\tdefineTool<Record<string, never>>(\n\t\tserver,\n\t\t\"subscriptions_list\",\n\t\t\"List all subscriptions for the current account. Returns summary fields (no secrets).\",\n\t\t{},\n\t\tasync () => {\n\t\t\tconst { data } = await clientProvider().subscriptions.list();\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(data, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_get\",\n\t\t\"Get full detail for a subscription (filter, auth, retry config, circuit state).\",\n\t\t{ id: z.string().describe(\"Subscription id\") },\n\t\tasync ({ id }) => {\n\t\t\tconst detail = await clientProvider().subscriptions.get(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(detail, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{\n\t\tname: string;\n\t\tsubgraphName?: string;\n\t\ttableName?: string;\n\t\ttriggers?: ChainTrigger[];\n\t\turl: string;\n\t\tformat?:\n\t\t\t| \"standard-webhooks\"\n\t\t\t| \"inngest\"\n\t\t\t| \"trigger\"\n\t\t\t| \"cloudflare\"\n\t\t\t| \"cloudevents\"\n\t\t\t| \"raw\";\n\t\truntime?: \"inngest\" | \"trigger\" | \"cloudflare\" | \"node\";\n\t\tfilter?: Record<string, unknown>;\n\t}>(\n\t\tserver,\n\t\t\"subscriptions_create\",\n\t\t\"Create a subscription. Two kinds (mutually exclusive): a SUBGRAPH subscription fires on a subgraph table's rows (set subgraphName + tableName + optional filter); a CHAIN subscription fires on raw chain events with no subgraph (set triggers). Returns `signingSecret` ONCE — forward it to the user so they can wire it into their receiver.\",\n\t\t{\n\t\t\tname: z.string().describe(\"Human-readable name, unique per account\"),\n\t\t\tsubgraphName: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Subgraph to subscribe to (subgraph subscription)\"),\n\t\t\ttableName: z\n\t\t\t\t.string()\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Table within the subgraph (subgraph subscription)\"),\n\t\t\ttriggers: z\n\t\t\t\t.array(\n\t\t\t\t\tz.object({\n\t\t\t\t\t\ttype: z.enum(CHAIN_TRIGGER_TYPES),\n\t\t\t\t\t\tcontractId: z.string().optional(),\n\t\t\t\t\t\tfunctionName: z.string().optional(),\n\t\t\t\t\t\tcaller: z.string().optional(),\n\t\t\t\t\t\tsender: z.string().optional(),\n\t\t\t\t\t\trecipient: z.string().optional(),\n\t\t\t\t\t\tassetIdentifier: z.string().optional(),\n\t\t\t\t\t\tdeployer: z.string().optional(),\n\t\t\t\t\t\tcontractName: z.string().optional(),\n\t\t\t\t\t\ttopic: z.string().optional(),\n\t\t\t\t\t\tlockedAddress: z.string().optional(),\n\t\t\t\t\t\ttrait: z.string().optional(),\n\t\t\t\t\t\tminAmount: z.union([z.string(), z.number()]).optional(),\n\t\t\t\t\t\tmaxAmount: z.union([z.string(), z.number()]).optional(),\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t.optional()\n\t\t\t\t.describe(\n\t\t\t\t\t\"Chain triggers (chain subscription) — provide INSTEAD of subgraphName/tableName. Each targets a raw chain event/tx; string fields accept `*` wildcards, `trait` scopes to a SIP/trait. Forward-looking: starts at chain tip, no backfill.\",\n\t\t\t\t),\n\t\t\turl: z.string().describe(\"Webhook URL\"),\n\t\t\tformat: z\n\t\t\t\t.enum([\n\t\t\t\t\t\"standard-webhooks\",\n\t\t\t\t\t\"inngest\",\n\t\t\t\t\t\"trigger\",\n\t\t\t\t\t\"cloudflare\",\n\t\t\t\t\t\"cloudevents\",\n\t\t\t\t\t\"raw\",\n\t\t\t\t])\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Wire format (default standard-webhooks)\"),\n\t\t\truntime: z\n\t\t\t\t.enum([\"inngest\", \"trigger\", \"cloudflare\", \"node\"])\n\t\t\t\t.optional()\n\t\t\t\t.describe(\"Receiver runtime label (display only)\"),\n\t\t\tfilter: z\n\t\t\t\t.record(z.string(), z.unknown())\n\t\t\t\t.optional()\n\t\t\t\t.describe(\n\t\t\t\t\t'Scalar filter DSL, e.g. {\"amount\": {\"gte\": 100}, \"sender\": \"SP...\"}',\n\t\t\t\t),\n\t\t},\n\t\tasync (input) => {\n\t\t\tconst res = await clientProvider().subscriptions.create(\n\t\t\t\tinput as CreateSubscriptionRequest,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{\n\t\tid: string;\n\t\turl?: string;\n\t\tfilter?: Record<string, unknown>;\n\t\tformat?:\n\t\t\t| \"standard-webhooks\"\n\t\t\t| \"inngest\"\n\t\t\t| \"trigger\"\n\t\t\t| \"cloudflare\"\n\t\t\t| \"cloudevents\"\n\t\t\t| \"raw\";\n\t\truntime?: \"inngest\" | \"trigger\" | \"cloudflare\" | \"node\" | null;\n\t\tmaxRetries?: number;\n\t\ttimeoutMs?: number;\n\t\tconcurrency?: number;\n\t}>(\n\t\tserver,\n\t\t\"subscriptions_update\",\n\t\t\"Patch a subscription (url, filter, format, runtime, retry, timeout, concurrency).\",\n\t\t{\n\t\t\tid: z.string(),\n\t\t\turl: z.string().optional(),\n\t\t\tfilter: z.record(z.string(), z.unknown()).optional(),\n\t\t\tformat: z\n\t\t\t\t.enum([\n\t\t\t\t\t\"standard-webhooks\",\n\t\t\t\t\t\"inngest\",\n\t\t\t\t\t\"trigger\",\n\t\t\t\t\t\"cloudflare\",\n\t\t\t\t\t\"cloudevents\",\n\t\t\t\t\t\"raw\",\n\t\t\t\t])\n\t\t\t\t.optional(),\n\t\t\truntime: z\n\t\t\t\t.enum([\"inngest\", \"trigger\", \"cloudflare\", \"node\"])\n\t\t\t\t.nullable()\n\t\t\t\t.optional(),\n\t\t\tmaxRetries: z.number().int().min(0).optional(),\n\t\t\ttimeoutMs: z.number().int().min(100).optional(),\n\t\t\tconcurrency: z.number().int().min(1).optional(),\n\t\t},\n\t\tasync ({ id, ...patch }) => {\n\t\t\tconst res = await clientProvider().subscriptions.update(\n\t\t\t\tid,\n\t\t\t\tpatch as UpdateSubscriptionRequest,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_pause\",\n\t\t\"Pause a subscription. Pending rows remain queued until resumed.\",\n\t\t{ id: z.string() },\n\t\tasync ({ id }) => {\n\t\t\tconst res = await clientProvider().subscriptions.pause(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_resume\",\n\t\t\"Resume a paused or circuit-open subscription and reset circuit failures.\",\n\t\t{ id: z.string() },\n\t\tasync ({ id }) => {\n\t\t\tconst res = await clientProvider().subscriptions.resume(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_delete\",\n\t\t\"Delete a subscription. Pending outbox rows are cascade-deleted.\",\n\t\t{ id: z.string() },\n\t\tasync ({ id }) => {\n\t\t\tconst res = await clientProvider().subscriptions.delete(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_rotate_secret\",\n\t\t\"Rotate a subscription signing secret. Returns the new plaintext secret once.\",\n\t\t{ id: z.string() },\n\t\tasync ({ id }) => {\n\t\t\tconst res = await clientProvider().subscriptions.rotateSecret(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string; fromBlock: number; toBlock: number }>(\n\t\tserver,\n\t\t\"subscriptions_replay\",\n\t\t\"Replay a block range for a subscription. Replays run at 10% of batch capacity — use sparingly.\",\n\t\t{\n\t\t\tid: z.string(),\n\t\t\tfromBlock: z.number().int().nonnegative(),\n\t\t\ttoBlock: z.number().int().nonnegative(),\n\t\t},\n\t\tasync ({ id, fromBlock, toBlock }) => {\n\t\t\tconst res = await clientProvider().subscriptions.replay(id, {\n\t\t\t\tfromBlock,\n\t\t\t\ttoBlock,\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_dead\",\n\t\t\"Return the last 100 dead-letter outbox rows for a subscription.\",\n\t\t{ id: z.string() },\n\t\tasync ({ id }) => {\n\t\t\tconst { data } = await clientProvider().subscriptions.dead(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(data, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string; outboxId: string }>(\n\t\tserver,\n\t\t\"subscriptions_requeue_dead\",\n\t\t\"Requeue one dead-letter outbox row for delivery retry.\",\n\t\t{\n\t\t\tid: z.string(),\n\t\t\toutboxId: z.string(),\n\t\t},\n\t\tasync ({ id, outboxId }) => {\n\t\t\tconst res = await clientProvider().subscriptions.requeueDead(\n\t\t\t\tid,\n\t\t\t\toutboxId,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(res, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n\n\tdefineTool<{ id: string }>(\n\t\tserver,\n\t\t\"subscriptions_recent_deliveries\",\n\t\t\"Return the last 100 delivery attempts (attempt #, status code, duration, truncated response).\",\n\t\t{ id: z.string() },\n\t\tasync ({ id }) => {\n\t\t\tconst { data } =\n\t\t\t\tawait clientProvider().subscriptions.recentDeliveries(id);\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: JSON.stringify(data, null, 2) }],\n\t\t\t};\n\t\t},\n\t);\n}\n"
|
|
19
19
|
],
|
|
20
|
-
"mappings": ";;;AACA;AAAA,kBAGC;AAAA;AAED;;;ACNA;AACA;AACA;AACA;;;ACHA;AAEA,IAAI,WAA+B;AAOnC,SAAS,UAAU,GAAuB;AAAA,EACzC,OAAO,QAAQ,IAAI;AAAA;AASb,SAAS,SAAS,GAAgB;AAAA,EACxC,IAAI,CAAC,UAAU;AAAA,IACd,MAAM,SAAS,WAAW;AAAA,IAC1B,MAAM,UAAU,QAAQ,IAAI;AAAA,IAC5B,WAAW,IAAI,YAAY;AAAA,SACtB,SAAS,EAAE,OAAO,IAAI,CAAC;AAAA,MAC3B,QAAQ;AAAA,SACJ,UAAU,EAAE,QAAQ,IAAI,CAAC;AAAA,IAC9B,CAAC;AAAA,EACF;AAAA,EACA,OAAO;AAAA;AAKD,IAAM,UACZ,iDACA;AAGD,eAAsB,UAAa,CAClC,QACA,MACA,MACa;AAAA,EACb,MAAM,SAAS,WAAW;AAAA,EAC1B,MAAM,UACL,QAAQ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