@secondlayer/mcp 7.4.1 → 7.5.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.js CHANGED
@@ -187,7 +187,8 @@ var PRODUCT_BLURBS = {
187
187
  streams: "raw chain event firehose — cursor-paginated reads, tip/canonical/reorg checks, bulk parquet dumps",
188
188
  contracts: "trait-based contract discovery and ABIs",
189
189
  subgraphs: "author/scaffold/deploy/query custom indexes",
190
- subscriptions: "webhook delivery on subgraph rows or raw chain events",
190
+ webhooks: "a signed POST to a URL you run, on subgraph rows or raw chain events",
191
+ subscriptions: "a signed POST to a URL you run, on subgraph rows or raw chain events",
191
192
  account: "identity and self-provisioned API keys",
192
193
  codegen: "ORM schemas for the tables you read",
193
194
  instance: "decoder health and empty-index diagnosis",
@@ -200,6 +201,7 @@ var PRODUCT_ORDER = [
200
201
  "streams",
201
202
  "contracts",
202
203
  "subgraphs",
204
+ "webhooks",
203
205
  "subscriptions",
204
206
  "account",
205
207
  "codegen",
@@ -256,7 +258,8 @@ async function buildContext(deps = { clientProvider: getClient }) {
256
258
  streamsTip: orNull(snap?.streamsTip),
257
259
  indexTip: orNull(snap?.indexTip),
258
260
  subgraphs: snap?.subgraphs.value ? snap.subgraphs.value.map(formatSubgraphSummary) : orNull(snap?.subgraphs),
259
- subscriptions: orNull(snap?.subscriptions),
261
+ webhooks: orNull(snap?.webhooks),
262
+ subscriptions: orNull(snap?.webhooks),
260
263
  activeOperations: orNull(snap?.activeOperations),
261
264
  instance: instance2
262
265
  },
@@ -267,7 +270,7 @@ async function buildContext(deps = { clientProvider: getClient }) {
267
270
  }
268
271
  function registerResources(server) {
269
272
  server.resource("context", "secondlayer://context", {
270
- description: "Live agent context — what exists (your subgraphs, subscriptions, account), what you can do, and read-auth tiers. Read this first."
273
+ description: "Live agent context — what exists (your subgraphs, webhooks, account), what you can do, and read-auth tiers. Read this first."
271
274
  }, async () => ({
272
275
  contents: [
273
276
  {
@@ -312,7 +315,7 @@ function registerResources(server) {
312
315
  ]
313
316
  }));
314
317
  server.resource("chain-triggers", "secondlayer://chain-triggers", {
315
- description: "Chain-subscription trigger types and the filter fields each accepts (for subscriptions_create triggers)."
318
+ description: "Chain-webhook trigger types and the filter fields each accepts (for webhooks_create triggers)."
316
319
  }, async () => ({
317
320
  contents: [
318
321
  {
@@ -1074,22 +1077,22 @@ function registerSubgraphTools(server, clientProvider = getClient) {
1074
1077
  });
1075
1078
  }
1076
1079
 
1077
- // src/tools/subscriptions.ts
1080
+ // src/tools/webhooks.ts
1078
1081
  import { CHAIN_TRIGGER_TYPES } from "@secondlayer/shared";
1079
1082
  import { z as z10 } from "zod";
1080
- function registerSubscriptionTools(server, clientProvider = getClient) {
1081
- defineTool(server, "subscriptions_list", "List all subscriptions for the current account. Returns summary fields (no secrets).", {}, async () => {
1082
- const { data } = await clientProvider().subscriptions.list();
1083
+ function registerWebhookTools(server, clientProvider = getClient) {
1084
+ defineTool(server, "webhooks_list", "List all webhooks for the current account. Returns summary fields (no secrets).", {}, async () => {
1085
+ const { data } = await clientProvider().webhooks.list();
1083
1086
  return jsonResponse(data);
1084
1087
  });
1085
- defineTool(server, "subscriptions_get", "Get full detail for a subscription (filter, auth, retry config, circuit state).", { id: z10.string().describe("Subscription id") }, async ({ id }) => {
1086
- const detail = await clientProvider().subscriptions.get(id);
1088
+ defineTool(server, "webhooks_get", "Get full detail for a webhook (filter, auth, retry config, circuit state).", { id: z10.string().describe("Webhook id") }, async ({ id }) => {
1089
+ const detail = await clientProvider().webhooks.get(id);
1087
1090
  return jsonResponse(detail);
1088
1091
  });
1089
- defineTool(server, "subscriptions_create", "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.", {
1092
+ defineTool(server, "webhooks_create", "Create a webhook. Two kinds (mutually exclusive): a SUBGRAPH webhook fires on a subgraph table's rows (set subgraphName + tableName + optional filter); a CHAIN webhook 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.", {
1090
1093
  name: z10.string().describe("Human-readable name, unique per account"),
1091
- subgraphName: z10.string().optional().describe("Subgraph to subscribe to (subgraph subscription)"),
1092
- tableName: z10.string().optional().describe("Table within the subgraph (subgraph subscription)"),
1094
+ subgraphName: z10.string().optional().describe("Subgraph to subscribe to (subgraph webhook)"),
1095
+ tableName: z10.string().optional().describe("Table within the subgraph (subgraph webhook)"),
1093
1096
  triggers: z10.array(z10.object({
1094
1097
  type: z10.enum(CHAIN_TRIGGER_TYPES),
1095
1098
  contractId: z10.string().optional(),
@@ -1105,7 +1108,7 @@ function registerSubscriptionTools(server, clientProvider = getClient) {
1105
1108
  trait: z10.string().optional(),
1106
1109
  minAmount: z10.union([z10.string(), z10.number()]).optional(),
1107
1110
  maxAmount: z10.union([z10.string(), z10.number()]).optional()
1108
- })).optional().describe("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. Per-type accepted fields: see the secondlayer://chain-triggers resource. Forward-looking: starts at chain tip, no backfill."),
1111
+ })).optional().describe("Chain triggers (chain webhook) — provide INSTEAD of subgraphName/tableName. Each targets a raw chain event/tx; string fields accept `*` wildcards, `trait` scopes to a SIP/trait. Per-type accepted fields: see the secondlayer://chain-triggers resource. Forward-looking: starts at chain tip, no backfill."),
1109
1112
  url: z10.string().describe("Webhook URL"),
1110
1113
  format: z10.enum([
1111
1114
  "standard-webhooks",
@@ -1119,12 +1122,12 @@ function registerSubscriptionTools(server, clientProvider = getClient) {
1119
1122
  filter: z10.record(z10.string(), z10.unknown()).optional().describe('Scalar filter DSL, e.g. {"amount": {"gte": 100}, "sender": "SP..."}'),
1120
1123
  authConfig: z10.record(z10.string(), z10.unknown()).optional().describe('Receiver auth sent with each delivery, e.g. {"type": "bearer", "token": "..."}')
1121
1124
  }, async (input) => {
1122
- const res = await clientProvider().subscriptions.create(input);
1125
+ const res = await clientProvider().webhooks.create(input);
1123
1126
  return jsonResponse(res);
1124
1127
  });
1125
- defineTool(server, "subscriptions_update", "Patch a subscription (name, url, filter, authConfig, format, runtime, retry, timeout, concurrency).", {
1128
+ defineTool(server, "webhooks_update", "Patch a webhook (name, url, filter, authConfig, format, runtime, retry, timeout, concurrency).", {
1126
1129
  id: z10.string(),
1127
- name: z10.string().optional().describe("Rename the subscription"),
1130
+ name: z10.string().optional().describe("Rename the webhook"),
1128
1131
  url: z10.string().optional(),
1129
1132
  filter: z10.record(z10.string(), z10.unknown()).optional(),
1130
1133
  authConfig: z10.record(z10.string(), z10.unknown()).optional().describe("Receiver auth sent with each delivery (bearer/etc.)"),
@@ -1141,33 +1144,129 @@ function registerSubscriptionTools(server, clientProvider = getClient) {
1141
1144
  timeoutMs: z10.number().int().min(100).optional(),
1142
1145
  concurrency: z10.number().int().min(1).optional()
1143
1146
  }, async ({ id, ...patch }) => {
1144
- const res = await clientProvider().subscriptions.update(id, patch);
1147
+ const res = await clientProvider().webhooks.update(id, patch);
1145
1148
  return jsonResponse(res);
1146
1149
  });
1147
- defineTool(server, "subscriptions_delete", "Delete a subscription. Pending outbox rows are cascade-deleted.", { id: z10.string() }, async ({ id }) => {
1148
- const res = await clientProvider().subscriptions.delete(id);
1150
+ defineTool(server, "webhooks_delete", "Delete a webhook. Pending outbox rows are cascade-deleted.", { id: z10.string() }, async ({ id }) => {
1151
+ const res = await clientProvider().webhooks.delete(id);
1149
1152
  return jsonResponse(res);
1150
1153
  });
1151
- defineTool(server, "subscriptions_test", "Send a one-off test webhook to a subscription's URL (built for its format, SSRF-guarded). Logged as a delivery row. Returns {ok, statusCode, error, durationMs, deliveryId}.", { id: z10.string().describe("Subscription id") }, async ({ id }) => {
1152
- const res = await clientProvider().subscriptions.test(id);
1154
+ defineTool(server, "webhooks_test", "Send a one-off test webhook to a webhook's URL (built for its format, SSRF-guarded). Logged as a delivery row. Returns {ok, statusCode, error, durationMs, deliveryId}.", { id: z10.string().describe("Webhook id") }, async ({ id }) => {
1155
+ const res = await clientProvider().webhooks.test(id);
1153
1156
  return jsonResponse(res);
1154
1157
  });
1155
- defineTool(server, "subscriptions_pause", "Pause a subscription: stops delivery attempts and stops queueing new ones. Nothing is deleted — resume picks the subscription back up from the tip. Verify with subscriptions_get (status).", { id: z10.string().describe("Subscription id") }, async ({ id }) => jsonResponse(await clientProvider().subscriptions.pause(id)));
1156
- defineTool(server, "subscriptions_resume", "Resume a paused subscription (also clears a tripped circuit breaker). Deliveries restart from the current tip — use subscriptions_replay for the blocks missed while paused. Verify with subscriptions_get (status).", { id: z10.string().describe("Subscription id") }, async ({ id }) => jsonResponse(await clientProvider().subscriptions.resume(id)));
1157
- defineTool(server, "subscriptions_rotate_secret", "Rotate a subscription's webhook signing secret. Returns the NEW `signingSecret` ONCE — forward it to the user; deliveries signed with the old secret stop verifying as soon as this returns, so the receiver must be updated.", { id: z10.string().describe("Subscription id") }, async ({ id }) => jsonResponse(await clientProvider().subscriptions.rotateSecret(id)));
1158
- defineTool(server, "subscriptions_deliveries", "List recent delivery attempts for a subscription — status code, attempt count, error, duration, timestamps. THIS IS THE VERIFY CALL: after subscriptions_create, subscriptions_test, or subscriptions_replay, read it to confirm the webhook actually landed (and to see the receiver's response when it didn't) instead of trusting the enqueue result.", { id: z10.string().describe("Subscription id") }, async ({ id }) => jsonResponse(await clientProvider().subscriptions.deliveries(id)));
1159
- defineTool(server, "subscriptions_dead", "List a subscription's dead-letter queue — deliveries that exhausted their retries, with the outbox id, payload, and last error. Diagnose the receiver first (subscriptions_get for the URL/auth, subscriptions_test for a live probe), then requeue rows with subscriptions_requeue.", { id: z10.string().describe("Subscription id") }, async ({ id }) => jsonResponse(await clientProvider().subscriptions.dead(id)));
1160
- defineTool(server, "subscriptions_requeue", "Requeue ONE dead-lettered delivery for another attempt, by its outbox id from subscriptions_dead. Fix the receiver first — a requeue against a still-broken endpoint just dies again. Verify with subscriptions_deliveries.", {
1161
- id: z10.string().describe("Subscription id"),
1162
- outboxId: z10.string().describe("Outbox id of the dead delivery (from subscriptions_dead)")
1163
- }, async ({ id, outboxId }) => jsonResponse(await clientProvider().subscriptions.requeue(id, outboxId)));
1164
- defineTool(server, "subscriptions_replay", "Replay a block range for a subscription. Replays run at 10% of batch capacity — use sparingly. Pass `force` (a short idempotency suffix) to re-run a range that was already replayed.", {
1158
+ defineTool(server, "webhooks_pause", "Pause a webhook: stops delivery attempts and stops queueing new ones. Nothing is deleted — resume picks the webhook back up from the tip. Verify with webhooks_get (status).", { id: z10.string().describe("Webhook id") }, async ({ id }) => jsonResponse(await clientProvider().webhooks.pause(id)));
1159
+ defineTool(server, "webhooks_resume", "Resume a paused webhook (also clears a tripped circuit breaker). Deliveries restart from the current tip — use webhooks_replay for the blocks missed while paused. Verify with webhooks_get (status).", { id: z10.string().describe("Webhook id") }, async ({ id }) => jsonResponse(await clientProvider().webhooks.resume(id)));
1160
+ defineTool(server, "webhooks_rotate_secret", "Rotate a webhook's signing secret. Returns the NEW `signingSecret` ONCE — forward it to the user; deliveries signed with the old secret stop verifying as soon as this returns, so the receiver must be updated.", { id: z10.string().describe("Webhook id") }, async ({ id }) => jsonResponse(await clientProvider().webhooks.rotateSecret(id)));
1161
+ defineTool(server, "webhooks_deliveries", "List recent delivery attempts for a webhook — status code, attempt count, error, duration, timestamps. THIS IS THE VERIFY CALL: after webhooks_create, webhooks_test, or webhooks_replay, read it to confirm the webhook actually landed (and to see the receiver's response when it didn't) instead of trusting the enqueue result.", { id: z10.string().describe("Webhook id") }, async ({ id }) => jsonResponse(await clientProvider().webhooks.deliveries(id)));
1162
+ defineTool(server, "webhooks_dead", "List a webhook's dead-letter queue — deliveries that exhausted their retries, with the outbox id, payload, and last error. Diagnose the receiver first (webhooks_get for the URL/auth, webhooks_test for a live probe), then requeue rows with webhooks_requeue.", { id: z10.string().describe("Webhook id") }, async ({ id }) => jsonResponse(await clientProvider().webhooks.dead(id)));
1163
+ defineTool(server, "webhooks_requeue", "Requeue ONE dead-lettered delivery for another attempt, by its outbox id from webhooks_dead. Fix the receiver first — a requeue against a still-broken endpoint just dies again. Verify with webhooks_deliveries.", {
1164
+ id: z10.string().describe("Webhook id"),
1165
+ outboxId: z10.string().describe("Outbox id of the dead delivery (from webhooks_dead)")
1166
+ }, async ({ id, outboxId }) => jsonResponse(await clientProvider().webhooks.requeue(id, outboxId)));
1167
+ defineTool(server, "webhooks_replay", "Replay a block range for a webhook. Replays run at 10% of batch capacity — use sparingly. Pass `force` (a short idempotency suffix) to re-run a range that was already replayed.", {
1165
1168
  id: z10.string(),
1166
1169
  fromBlock: z10.number().int().nonnegative(),
1167
1170
  toBlock: z10.number().int().nonnegative(),
1168
1171
  force: z10.string().optional().describe("Idempotency suffix to force a duplicate replay of the range")
1169
1172
  }, async ({ id, fromBlock, toBlock, force }) => {
1170
- const res = await clientProvider().subscriptions.replay(id, {
1173
+ const res = await clientProvider().webhooks.replay(id, {
1174
+ fromBlock,
1175
+ toBlock,
1176
+ ...force !== undefined ? { force } : {}
1177
+ });
1178
+ return jsonResponse(res);
1179
+ });
1180
+ defineTool(server, "subscriptions_list", "Deprecated alias of webhooks_list. Removed next minor. List all webhooks for the current account. Returns summary fields (no secrets).", {}, async () => {
1181
+ const { data } = await clientProvider().webhooks.list();
1182
+ return jsonResponse(data);
1183
+ });
1184
+ defineTool(server, "subscriptions_get", "Deprecated alias of webhooks_get. Removed next minor. Get full detail for a webhook (filter, auth, retry config, circuit state).", { id: z10.string().describe("Webhook id") }, async ({ id }) => {
1185
+ const detail = await clientProvider().webhooks.get(id);
1186
+ return jsonResponse(detail);
1187
+ });
1188
+ defineTool(server, "subscriptions_create", "Deprecated alias of webhooks_create. Removed next minor. Create a webhook. Two kinds (mutually exclusive): a SUBGRAPH webhook fires on a subgraph table's rows (set subgraphName + tableName + optional filter); a CHAIN webhook 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.", {
1189
+ name: z10.string().describe("Human-readable name, unique per account"),
1190
+ subgraphName: z10.string().optional().describe("Subgraph to subscribe to (subgraph webhook)"),
1191
+ tableName: z10.string().optional().describe("Table within the subgraph (subgraph webhook)"),
1192
+ triggers: z10.array(z10.object({
1193
+ type: z10.enum(CHAIN_TRIGGER_TYPES),
1194
+ contractId: z10.string().optional(),
1195
+ functionName: z10.string().optional(),
1196
+ caller: z10.string().optional(),
1197
+ sender: z10.string().optional(),
1198
+ recipient: z10.string().optional(),
1199
+ assetIdentifier: z10.string().optional(),
1200
+ deployer: z10.string().optional(),
1201
+ contractName: z10.string().optional(),
1202
+ topic: z10.string().optional(),
1203
+ lockedAddress: z10.string().optional(),
1204
+ trait: z10.string().optional(),
1205
+ minAmount: z10.union([z10.string(), z10.number()]).optional(),
1206
+ maxAmount: z10.union([z10.string(), z10.number()]).optional()
1207
+ })).optional().describe("Chain triggers (chain webhook) — provide INSTEAD of subgraphName/tableName. Each targets a raw chain event/tx; string fields accept `*` wildcards, `trait` scopes to a SIP/trait. Per-type accepted fields: see the secondlayer://chain-triggers resource. Forward-looking: starts at chain tip, no backfill."),
1208
+ url: z10.string().describe("Webhook URL"),
1209
+ format: z10.enum([
1210
+ "standard-webhooks",
1211
+ "inngest",
1212
+ "trigger",
1213
+ "cloudflare",
1214
+ "cloudevents",
1215
+ "raw"
1216
+ ]).optional().describe("Wire format (default standard-webhooks)"),
1217
+ runtime: z10.enum(["inngest", "trigger", "cloudflare", "node"]).optional().describe("Receiver runtime label (display only)"),
1218
+ filter: z10.record(z10.string(), z10.unknown()).optional().describe('Scalar filter DSL, e.g. {"amount": {"gte": 100}, "sender": "SP..."}'),
1219
+ authConfig: z10.record(z10.string(), z10.unknown()).optional().describe('Receiver auth sent with each delivery, e.g. {"type": "bearer", "token": "..."}')
1220
+ }, async (input) => {
1221
+ const res = await clientProvider().webhooks.create(input);
1222
+ return jsonResponse(res);
1223
+ });
1224
+ defineTool(server, "subscriptions_update", "Deprecated alias of webhooks_update. Removed next minor. Patch a webhook (name, url, filter, authConfig, format, runtime, retry, timeout, concurrency).", {
1225
+ id: z10.string(),
1226
+ name: z10.string().optional().describe("Rename the webhook"),
1227
+ url: z10.string().optional(),
1228
+ filter: z10.record(z10.string(), z10.unknown()).optional(),
1229
+ authConfig: z10.record(z10.string(), z10.unknown()).optional().describe("Receiver auth sent with each delivery (bearer/etc.)"),
1230
+ format: z10.enum([
1231
+ "standard-webhooks",
1232
+ "inngest",
1233
+ "trigger",
1234
+ "cloudflare",
1235
+ "cloudevents",
1236
+ "raw"
1237
+ ]).optional(),
1238
+ runtime: z10.enum(["inngest", "trigger", "cloudflare", "node"]).nullable().optional(),
1239
+ maxRetries: z10.number().int().min(0).optional(),
1240
+ timeoutMs: z10.number().int().min(100).optional(),
1241
+ concurrency: z10.number().int().min(1).optional()
1242
+ }, async ({ id, ...patch }) => {
1243
+ const res = await clientProvider().webhooks.update(id, patch);
1244
+ return jsonResponse(res);
1245
+ });
1246
+ defineTool(server, "subscriptions_delete", "Deprecated alias of webhooks_delete. Removed next minor. Delete a webhook. Pending outbox rows are cascade-deleted.", { id: z10.string() }, async ({ id }) => {
1247
+ const res = await clientProvider().webhooks.delete(id);
1248
+ return jsonResponse(res);
1249
+ });
1250
+ defineTool(server, "subscriptions_test", "Deprecated alias of webhooks_test. Removed next minor. Send a one-off test webhook to a webhook's URL (built for its format, SSRF-guarded). Logged as a delivery row. Returns {ok, statusCode, error, durationMs, deliveryId}.", { id: z10.string().describe("Webhook id") }, async ({ id }) => {
1251
+ const res = await clientProvider().webhooks.test(id);
1252
+ return jsonResponse(res);
1253
+ });
1254
+ defineTool(server, "subscriptions_pause", "Deprecated alias of webhooks_pause. Removed next minor. Pause a webhook: stops delivery attempts and stops queueing new ones. Nothing is deleted — resume picks the webhook back up from the tip. Verify with webhooks_get (status).", { id: z10.string().describe("Webhook id") }, async ({ id }) => jsonResponse(await clientProvider().webhooks.pause(id)));
1255
+ defineTool(server, "subscriptions_resume", "Deprecated alias of webhooks_resume. Removed next minor. Resume a paused webhook (also clears a tripped circuit breaker). Deliveries restart from the current tip — use webhooks_replay for the blocks missed while paused. Verify with webhooks_get (status).", { id: z10.string().describe("Webhook id") }, async ({ id }) => jsonResponse(await clientProvider().webhooks.resume(id)));
1256
+ defineTool(server, "subscriptions_rotate_secret", "Deprecated alias of webhooks_rotate_secret. Removed next minor. Rotate a webhook's signing secret. Returns the NEW `signingSecret` ONCE — forward it to the user; deliveries signed with the old secret stop verifying as soon as this returns, so the receiver must be updated.", { id: z10.string().describe("Webhook id") }, async ({ id }) => jsonResponse(await clientProvider().webhooks.rotateSecret(id)));
1257
+ defineTool(server, "subscriptions_deliveries", "Deprecated alias of webhooks_deliveries. Removed next minor. List recent delivery attempts for a webhook — status code, attempt count, error, duration, timestamps. THIS IS THE VERIFY CALL: after webhooks_create, webhooks_test, or webhooks_replay, read it to confirm the webhook actually landed (and to see the receiver's response when it didn't) instead of trusting the enqueue result.", { id: z10.string().describe("Webhook id") }, async ({ id }) => jsonResponse(await clientProvider().webhooks.deliveries(id)));
1258
+ defineTool(server, "subscriptions_dead", "Deprecated alias of webhooks_dead. Removed next minor. List a webhook's dead-letter queue — deliveries that exhausted their retries, with the outbox id, payload, and last error. Diagnose the receiver first (webhooks_get for the URL/auth, webhooks_test for a live probe), then requeue rows with webhooks_requeue.", { id: z10.string().describe("Webhook id") }, async ({ id }) => jsonResponse(await clientProvider().webhooks.dead(id)));
1259
+ defineTool(server, "subscriptions_requeue", "Deprecated alias of webhooks_requeue. Removed next minor. Requeue ONE dead-lettered delivery for another attempt, by its outbox id from webhooks_dead. Fix the receiver first — a requeue against a still-broken endpoint just dies again. Verify with webhooks_deliveries.", {
1260
+ id: z10.string().describe("Webhook id"),
1261
+ outboxId: z10.string().describe("Outbox id of the dead delivery (from webhooks_dead)")
1262
+ }, async ({ id, outboxId }) => jsonResponse(await clientProvider().webhooks.requeue(id, outboxId)));
1263
+ defineTool(server, "subscriptions_replay", "Deprecated alias of webhooks_replay. Removed next minor. Replay a block range for a webhook. Replays run at 10% of batch capacity — use sparingly. Pass `force` (a short idempotency suffix) to re-run a range that was already replayed.", {
1264
+ id: z10.string(),
1265
+ fromBlock: z10.number().int().nonnegative(),
1266
+ toBlock: z10.number().int().nonnegative(),
1267
+ force: z10.string().optional().describe("Idempotency suffix to force a duplicate replay of the range")
1268
+ }, async ({ id, fromBlock, toBlock, force }) => {
1269
+ const res = await clientProvider().webhooks.replay(id, {
1171
1270
  fromBlock,
1172
1271
  toBlock,
1173
1272
  ...force !== undefined ? { force } : {}
@@ -1186,7 +1285,7 @@ function createServer() {
1186
1285
  });
1187
1286
  registerScaffoldTools(server);
1188
1287
  registerSubgraphTools(server);
1189
- registerSubscriptionTools(server);
1288
+ registerWebhookTools(server);
1190
1289
  registerIndexTools(server);
1191
1290
  registerStreamsTools(server);
1192
1291
  registerContractTools(server);
@@ -1207,5 +1306,5 @@ var server = createServer();
1207
1306
  var transport = new StdioServerTransport;
1208
1307
  await server.connect(transport);
1209
1308
 
1210
- //# debugId=C232724CB95A909764756E2164756E21
1309
+ //# debugId=AA11B5B2A18DEA7664756E2164756E21
1211
1310
  //# sourceMappingURL=bin.js.map