@secondlayer/mcp 11.6.1 → 11.6.2

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/index.js CHANGED
@@ -863,7 +863,16 @@ import { DECODED_EVENT_TYPES as DECODED_EVENT_TYPES2 } from "@secondlayer/shared
863
863
  import {
864
864
  runSubgraphTest
865
865
  } from "@secondlayer/subgraphs/testing";
866
+ import { z as z10 } from "zod";
867
+
868
+ // src/lib/ids.ts
866
869
  import { z as z9 } from "zod";
870
+ var uuidSchema = z9.string().uuid();
871
+ var webhookIdSchema = uuidSchema.describe("Webhook id");
872
+ var subgraphNameSchema = z9.string().min(1).max(63).regex(/^[a-z0-9-]+$/, "lowercase alphanumeric + hyphens only").describe("Subgraph name");
873
+ var tableNameSchema = z9.string().min(1).max(63).regex(/^[a-z_][a-z0-9_]*$/i, "letters, digits and underscores only").describe("Table name");
874
+
875
+ // src/tools/subgraphs.ts
867
876
  function eventTypeFor(filter) {
868
877
  if (filter.type === "contract_deploy")
869
878
  return null;
@@ -889,13 +898,13 @@ function registerSubgraphTools(server, clientProvider = getClient) {
889
898
  const { data } = await clientProvider().subgraphs.list();
890
899
  return jsonResponse(data.map(formatSubgraphSummary));
891
900
  });
892
- defineTool(server, "subgraphs_status", "Get full details of a subgraph including schema, health (incl. health.emptyMapping when processed events wrote 0 rows), and table columns.", { name: z9.string().describe("Subgraph name") }, async ({ name }) => {
901
+ defineTool(server, "subgraphs_status", "Get full details of a subgraph including schema, health (incl. health.emptyMapping when processed events wrote 0 rows), and table columns.", { name: subgraphNameSchema }, async ({ name }) => {
893
902
  const detail = await clientProvider().subgraphs.status(name);
894
903
  return jsonResponse(detail);
895
904
  });
896
905
  defineTool(server, "subgraphs_spec", "Fetch a subgraph's self-describing spec — the tables, columns, filters, and read URLs a consumer needs, without guessing. `agent` (default) returns the compact JSON schema built for tool use, `openapi` the OpenAPI document for the subgraph's read routes, `markdown` human-readable docs. Read it before writing queries against an unfamiliar subgraph.", {
897
- name: z9.string().describe("Subgraph name"),
898
- format: z9.enum(["agent", "openapi", "markdown"]).optional().describe("agent = JSON schema for tool use (default), openapi = OpenAPI JSON, markdown = docs.md")
906
+ name: subgraphNameSchema,
907
+ format: z10.enum(["agent", "openapi", "markdown"]).optional().describe("agent = JSON schema for tool use (default), openapi = OpenAPI JSON, markdown = docs.md")
899
908
  }, async ({ name, format }) => {
900
909
  const client = clientProvider();
901
910
  if (format === "openapi")
@@ -905,15 +914,15 @@ function registerSubgraphTools(server, clientProvider = getClient) {
905
914
  return jsonResponse(await client.subgraphs.schema(name));
906
915
  });
907
916
  defineTool(server, "subgraphs_query", 'Query rows from a subgraph table (max 200 rows), reading the open /v1 surface — { rows, next_cursor, tip } envelope, cursor-paginated (no offset). Filters support operators: "amount.gte": "1000", "sender.neq": "SP...", "name.like": "%token%". Available operators: eq, neq, gt, gte, lt, lte, like. Every page with rows returns next_cursor (null only when empty): pass it back as `cursor` to read the next page. To TAIL new rows (no streaming over MCP), poll with cursor = next_cursor ?? the cursor you sent. Fetch one row by id with {"_id": "<id>"}. The same rows are readable over HTTP at GET /v1/subgraphs/<name>/<table>; hand that URL to third parties.', {
908
- name: z9.string().describe("Subgraph name"),
909
- table: z9.string().describe("Table name"),
910
- filters: z9.record(z9.string(), z9.string()).optional().describe('Column filters — plain values or with operators (e.g. {"amount.gte": "1000", "sender": "SP..."})'),
911
- sort: z9.string().optional().describe("Column to sort by"),
912
- order: z9.enum(["asc", "desc"]).optional().describe("Sort order"),
913
- limit: z9.number().max(200).optional().describe("Max rows (default 50, max 200)"),
914
- cursor: z9.string().optional().describe("Resume from a previous response's nextCursor"),
915
- fields: z9.string().optional().describe('Comma-separated column list to return (e.g. "sender,amount")'),
916
- count: z9.boolean().optional().describe("If true, return row count instead of rows")
917
+ name: subgraphNameSchema,
918
+ table: tableNameSchema,
919
+ filters: z10.record(z10.string(), z10.string()).optional().describe('Column filters — plain values or with operators (e.g. {"amount.gte": "1000", "sender": "SP..."})'),
920
+ sort: z10.string().optional().describe("Column to sort by"),
921
+ order: z10.enum(["asc", "desc"]).optional().describe("Sort order"),
922
+ limit: z10.number().max(200).optional().describe("Max rows (default 50, max 200)"),
923
+ cursor: z10.string().optional().describe("Resume from a previous response's nextCursor"),
924
+ fields: z10.string().optional().describe('Comma-separated column list to return (e.g. "sender,amount")'),
925
+ count: z10.boolean().optional().describe("If true, return row count instead of rows")
917
926
  }, async ({
918
927
  name,
919
928
  table,
@@ -943,15 +952,15 @@ function registerSubgraphTools(server, clientProvider = getClient) {
943
952
  return jsonResponse({ ...capped, nextCursor: next_cursor, tip });
944
953
  });
945
954
  defineTool(server, "subgraphs_reindex", "Reindex a subgraph: drops and rebuilds the whole subgraph from its start block to chain tip. Takes no block range — use subgraphs_backfill to process a specific range. Returns an operationId — check subgraphs_status (health) or the REST operations endpoint to track progress to completion.", {
946
- name: z9.string().describe("Subgraph name")
955
+ name: subgraphNameSchema
947
956
  }, async ({ name }) => {
948
957
  const result = await clientProvider().subgraphs.reindex(name);
949
958
  return jsonResponse(result);
950
959
  });
951
960
  defineTool(server, "subgraphs_backfill", "Backfill a subgraph over a block range. Non-destructive forward fill (does not drop existing data) — unlike subgraphs_reindex, and the only data-fill path for BYO subgraphs (reindex is blocked there). Both blocks required. Returns an operationId — check subgraphs_status (health) or the REST operations endpoint to track progress.", {
952
- name: z9.string().describe("Subgraph name"),
953
- fromBlock: z9.number().int().nonnegative().describe("Start block (inclusive)"),
954
- toBlock: z9.number().int().nonnegative().describe("End block (inclusive)")
961
+ name: subgraphNameSchema,
962
+ fromBlock: z10.number().int().nonnegative().describe("Start block (inclusive)"),
963
+ toBlock: z10.number().int().nonnegative().describe("End block (inclusive)")
955
964
  }, async ({ name, fromBlock, toBlock }) => {
956
965
  const result = await clientProvider().subgraphs.backfill(name, {
957
966
  fromBlock,
@@ -959,15 +968,15 @@ function registerSubgraphTools(server, clientProvider = getClient) {
959
968
  });
960
969
  return jsonResponse(result);
961
970
  });
962
- defineTool(server, "subgraphs_stop", "Cancel an in-flight reindex or backfill operation for a subgraph. Returns the stop request status; check subgraphs_status (health) or the REST operations endpoint to confirm it reaches a terminal state.", { name: z9.string().describe("Subgraph name") }, async ({ name }) => {
971
+ defineTool(server, "subgraphs_stop", "Cancel an in-flight reindex or backfill operation for a subgraph. Returns the stop request status; check subgraphs_status (health) or the REST operations endpoint to confirm it reaches a terminal state.", { name: subgraphNameSchema }, async ({ name }) => {
963
972
  const result = await clientProvider().subgraphs.stop(name);
964
973
  return jsonResponse(result);
965
974
  });
966
975
  defineTool(server, "subgraphs_gaps", "List indexing gaps (missing block ranges) for a subgraph. Each gap reports start/end/size, reason, and detected/resolved timestamps. Feed an unresolved gap's range into subgraphs_backfill to fill it. Defaults to unresolved gaps.", {
967
- name: z9.string().describe("Subgraph name"),
968
- limit: z9.number().int().positive().optional().describe("Max gaps to return"),
969
- offset: z9.number().int().nonnegative().optional().describe("Pagination offset"),
970
- resolved: z9.boolean().optional().describe("Filter by resolved state (omit for unresolved only)")
976
+ name: subgraphNameSchema,
977
+ limit: z10.number().int().positive().optional().describe("Max gaps to return"),
978
+ offset: z10.number().int().nonnegative().optional().describe("Pagination offset"),
979
+ resolved: z10.boolean().optional().describe("Filter by resolved state (omit for unresolved only)")
971
980
  }, async ({ name, limit, offset, resolved }) => {
972
981
  const result = await clientProvider().subgraphs.gaps(name, {
973
982
  limit,
@@ -977,20 +986,20 @@ function registerSubgraphTools(server, clientProvider = getClient) {
977
986
  return jsonResponse(result);
978
987
  });
979
988
  defineTool(server, "subgraphs_operations", "Operation history for a subgraph (deploy/reindex/backfill/stop), newest first — status, block range, progress, and error. THIS IS THE VERIFY CALL: after subgraphs_deploy, subgraphs_reindex, subgraphs_backfill, or subgraphs_stop, poll it with the returned operationId until `status` is terminal (completed/failed/cancelled) before reporting success. Omit operationId for the recent history.", {
980
- name: z9.string().describe("Subgraph name"),
981
- operationId: z9.string().optional().describe("Fetch one operation by id (the operationId returned by reindex/backfill/stop); omit for recent history")
989
+ name: subgraphNameSchema,
990
+ operationId: z10.string().optional().describe("Fetch one operation by id (the operationId returned by reindex/backfill/stop); omit for recent history")
982
991
  }, async ({ name, operationId }) => {
983
992
  const client = clientProvider();
984
993
  return jsonResponse(operationId ? await client.subgraphs.getOperation(name, operationId) : await client.subgraphs.operations(name));
985
994
  });
986
- defineTool(server, "subgraphs_delete", "Delete a subgraph permanently.", { name: z9.string().describe("Subgraph name") }, async ({ name }) => {
995
+ defineTool(server, "subgraphs_delete", "Delete a subgraph permanently.", { name: subgraphNameSchema }, async ({ name }) => {
987
996
  const result = await clientProvider().subgraphs.delete(name);
988
997
  return textResponse(result.message);
989
998
  });
990
999
  defineTool(server, "subgraphs_deploy", "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. dryRun validates schema/DDL only and does not run handlers — call subgraphs_test first and deploy only when it returns ok: true with written >= 1. Call subgraphs_reindex separately if you need a forced reindex.", {
991
- code: z9.string().describe("TypeScript source code containing a defineSubgraph() call"),
992
- startBlock: z9.number().int().nonnegative().optional().describe("Override the definition startBlock for this deploy"),
993
- dryRun: z9.boolean().optional().describe("Validate schema/DDL only — does not run handlers. Use subgraphs_test to prove a mapping writes rows.")
1000
+ code: z10.string().describe("TypeScript source code containing a defineSubgraph() call"),
1001
+ startBlock: z10.number().int().nonnegative().optional().describe("Override the definition startBlock for this deploy"),
1002
+ dryRun: z10.boolean().optional().describe("Validate schema/DDL only — does not run handlers. Use subgraphs_test to prove a mapping writes rows.")
994
1003
  }, async ({ code, startBlock, dryRun }) => {
995
1004
  const bundled = await bundleSubgraphCode(code);
996
1005
  const result = await clientProvider().subgraphs.deploy({
@@ -1006,10 +1015,10 @@ function registerSubgraphTools(server, clientProvider = getClient) {
1006
1015
  return jsonResponse(result);
1007
1016
  });
1008
1017
  defineTool(server, "subgraphs_test", "Prove a subgraph mapping writes rows against Index data before deploy. Pass full defineSubgraph() source plus a height range. Returns ok/written/tables; EMPTY_MAPPING means events matched but 0 rows were written — read hint for observed event.data keys and do not invent fields. subgraphs_deploy dryRun is DDL only; do not deploy until ok: true with written >= 1.", {
1009
- code: z9.string().describe("TypeScript source containing a defineSubgraph() call"),
1010
- fromHeight: z9.number().int().nonnegative().describe("Start block height (inclusive)"),
1011
- toHeight: z9.number().int().nonnegative().optional().describe("End block height (inclusive); default fromHeight+100"),
1012
- limit: z9.number().int().positive().max(200).optional().describe("Max Index rows per source (default 50, max 200)")
1018
+ code: z10.string().describe("TypeScript source containing a defineSubgraph() call"),
1019
+ fromHeight: z10.number().int().nonnegative().describe("Start block height (inclusive)"),
1020
+ toHeight: z10.number().int().nonnegative().optional().describe("End block height (inclusive); default fromHeight+100"),
1021
+ limit: z10.number().int().positive().max(200).optional().describe("Max Index rows per source (default 50, max 200)")
1013
1022
  }, async ({ code, fromHeight, toHeight, limit }) => {
1014
1023
  const bundled = await bundleSubgraphCode(code);
1015
1024
  const def = await loadBundledDefinition(bundled.handlerCode);
@@ -1090,36 +1099,36 @@ function registerSubgraphTools(server, clientProvider = getClient) {
1090
1099
 
1091
1100
  // src/tools/webhooks.ts
1092
1101
  import { CHAIN_TRIGGER_TYPES } from "@secondlayer/shared";
1093
- import { z as z10 } from "zod";
1102
+ import { z as z11 } from "zod";
1094
1103
  function registerWebhookTools(server, clientProvider = getClient) {
1095
1104
  defineTool(server, "webhooks_list", "List all webhooks for the current account. Returns summary fields (no secrets).", {}, async () => {
1096
1105
  const { data } = await clientProvider().webhooks.list();
1097
1106
  return jsonResponse(data);
1098
1107
  });
1099
- defineTool(server, "webhooks_get", "Get full detail for a webhook (triggers, auth, retry config, circuit state).", { id: z10.string().describe("Webhook id") }, async ({ id }) => {
1108
+ defineTool(server, "webhooks_get", "Get full detail for a webhook (triggers, auth, retry config, circuit state).", { id: webhookIdSchema }, async ({ id }) => {
1100
1109
  const detail = await clientProvider().webhooks.get(id);
1101
1110
  return jsonResponse(detail);
1102
1111
  });
1103
1112
  defineTool(server, "webhooks_create", "Create a webhook that fires on raw chain events (set triggers). Returns `signingSecret` ONCE — forward it to the user so they can wire it into their receiver.", {
1104
- name: z10.string().describe("Human-readable name, unique per account"),
1105
- triggers: z10.array(z10.object({
1106
- type: z10.enum(CHAIN_TRIGGER_TYPES),
1107
- contractId: z10.string().optional(),
1108
- functionName: z10.string().optional(),
1109
- caller: z10.string().optional(),
1110
- sender: z10.string().optional(),
1111
- recipient: z10.string().optional(),
1112
- assetIdentifier: z10.string().optional(),
1113
- deployer: z10.string().optional(),
1114
- contractName: z10.string().optional(),
1115
- topic: z10.string().optional(),
1116
- lockedAddress: z10.string().optional(),
1117
- trait: z10.string().optional(),
1118
- minAmount: z10.union([z10.string(), z10.number()]).optional(),
1119
- maxAmount: z10.union([z10.string(), z10.number()]).optional()
1113
+ name: z11.string().describe("Human-readable name, unique per account"),
1114
+ triggers: z11.array(z11.object({
1115
+ type: z11.enum(CHAIN_TRIGGER_TYPES),
1116
+ contractId: z11.string().optional(),
1117
+ functionName: z11.string().optional(),
1118
+ caller: z11.string().optional(),
1119
+ sender: z11.string().optional(),
1120
+ recipient: z11.string().optional(),
1121
+ assetIdentifier: z11.string().optional(),
1122
+ deployer: z11.string().optional(),
1123
+ contractName: z11.string().optional(),
1124
+ topic: z11.string().optional(),
1125
+ lockedAddress: z11.string().optional(),
1126
+ trait: z11.string().optional(),
1127
+ minAmount: z11.union([z11.string(), z11.number()]).optional(),
1128
+ maxAmount: z11.union([z11.string(), z11.number()]).optional()
1120
1129
  })).describe("Chain triggers. 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."),
1121
- url: z10.string().describe("Webhook URL"),
1122
- format: z10.enum([
1130
+ url: z11.string().describe("Webhook URL"),
1131
+ format: z11.enum([
1123
1132
  "standard-webhooks",
1124
1133
  "inngest",
1125
1134
  "trigger",
@@ -1127,17 +1136,17 @@ function registerWebhookTools(server, clientProvider = getClient) {
1127
1136
  "cloudevents",
1128
1137
  "raw"
1129
1138
  ]).optional().describe("Wire format (default standard-webhooks)"),
1130
- authConfig: z10.record(z10.string(), z10.unknown()).optional().describe('Receiver auth sent with each delivery, e.g. {"type": "bearer", "token": "..."}')
1139
+ authConfig: z11.record(z11.string(), z11.unknown()).optional().describe('Receiver auth sent with each delivery, e.g. {"type": "bearer", "token": "..."}')
1131
1140
  }, async (input) => {
1132
1141
  const res = await clientProvider().webhooks.create(input);
1133
1142
  return jsonResponse(res);
1134
1143
  });
1135
1144
  defineTool(server, "webhooks_update", "Patch a webhook (name, url, authConfig, format, retry, timeout, concurrency).", {
1136
- id: z10.string(),
1137
- name: z10.string().optional().describe("Rename the webhook"),
1138
- url: z10.string().optional(),
1139
- authConfig: z10.record(z10.string(), z10.unknown()).optional().describe("Receiver auth sent with each delivery (bearer/etc.)"),
1140
- format: z10.enum([
1145
+ id: webhookIdSchema,
1146
+ name: z11.string().optional().describe("Rename the webhook"),
1147
+ url: z11.string().optional(),
1148
+ authConfig: z11.record(z11.string(), z11.unknown()).optional().describe("Receiver auth sent with each delivery (bearer/etc.)"),
1149
+ format: z11.enum([
1141
1150
  "standard-webhooks",
1142
1151
  "inngest",
1143
1152
  "trigger",
@@ -1145,35 +1154,35 @@ function registerWebhookTools(server, clientProvider = getClient) {
1145
1154
  "cloudevents",
1146
1155
  "raw"
1147
1156
  ]).optional(),
1148
- maxRetries: z10.number().int().min(0).optional(),
1149
- timeoutMs: z10.number().int().min(100).optional(),
1150
- concurrency: z10.number().int().min(1).optional()
1157
+ maxRetries: z11.number().int().min(0).optional(),
1158
+ timeoutMs: z11.number().int().min(100).optional(),
1159
+ concurrency: z11.number().int().min(1).optional()
1151
1160
  }, async ({ id, ...patch }) => {
1152
1161
  const res = await clientProvider().webhooks.update(id, patch);
1153
1162
  return jsonResponse(res);
1154
1163
  });
1155
- defineTool(server, "webhooks_delete", "Delete a webhook. Pending outbox rows are cascade-deleted.", { id: z10.string() }, async ({ id }) => {
1164
+ defineTool(server, "webhooks_delete", "Delete a webhook. Pending outbox rows are cascade-deleted.", { id: webhookIdSchema }, async ({ id }) => {
1156
1165
  const res = await clientProvider().webhooks.delete(id);
1157
1166
  return jsonResponse(res);
1158
1167
  });
1159
- 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 }) => {
1168
+ 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: webhookIdSchema }, async ({ id }) => {
1160
1169
  const res = await clientProvider().webhooks.test(id);
1161
1170
  return jsonResponse(res);
1162
1171
  });
1163
- 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)));
1164
- 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)));
1165
- 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)));
1166
- 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)));
1167
- 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)));
1172
+ 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: webhookIdSchema }, async ({ id }) => jsonResponse(await clientProvider().webhooks.pause(id)));
1173
+ 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: webhookIdSchema }, async ({ id }) => jsonResponse(await clientProvider().webhooks.resume(id)));
1174
+ 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: webhookIdSchema }, async ({ id }) => jsonResponse(await clientProvider().webhooks.rotateSecret(id)));
1175
+ 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: webhookIdSchema }, async ({ id }) => jsonResponse(await clientProvider().webhooks.deliveries(id)));
1176
+ 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: webhookIdSchema }, async ({ id }) => jsonResponse(await clientProvider().webhooks.dead(id)));
1168
1177
  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.", {
1169
- id: z10.string().describe("Webhook id"),
1170
- outboxId: z10.string().describe("Outbox id of the dead delivery (from webhooks_dead)")
1178
+ id: webhookIdSchema,
1179
+ outboxId: uuidSchema.describe("Outbox id of the dead delivery (from webhooks_dead)")
1171
1180
  }, async ({ id, outboxId }) => jsonResponse(await clientProvider().webhooks.requeue(id, outboxId)));
1172
1181
  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.", {
1173
- id: z10.string(),
1174
- fromBlock: z10.number().int().nonnegative(),
1175
- toBlock: z10.number().int().nonnegative(),
1176
- force: z10.string().optional().describe("Idempotency suffix to force a duplicate replay of the range")
1182
+ id: webhookIdSchema,
1183
+ fromBlock: z11.number().int().nonnegative(),
1184
+ toBlock: z11.number().int().nonnegative(),
1185
+ force: z11.string().optional().describe("Idempotency suffix to force a duplicate replay of the range")
1177
1186
  }, async ({ id, fromBlock, toBlock, force }) => {
1178
1187
  const res = await clientProvider().webhooks.replay(id, {
1179
1188
  fromBlock,
@@ -1302,5 +1311,5 @@ export {
1302
1311
  createServer
1303
1312
  };
1304
1313
 
1305
- //# debugId=06935EBEF9932CCC64756E2164756E21
1314
+ //# debugId=6468B3A549EAD8FB64756E2164756E21
1306
1315
  //# sourceMappingURL=index.js.map