@reclaimprotocol/agent 0.1.1-dev.1 → 0.1.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.
Files changed (232) hide show
  1. package/README.md +1 -1
  2. package/lib/cdp/capture-engine.d.ts +66 -0
  3. package/lib/cdp/capture-engine.js +153 -0
  4. package/lib/cdp/capture.d.ts +9 -20
  5. package/lib/cdp/capture.js +14 -138
  6. package/lib/cdp/index.d.ts +3 -0
  7. package/lib/cdp/index.js +6 -0
  8. package/lib/cdp/launcher.js +4 -3
  9. package/lib/config/store.d.ts +7 -6
  10. package/lib/config/store.js +2 -2
  11. package/lib/consts.d.ts +68 -0
  12. package/lib/consts.js +134 -0
  13. package/lib/index.d.ts +2 -2
  14. package/lib/index.js +1 -1
  15. package/lib/logger.js +2 -1
  16. package/lib/mcp/api/operations.gen.d.ts +100 -48
  17. package/lib/mcp/api/operations.gen.js +1129 -194
  18. package/lib/mcp/api/to-zod.d.ts +24 -0
  19. package/lib/mcp/api/to-zod.js +94 -0
  20. package/lib/mcp/api/tools.js +1 -1
  21. package/lib/mcp/credentials/authenticate.d.ts +3 -0
  22. package/lib/mcp/{tools/credentials → credentials}/authenticate.js +3 -3
  23. package/lib/mcp/credentials/build.d.ts +5 -0
  24. package/lib/mcp/credentials/build.js +18 -0
  25. package/lib/mcp/{tools/credentials → credentials}/cache.d.ts +9 -9
  26. package/lib/mcp/{tools/credentials → credentials}/cache.js +36 -19
  27. package/lib/mcp/credentials/import.d.ts +2 -0
  28. package/lib/mcp/{tools/credentials → credentials}/import.js +2 -2
  29. package/lib/mcp/credentials/issue.d.ts +2 -0
  30. package/lib/mcp/{tools/credentials → credentials}/issue.js +4 -4
  31. package/lib/mcp/credentials/keypair.d.ts +17 -0
  32. package/lib/mcp/credentials/keypair.js +48 -0
  33. package/lib/mcp/credentials/link.d.ts +3 -0
  34. package/lib/mcp/credentials/link.js +107 -0
  35. package/lib/mcp/{tools/credentials → credentials}/list-cached.d.ts +1 -1
  36. package/lib/mcp/{tools/credentials → credentials}/list-cached.js +5 -5
  37. package/lib/mcp/credentials/owner-key.d.ts +23 -0
  38. package/lib/mcp/credentials/owner-key.js +58 -0
  39. package/lib/mcp/credentials/paths.d.ts +12 -0
  40. package/lib/mcp/credentials/paths.js +35 -0
  41. package/lib/mcp/credentials/poll.d.ts +27 -0
  42. package/lib/mcp/credentials/poll.js +61 -0
  43. package/lib/mcp/{tools/credentials → credentials}/resolve-owner-key.d.ts +1 -1
  44. package/lib/mcp/{tools/credentials → credentials}/resolve-owner-key.js +2 -2
  45. package/lib/mcp/credentials/session-cache.d.ts +14 -0
  46. package/lib/mcp/credentials/session-cache.js +42 -0
  47. package/lib/mcp/{tools/credentials → credentials}/status.d.ts +1 -1
  48. package/lib/mcp/credentials/status.js +76 -0
  49. package/lib/mcp/instructions.d.ts +1 -0
  50. package/lib/mcp/instructions.js +11 -0
  51. package/lib/mcp/register.d.ts +38 -0
  52. package/lib/mcp/register.js +80 -0
  53. package/lib/mcp/server.d.ts +2 -8
  54. package/lib/mcp/server.js +3 -33
  55. package/lib/mcp/start.js +17 -11
  56. package/lib/mcp/tools/agent/build.d.ts +5 -9
  57. package/lib/mcp/tools/agent/build.js +7 -24
  58. package/lib/mcp/tools/agent/index.d.ts +2 -0
  59. package/lib/mcp/tools/agent/index.js +3 -0
  60. package/lib/mcp/tools/agent/proof.js +3 -7
  61. package/lib/mcp/tools/agent/propose.js +13 -2
  62. package/lib/mcp/tools/agent/publish.js +172 -75
  63. package/lib/mcp/tools/agent/replay.js +0 -5
  64. package/lib/mcp/tools/analyze.d.ts +3 -0
  65. package/lib/mcp/tools/analyze.js +26 -0
  66. package/lib/mcp/tools/attach.d.ts +11 -0
  67. package/lib/mcp/tools/attach.js +72 -0
  68. package/lib/mcp/tools/authenticate/authenticate.js +107 -0
  69. package/lib/mcp/tools/authenticate/build.d.ts +15 -0
  70. package/lib/mcp/tools/authenticate/build.js +28 -0
  71. package/lib/mcp/tools/authenticate/decrypt-key.d.ts +19 -0
  72. package/lib/mcp/tools/authenticate/decrypt-key.js +46 -0
  73. package/lib/mcp/tools/authenticate/eth-key.d.ts +31 -0
  74. package/lib/mcp/tools/authenticate/eth-key.js +116 -0
  75. package/lib/mcp/tools/authenticate/import.js +57 -0
  76. package/lib/mcp/tools/authenticate/index.d.ts +2 -0
  77. package/lib/mcp/tools/authenticate/index.js +4 -0
  78. package/lib/mcp/tools/authenticate/issue.js +42 -0
  79. package/lib/mcp/tools/authenticate/resolve-owner-key.d.ts +13 -0
  80. package/lib/mcp/tools/authenticate/resolve-owner-key.js +53 -0
  81. package/lib/mcp/tools/capture.d.ts +10 -0
  82. package/lib/mcp/tools/capture.js +142 -0
  83. package/lib/mcp/tools/eval.d.ts +5 -0
  84. package/lib/mcp/tools/eval.js +127 -0
  85. package/lib/mcp/tools/find.d.ts +3 -0
  86. package/lib/mcp/tools/find.js +60 -0
  87. package/lib/mcp/tools/index.d.ts +3 -0
  88. package/lib/mcp/tools/index.js +6 -0
  89. package/lib/mcp/tools/owner-key.d.ts +2 -0
  90. package/lib/mcp/tools/owner-key.js +63 -0
  91. package/lib/mcp/tools/proof.d.ts +3 -0
  92. package/lib/mcp/tools/proof.js +214 -0
  93. package/lib/mcp/tools/propose.d.ts +9 -0
  94. package/lib/mcp/tools/propose.js +75 -0
  95. package/lib/mcp/tools/publish.d.ts +3 -0
  96. package/lib/mcp/tools/publish.js +59 -0
  97. package/lib/mcp/tools/replay.d.ts +3 -0
  98. package/lib/mcp/tools/replay.js +46 -0
  99. package/lib/mcp/tools/session.d.ts +10 -0
  100. package/lib/mcp/tools/session.js +29 -0
  101. package/lib/mcp/tools/verification/build.d.ts +12 -0
  102. package/lib/mcp/tools/verification/build.js +14 -0
  103. package/lib/mcp/tools/verification/diagnose.d.ts +11 -0
  104. package/lib/mcp/tools/verification/diagnose.js +132 -0
  105. package/lib/mcp/tools/verification/index.d.ts +1 -0
  106. package/lib/mcp/tools/verification/index.js +2 -0
  107. package/lib/mcp/tools/verification/result.d.ts +11 -0
  108. package/lib/mcp/tools/verification/result.js +126 -0
  109. package/lib/mcp/verifications/build.d.ts +5 -0
  110. package/lib/mcp/verifications/build.js +14 -0
  111. package/lib/mcp/verifications/create.d.ts +3 -0
  112. package/lib/mcp/verifications/create.js +57 -0
  113. package/lib/mcp/verifications/find.d.ts +3 -0
  114. package/lib/mcp/verifications/find.js +37 -0
  115. package/lib/mcp/verifications/get.d.ts +3 -0
  116. package/lib/mcp/verifications/get.js +26 -0
  117. package/lib/mcp/verifications/update.d.ts +3 -0
  118. package/lib/mcp/verifications/update.js +78 -0
  119. package/lib/old/client.d.ts +3 -0
  120. package/lib/old/flag.d.ts +4 -1
  121. package/lib/old/flag.js +4 -3
  122. package/lib/old/identity.d.ts +0 -10
  123. package/lib/old/identity.js +8 -7
  124. package/lib/old/instructions.d.ts +0 -6
  125. package/lib/old/instructions.js +6 -24
  126. package/lib/old/login-cdp.d.ts +0 -3
  127. package/lib/old/login-cdp.js +2 -4
  128. package/lib/old/to-register.d.ts +3 -0
  129. package/lib/old/to-register.js +32 -7
  130. package/lib/old/tools/authenticate.js +2 -1
  131. package/lib/old/tools/publish.js +71 -10
  132. package/lib/paths.js +2 -2
  133. package/lib/proof/attestor.d.ts +33 -1
  134. package/lib/proof/attestor.js +67 -64
  135. package/lib/proof/index.d.ts +5 -0
  136. package/lib/proof/index.js +6 -0
  137. package/lib/proof/proof-core.d.ts +35 -0
  138. package/lib/proof/proof-core.js +84 -0
  139. package/lib/provider/index.d.ts +5 -0
  140. package/lib/provider/index.js +9 -0
  141. package/lib/provider/injection-doc.d.ts +1 -0
  142. package/lib/provider/injection-doc.js +17 -0
  143. package/lib/provider/match-redaction-warning.d.ts +25 -0
  144. package/lib/provider/match-redaction-warning.js +35 -0
  145. package/lib/provider/schema.d.ts +16 -0
  146. package/lib/provider/schema.js +11 -1
  147. package/lib/provider/to-version.d.ts +61 -12
  148. package/lib/provider/to-version.js +109 -24
  149. package/lib/provider/verification-checks.d.ts +12 -0
  150. package/lib/provider/verification-checks.js +30 -0
  151. package/lib/routes.gen.d.ts +271 -0
  152. package/lib/routes.gen.js +73 -0
  153. package/lib/types/openapi.gen.d.ts +3967 -0
  154. package/lib/types/openapi.gen.js +5 -0
  155. package/package.json +16 -7
  156. package/skill/SKILL.md +35 -14
  157. package/skill/builder-mode.md +13 -0
  158. package/skill/injection-api.md +42 -0
  159. package/skill/old-mode.md +15 -0
  160. package/src/cdp/capture-engine.ts +256 -0
  161. package/src/cdp/capture.ts +25 -185
  162. package/src/cdp/index.ts +6 -0
  163. package/src/cdp/launcher.ts +5 -4
  164. package/src/config/store.ts +7 -6
  165. package/src/consts.ts +164 -0
  166. package/src/index.ts +2 -4
  167. package/src/logger.ts +2 -1
  168. package/src/mcp/api/operations.gen.ts +1155 -194
  169. package/src/mcp/api/to-zod.ts +115 -0
  170. package/src/mcp/api/tools.ts +9 -3
  171. package/src/mcp/instructions.ts +15 -0
  172. package/src/mcp/server.ts +5 -50
  173. package/src/mcp/start.ts +27 -11
  174. package/src/mcp/tools/agent/build.ts +7 -27
  175. package/src/mcp/tools/agent/index.ts +4 -0
  176. package/src/mcp/tools/agent/proof.ts +3 -8
  177. package/src/mcp/tools/agent/propose.ts +13 -2
  178. package/src/mcp/tools/agent/publish.ts +218 -92
  179. package/src/mcp/tools/agent/replay.ts +0 -5
  180. package/src/mcp/tools/{credentials → authenticate}/authenticate.ts +9 -8
  181. package/src/mcp/tools/authenticate/build.ts +32 -0
  182. package/src/mcp/tools/authenticate/decrypt-key.ts +59 -0
  183. package/src/mcp/tools/authenticate/eth-key.ts +162 -0
  184. package/src/mcp/tools/authenticate/import.ts +73 -0
  185. package/src/mcp/tools/authenticate/index.ts +4 -0
  186. package/src/mcp/tools/authenticate/issue.ts +50 -0
  187. package/src/mcp/tools/authenticate/resolve-owner-key.ts +60 -0
  188. package/src/mcp/tools/index.ts +6 -0
  189. package/src/mcp/tools/verification/build.ts +16 -0
  190. package/src/mcp/tools/verification/index.ts +2 -0
  191. package/src/mcp/tools/verification/result.ts +154 -0
  192. package/src/old/client.ts +3 -0
  193. package/src/old/flag.ts +4 -3
  194. package/src/old/identity.ts +8 -7
  195. package/src/old/instructions.ts +10 -25
  196. package/src/old/login-cdp.ts +2 -5
  197. package/src/old/to-register.ts +58 -26
  198. package/src/old/tools/authenticate.ts +2 -1
  199. package/src/old/tools/publish.ts +92 -16
  200. package/src/paths.ts +2 -2
  201. package/src/proof/attestor.ts +114 -72
  202. package/src/proof/index.ts +21 -0
  203. package/src/proof/proof-core.ts +119 -0
  204. package/src/provider/index.ts +20 -0
  205. package/src/provider/injection-doc.ts +21 -0
  206. package/src/provider/match-redaction-warning.ts +53 -0
  207. package/src/provider/schema.ts +23 -0
  208. package/src/provider/to-version.ts +180 -33
  209. package/src/provider/verification-checks.ts +36 -0
  210. package/lib/mcp/tools/credentials/build.d.ts +0 -16
  211. package/lib/mcp/tools/credentials/build.js +0 -33
  212. package/lib/mcp/tools/credentials/status.js +0 -62
  213. package/src/mcp/tools/credentials/build.ts +0 -37
  214. package/src/mcp/tools/credentials/cache.ts +0 -161
  215. package/src/mcp/tools/credentials/env-file.ts +0 -101
  216. package/src/mcp/tools/credentials/import.ts +0 -72
  217. package/src/mcp/tools/credentials/issue.ts +0 -107
  218. package/src/mcp/tools/credentials/list-cached.ts +0 -66
  219. package/src/mcp/tools/credentials/register.ts +0 -49
  220. package/src/mcp/tools/credentials/resolve-owner-key.ts +0 -78
  221. package/src/mcp/tools/credentials/status.ts +0 -82
  222. package/src/types/openapi.ts +0 -7
  223. /package/lib/mcp/{tools/credentials → credentials}/env-file.d.ts +0 -0
  224. /package/lib/mcp/{tools/credentials → credentials}/env-file.js +0 -0
  225. /package/lib/mcp/{tools/credentials → credentials}/register.d.ts +0 -0
  226. /package/lib/mcp/{tools/credentials → credentials}/register.js +0 -0
  227. /package/lib/mcp/tools/{credentials → authenticate}/authenticate.d.ts +0 -0
  228. /package/lib/mcp/tools/{credentials → authenticate}/import.d.ts +0 -0
  229. /package/lib/mcp/tools/{credentials → authenticate}/issue.d.ts +0 -0
  230. /package/lib/mcp/tools/{credentials → authenticate}/session-cache.d.ts +0 -0
  231. /package/lib/mcp/tools/{credentials → authenticate}/session-cache.js +0 -0
  232. /package/src/mcp/tools/{credentials → authenticate}/session-cache.ts +0 -0
@@ -3,7 +3,7 @@
3
3
  // Run `npm run openapi:typegen --workspace=packages/agent`
4
4
  // to regenerate. Do not edit by hand.
5
5
  // @ts-nocheck
6
- import { convertJsonSchemaToZod as toZod } from 'zod-from-json-schema';
6
+ import { toZod } from "./to-zod.js";
7
7
  export const MCP_TOOLS = {
8
8
  "AddOrgMember": {
9
9
  description: "Invite a member to an organization\n\nOwner only. Invites a user to the organization by email. The invitee does **not** need to be a registered user — an invite is created in either case, and an email is dispatched. The new row is returned with `status: PENDING`; it flips to `ACTIVE` on first sign-in by the invited email. `PERSONAL` organizations reject this call (409). In the current milestone the email is not actually dispatched — the invite is auto-claimed when the invitee next signs in.",
@@ -160,6 +160,46 @@ export const MCP_TOOLS = {
160
160
  "additionalProperties": false
161
161
  }),
162
162
  },
163
+ "AdminSessions": {
164
+ description: "Explore verification sessions (admin-only)\n\nAdmin only. Search verification sessions across all organizations — paste a session id, provider id, or consumer ETH address into `q`, optionally filter by `status`. Rows link to the org-scoped session detail page (admins can open any org's pages). Capped at 100, newest first.",
165
+ inputSchema: toZod({
166
+ "type": "object",
167
+ "properties": {
168
+ "params": {
169
+ "type": "object",
170
+ "properties": {}
171
+ },
172
+ "query": {
173
+ "type": "object",
174
+ "properties": {
175
+ "q": {
176
+ "type": "string",
177
+ "maxLength": 100
178
+ },
179
+ "status": {
180
+ "type": "string",
181
+ "description": "Status of a verification session, derived from its events. New values\nmay be added over time; clients MUST tolerate unknown values in\nresponses.\n\n- `pending`: Created, not yet finished; completable until `expiresAt`.\n\n- `success`: Terminal — `verification_success` recorded.\n\n- `rejected`: Terminal — `verification_rejected` recorded.\n\n- `error`: Terminal — `verification_error` recorded.\n\n- `expired`: `expiresAt` passed before a terminal event; the end-user\n can no longer complete it.",
182
+ "enum": [
183
+ "pending",
184
+ "success",
185
+ "rejected",
186
+ "error",
187
+ "expired"
188
+ ]
189
+ }
190
+ }
191
+ },
192
+ "body": {
193
+ "type": "object"
194
+ }
195
+ },
196
+ "required": [
197
+ "params",
198
+ "query"
199
+ ],
200
+ "additionalProperties": false
201
+ }),
202
+ },
163
203
  "CancelPublicListingRequest": {
164
204
  description: "Cancel a pending public listing review request\n\nCancels a pending public listing request by moving the version from `in_review` back to `draft`. Only org members can cancel their own review requests. This allows users to withdraw a request before admin review if they change their mind.",
165
205
  inputSchema: toZod({
@@ -233,6 +273,68 @@ export const MCP_TOOLS = {
233
273
  "additionalProperties": false
234
274
  }),
235
275
  },
276
+ "CreateCallbackSubscription": {
277
+ description: "Register a callback subscription\n\nRegisters a destination for verification results on the organization\nthe presented `OrgToken` resolves to. The body is just `callbackUrl`\nand `events`. At least one subscription must exist for the org before a\nverification session can be created. Delivery is scoped by org: terminal\nresults are ECIES-encrypted to the org's eth public key when its\n`canEncryptResult` is enabled (see `PUT /orgs/{orgId}/keypair`), else\ndelivered as plaintext.\n",
278
+ inputSchema: toZod({
279
+ "type": "object",
280
+ "properties": {
281
+ "params": {
282
+ "type": "object",
283
+ "properties": {}
284
+ },
285
+ "query": {
286
+ "type": "object",
287
+ "properties": {}
288
+ },
289
+ "body": {
290
+ "type": "object",
291
+ "additionalProperties": false,
292
+ "description": "Body for `POST /verifications/callback-subscriptions`. The owning organization is resolved from the presented `OrgToken`; delivery is scoped to that org and encrypted to its credential when set.",
293
+ "required": [
294
+ "callbackUrl",
295
+ "events"
296
+ ],
297
+ "properties": {
298
+ "callbackUrl": {
299
+ "type": "string",
300
+ "format": "uri",
301
+ "maxLength": 2000
302
+ },
303
+ "events": {
304
+ "type": "array",
305
+ "minItems": 1,
306
+ "maxItems": 12,
307
+ "items": {
308
+ "type": "string",
309
+ "description": "Lifecycle event reported for a verification session. A healthy run\nproceeds through these in order; reading the gaps locates where a\nsession stalled. Session-level terminal events trigger callback\ndelivery; provider-/request-level events are progress pings carrying a\n`provider_id` (and `request_id` for request-level ones) in their event\ndata. New values may be added over time; clients MUST tolerate unknown\nvalues in responses.\n\n- `session_pending`: Session created; awaiting the end-user.\n\n- `verification_client_opened`: The end-user opened the link. Absent ⇒\n the link was never opened.\n\n- `verification_client_ready`: The client initialized.\n\n- `verification_provider_started`: The client began verifying a provider\n (`provider_id`/`resolved_version`/`ordinal` in `eventData`). One per\n provider, in run order, for multi-provider sessions.\n\n- `request_matched`: The target request was captured on the provider\n site. Absent (after opened) ⇒ the user didn't complete the journey.\n\n- `request_claim_created`: A proof claim was started.\n\n- `request_claim_completed`: A proof claim finished.\n\n- `request_claim_rejected`: A claim was rejected (detail in `eventData`).\n\n- `request_claim_failed`: A claim errored (detail in `eventData`).\n\n- `verification_success`: Terminal — verified. Triggers callback delivery.\n\n- `verification_rejected`: Terminal — rejected (detail in `eventData`).\n\n- `verification_error`: Terminal — errored (detail in `eventData`).\n\n- `session_expired`: `expiresAt` passed before a terminal event.",
310
+ "enum": [
311
+ "session_pending",
312
+ "verification_client_opened",
313
+ "verification_client_ready",
314
+ "verification_provider_started",
315
+ "request_matched",
316
+ "request_claim_created",
317
+ "request_claim_completed",
318
+ "request_claim_rejected",
319
+ "request_claim_failed",
320
+ "verification_success",
321
+ "verification_rejected",
322
+ "verification_error",
323
+ "session_expired"
324
+ ]
325
+ }
326
+ }
327
+ }
328
+ }
329
+ },
330
+ "required": [
331
+ "params",
332
+ "query",
333
+ "body"
334
+ ],
335
+ "additionalProperties": false
336
+ }),
337
+ },
236
338
  "CreateOrg": {
237
339
  description: "Create an organization\n\nCreates a new `ORG`-kind organization with the caller as its first `OWNER`. The personal org is created automatically at user signup and is not created via this endpoint.",
238
340
  inputSchema: toZod({
@@ -249,14 +351,97 @@ export const MCP_TOOLS = {
249
351
  "body": {
250
352
  "type": "object",
251
353
  "additionalProperties": false,
354
+ "description": "Body for `POST /orgs`. Explicitly-created orgs must declare their Ethereum (secp256k1) encryption public key — it identifies the org and, when `canEncryptResult` is enabled, encrypts delivered results.",
252
355
  "required": [
253
- "name"
356
+ "name",
357
+ "publicKey"
254
358
  ],
255
359
  "properties": {
256
360
  "name": {
257
361
  "type": "string",
258
362
  "minLength": 1,
259
363
  "maxLength": 200
364
+ },
365
+ "publicKey": {
366
+ "type": "string",
367
+ "description": "The org's eth public key, uncompressed hex (`0x04` + 128 hex) — the eth-native form wallets/ethers emit. The matching private key never leaves the consumer.",
368
+ "pattern": "^0x04[0-9a-fA-F]{128}$"
369
+ },
370
+ "canEncryptResult": {
371
+ "type": "boolean",
372
+ "description": "When true, terminal results are ECIES-encrypted to this key; when false (the default), they are delivered as plaintext.",
373
+ "default": false
374
+ }
375
+ }
376
+ }
377
+ },
378
+ "required": [
379
+ "params",
380
+ "query",
381
+ "body"
382
+ ],
383
+ "additionalProperties": false
384
+ }),
385
+ },
386
+ "CreateOrgCallbackSubscription": {
387
+ description: "Register a callback subscription on an organization\n\nRegisters a destination for verification results on the organization. Caller must be an active member of the org. The body is just `callbackUrl` and `events`; delivery is scoped to the org and encrypted as a compact JWE to the org's encryption credential when set, else delivered as plaintext.",
388
+ inputSchema: toZod({
389
+ "type": "object",
390
+ "properties": {
391
+ "params": {
392
+ "type": "object",
393
+ "properties": {
394
+ "orgId": {
395
+ "type": "string",
396
+ "format": "uuid"
397
+ }
398
+ },
399
+ "required": [
400
+ "orgId"
401
+ ],
402
+ "additionalProperties": false
403
+ },
404
+ "query": {
405
+ "type": "object",
406
+ "properties": {}
407
+ },
408
+ "body": {
409
+ "type": "object",
410
+ "additionalProperties": false,
411
+ "description": "Body for `POST /orgs/{orgId}/callback-subscriptions`. The owning organization comes from the path; bearer-authenticated and gated on org membership. Delivery is scoped to the org and encrypted to its credential when set.",
412
+ "required": [
413
+ "callbackUrl",
414
+ "events"
415
+ ],
416
+ "properties": {
417
+ "callbackUrl": {
418
+ "type": "string",
419
+ "format": "uri",
420
+ "maxLength": 2000
421
+ },
422
+ "events": {
423
+ "type": "array",
424
+ "minItems": 1,
425
+ "maxItems": 12,
426
+ "items": {
427
+ "type": "string",
428
+ "description": "Lifecycle event reported for a verification session. A healthy run\nproceeds through these in order; reading the gaps locates where a\nsession stalled. Session-level terminal events trigger callback\ndelivery; provider-/request-level events are progress pings carrying a\n`provider_id` (and `request_id` for request-level ones) in their event\ndata. New values may be added over time; clients MUST tolerate unknown\nvalues in responses.\n\n- `session_pending`: Session created; awaiting the end-user.\n\n- `verification_client_opened`: The end-user opened the link. Absent ⇒\n the link was never opened.\n\n- `verification_client_ready`: The client initialized.\n\n- `verification_provider_started`: The client began verifying a provider\n (`provider_id`/`resolved_version`/`ordinal` in `eventData`). One per\n provider, in run order, for multi-provider sessions.\n\n- `request_matched`: The target request was captured on the provider\n site. Absent (after opened) ⇒ the user didn't complete the journey.\n\n- `request_claim_created`: A proof claim was started.\n\n- `request_claim_completed`: A proof claim finished.\n\n- `request_claim_rejected`: A claim was rejected (detail in `eventData`).\n\n- `request_claim_failed`: A claim errored (detail in `eventData`).\n\n- `verification_success`: Terminal — verified. Triggers callback delivery.\n\n- `verification_rejected`: Terminal — rejected (detail in `eventData`).\n\n- `verification_error`: Terminal — errored (detail in `eventData`).\n\n- `session_expired`: `expiresAt` passed before a terminal event.",
429
+ "enum": [
430
+ "session_pending",
431
+ "verification_client_opened",
432
+ "verification_client_ready",
433
+ "verification_provider_started",
434
+ "request_matched",
435
+ "request_claim_created",
436
+ "request_claim_completed",
437
+ "request_claim_rejected",
438
+ "request_claim_failed",
439
+ "verification_success",
440
+ "verification_rejected",
441
+ "verification_error",
442
+ "session_expired"
443
+ ]
444
+ }
260
445
  }
261
446
  }
262
447
  }
@@ -542,9 +727,9 @@ export const MCP_TOOLS = {
542
727
  }
543
728
  }
544
729
  },
545
- "matches": {
730
+ "responseMatches": {
546
731
  "type": "array",
547
- "description": "A list of match conditions for the response.",
732
+ "description": "Conditions the (redacted) response must satisfy for the proof to be valid. Each runs against the union of the portions revealed by `responseRedactions` (or the whole response when there are none). Mirrors attestor-core `responseMatches`.",
548
733
  "minItems": 1,
549
734
  "items": {
550
735
  "type": "object",
@@ -582,9 +767,170 @@ export const MCP_TOOLS = {
582
767
  "value": {
583
768
  "type": "string",
584
769
  "description": "The pattern or value to look for in the response. When `type` is 'contains', supports template variable declaration using `{{variable}}` syntax. When `type` is 'regex', can be used to extract variables using regex named groups."
770
+ }
771
+ }
772
+ }
773
+ },
774
+ "responseRedactions": {
775
+ "type": "array",
776
+ "description": "Portions to select/reveal from the response, applied in order (xPath => jsonPath => regex). Done client-side; only the selected portions (plus the first response line) are sent to the attestor. An independent ordered list — NOT paired 1:1 with `responseMatches`. Mirrors attestor-core `responseRedactions`.",
777
+ "items": {
778
+ "type": "object",
779
+ "additionalProperties": false,
780
+ "description": "Which portions to select from a response. These are selected in order, xpath => jsonPath => regex * These redactions are done client side and only the selected portions are sent to the attestor. The attestor will only be able to see the selected portions alongside the first line of the HTTP response (i.e. \"HTTP/1.1 200 OK\")",
781
+ "properties": {
782
+ "xPath": {
783
+ "type": "string",
784
+ "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
785
+ },
786
+ "jsonPath": {
787
+ "type": "string",
788
+ "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
585
789
  },
586
- "extract": {
790
+ "regex": {
791
+ "type": "string",
792
+ "description": "select a regex match from the response"
793
+ },
794
+ "hash": {
795
+ "type": "string",
796
+ "description": "If provided, the value inside will be hashed instead of being redacted. Useful for cases where the data inside is an identifiying piece of information that you don't want to reveal to the attestor, eg. an email address.\nIf the hash function produces more bytes than the original value, the hash will be truncated.\nEg. if hash is enabled, the original value is \"hello\", and hashed is \"a1b2c\", then the attestor will only see \"a1b2c\".\nNote: if a regex with named groups is provided, only the named groups will be hashed.",
797
+ "enum": [
798
+ "oprf",
799
+ "oprf-mpc",
800
+ "oprf-raw"
801
+ ]
802
+ }
803
+ }
804
+ }
805
+ }
806
+ }
807
+ }
808
+ },
809
+ "allowedJsRequests": {
810
+ "type": "array",
811
+ "minItems": 0,
812
+ "default": [],
813
+ "items": {
814
+ "type": "object",
815
+ "additionalProperties": false,
816
+ "description": "A template for selecting request",
817
+ "allOf": [
818
+ {
819
+ "type": "object",
820
+ "additionalProperties": false,
821
+ "description": "A matcher for one HTTP request in observed traffic, together with the response constraints that must hold for a Reclaim proof over that request to be valid. Used by interceptors, in-page injections, and LLM agents.",
822
+ "required": [
823
+ "url",
824
+ "method"
825
+ ],
826
+ "properties": {
827
+ "url": {
828
+ "type": "string",
829
+ "description": "The URL or generic path of the HTTP request."
830
+ },
831
+ "method": {
832
+ "type": "string",
833
+ "description": "The HTTP method used for the request.",
834
+ "enum": [
835
+ "GET",
836
+ "POST",
837
+ "PUT",
838
+ "PATCH",
839
+ "DELETE"
840
+ ]
841
+ },
842
+ "requestBodyTemplate": {
843
+ "type": "string",
844
+ "description": "Template used to match or capture an outgoing request body. Template can use regex templates as placeholders. For example, to match an outgoing request body that contains a request ID, you can use the following template: `(?<requestId>.*)`.",
845
+ "maxLength": 100000
846
+ },
847
+ "credentials": {
848
+ "type": "string",
849
+ "description": "Mirrors the Fetch API `RequestCredentials` value used when issuing the request — controls whether cookies and auth headers are sent.",
850
+ "enum": [
851
+ "omit",
852
+ "same-origin",
853
+ "include"
854
+ ]
855
+ },
856
+ "writeRedactionMode": {
857
+ "type": "string",
858
+ "description": "How the matched portion of the response should be redacted before the transcript is handed to the attestor.\n- `zk`: redact using a zero-knowledge proof over the original\n bytes.\n\n- `key-update`: redact by performing a TLS key update so the\n attestor never observes the matched bytes in cleartext.",
859
+ "enum": [
860
+ "zk",
861
+ "key-update"
862
+ ]
863
+ },
864
+ "additionalClientOptions": {
865
+ "type": "object",
866
+ "additionalProperties": false,
867
+ "description": "Apply TLS configuration when creating the tunnel to the attestor.",
868
+ "properties": {
869
+ "supportedProtocolVersions": {
870
+ "type": "array",
871
+ "description": "TLS protocol versions the client is allowed to negotiate.",
872
+ "minItems": 1,
873
+ "uniqueItems": true,
874
+ "items": {
875
+ "type": "string",
876
+ "enum": [
877
+ "TLS1_2",
878
+ "TLS1_3"
879
+ ]
880
+ }
881
+ }
882
+ }
883
+ },
884
+ "responseMatches": {
885
+ "type": "array",
886
+ "description": "Conditions the (redacted) response must satisfy for the proof to be valid. Each runs against the union of the portions revealed by `responseRedactions` (or the whole response when there are none). Mirrors attestor-core `responseMatches`.",
887
+ "minItems": 1,
888
+ "items": {
889
+ "type": "object",
890
+ "additionalProperties": false,
891
+ "description": "Specifies a rule to match against a string in response to validate proof content.",
892
+ "required": [
893
+ "type",
894
+ "value"
895
+ ],
896
+ "properties": {
897
+ "isOptional": {
898
+ "type": "boolean",
899
+ "description": "If true, the match condition is optional and won't fail if absent",
900
+ "default": false
901
+ },
902
+ "description": {
903
+ "type": "string",
904
+ "description": "The description of the field that is extracted using this match rule",
905
+ "minLength": 1,
906
+ "maxLength": 1000
907
+ },
908
+ "order": {
909
+ "type": "integer",
910
+ "description": "The order in which the field should be displayed to user in UI",
911
+ "minimum": 0
912
+ },
913
+ "type": {
914
+ "type": "string",
915
+ "description": "The matching mechanism to use value as against response. Typically regex or simple string containment",
916
+ "enum": [
917
+ "regex",
918
+ "contains"
919
+ ]
920
+ },
921
+ "value": {
922
+ "type": "string",
923
+ "description": "The pattern or value to look for in the response. When `type` is 'contains', supports template variable declaration using `{{variable}}` syntax. When `type` is 'regex', can be used to extract variables using regex named groups."
924
+ }
925
+ }
926
+ }
927
+ },
928
+ "responseRedactions": {
929
+ "type": "array",
930
+ "description": "Portions to select/reveal from the response, applied in order (xPath => jsonPath => regex). Done client-side; only the selected portions (plus the first response line) are sent to the attestor. An independent ordered list — NOT paired 1:1 with `responseMatches`. Mirrors attestor-core `responseRedactions`.",
931
+ "items": {
587
932
  "type": "object",
933
+ "additionalProperties": false,
588
934
  "description": "Which portions to select from a response. These are selected in order, xpath => jsonPath => regex * These redactions are done client side and only the selected portions are sent to the attestor. The attestor will only be able to see the selected portions alongside the first line of the HTTP response (i.e. \"HTTP/1.1 200 OK\")",
589
935
  "properties": {
590
936
  "xPath": {
@@ -612,21 +958,6 @@ export const MCP_TOOLS = {
612
958
  }
613
959
  }
614
960
  }
615
- }
616
- }
617
- }
618
- },
619
- "allowedJsRequests": {
620
- "type": "array",
621
- "minItems": 0,
622
- "default": [],
623
- "items": {
624
- "type": "object",
625
- "additionalProperties": false,
626
- "description": "A template for selecting request",
627
- "allOf": [
628
- {
629
- "$ref": "#/components/schemas/RequestSelection"
630
961
  },
631
962
  {
632
963
  "type": "object",
@@ -658,7 +989,8 @@ export const MCP_TOOLS = {
658
989
  "geoLocation": {
659
990
  "type": "string",
660
991
  "description": "Geographic location (e.g. ISO country code or {{DYNAMIC_GEO}} to use user's geo location) the verification should appear to originate from.",
661
- "maxLength": 15
992
+ "maxLength": 15,
993
+ "default": "{{DYNAMIC_GEO}}"
662
994
  },
663
995
  "clientOptions": {
664
996
  "type": "object",
@@ -673,7 +1005,7 @@ export const MCP_TOOLS = {
673
1005
  "useProxy": {
674
1006
  "type": "boolean",
675
1007
  "description": "When true, network traffic from the portal client and attestation is routed through a proxy.",
676
- "default": false
1008
+ "default": true
677
1009
  },
678
1010
  "userAgent": {
679
1011
  "type": "string",
@@ -743,14 +1075,10 @@ export const MCP_TOOLS = {
743
1075
  }
744
1076
  }
745
1077
  },
746
- "requiredParameters": {
1078
+ "requiredContext": {
747
1079
  "type": "object",
748
- "description": "Map of parameter names needed (optional or required) to use this provider to their human-readable descriptions/labels. Values are plain strings shown alongside the field in dashboards and prompts.",
749
- "maxProperties": 50,
750
- "additionalProperties": {
751
- "type": "string",
752
- "maxLength": 500
753
- }
1080
+ "description": "Optional JSON Schema describing the `context` a Consumer must supply when creating a verification session for this provider version. Only needed when the recipe expects Consumer-supplied values: those are referenced as `{{context.<key>}}` in recipe requests. Bare `{{parameterName}}` placeholders are provider parameters (extracted / not Consumer-supplied) and need no declaration here. The Builder validates `CreateVerificationSessionRequest.context` against this schema and rejects the request (400) on mismatch. Extra context fields are always allowed regardless of the schema (a root-level `additionalProperties: false` is ignored). Empty/absent accepts any context.",
1081
+ "additionalProperties": true
754
1082
  },
755
1083
  "notes": {
756
1084
  "type": "string",
@@ -768,29 +1096,14 @@ export const MCP_TOOLS = {
768
1096
  "additionalProperties": false
769
1097
  }),
770
1098
  },
771
- "DecideProviderVersionReview": {
772
- description: "Record a decision on a verification version review\n\nAdmin only (Reclaim staff). Approves or rejects a verification version currently on the `in_review` branch. `APPROVED` clears the branch tag and promotes the version to the live channel; `REJECTED` moves it to the `rejected` branch where the author can address feedback and resubmit. A rejected version stays rejected — the author either fixes and resubmits, or abandons it.\nUntil RBAC is designed, \"admin\" is detected via the user's email domain (`@reclaimprotocol.org`). Non-admin callers receive a 403.",
1099
+ "CreateVerificationSession": {
1100
+ description: "Create a verification session\n\nCreates a verification session for an end-user to complete.\nAuthenticated by the consumer's `OrgToken`; the session is scoped to\nthe resolved organization. The request carries no callback URLs —\nresults are delivered to the org's pre-registered callback\nsubscriptions.\n\n curl -X POST $BASE/verifications/sessions \\\n -H \"Authorization: Bearer $ORG_TOKEN\" \\\n -H 'Content-Type: application/json' \\\n -d '{\"providerId\":\"…\",\"context\":{},\n \"verificationClientUrl\":\"'$BASE'/v/{sessionId}\"}'\n\nFails with `409 Conflict` if the organization has no callback\nsubscription (there would be nowhere to deliver the result).\n",
773
1101
  inputSchema: toZod({
774
1102
  "type": "object",
775
1103
  "properties": {
776
1104
  "params": {
777
1105
  "type": "object",
778
- "properties": {
779
- "providerId": {
780
- "type": "string",
781
- "format": "uuid"
782
- },
783
- "version": {
784
- "type": "string",
785
- "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[a-zA-Z0-9_-]+(?:\\.[0-9]+)?)?$",
786
- "maxLength": 32
787
- }
788
- },
789
- "required": [
790
- "providerId",
791
- "version"
792
- ],
793
- "additionalProperties": false
1106
+ "properties": {}
794
1107
  },
795
1108
  "query": {
796
1109
  "type": "object",
@@ -799,20 +1112,103 @@ export const MCP_TOOLS = {
799
1112
  "body": {
800
1113
  "type": "object",
801
1114
  "additionalProperties": false,
802
- "description": "Body for recording a decision on a provider version in `in_review`. On `APPROVED` the branch tag is cleared and the version is promoted to the live channel (becomes public). On `REJECTED` the branch becomes `rejected`.",
1115
+ "description": "Body for `POST /verifications/sessions`. Authenticated by the consumer's `OrgToken`. Carries no callback URLs — they come from the org's callback subscriptions. The one shared `context` is validated against every provider's `requiredContext`.",
803
1116
  "required": [
804
- "decision"
1117
+ "providers",
1118
+ "context",
1119
+ "verificationClientUrl"
805
1120
  ],
806
1121
  "properties": {
807
- "decision": {
808
- "type": "string",
809
- "enum": [
810
- "APPROVED",
811
- "REJECTED"
812
- ]
1122
+ "providers": {
1123
+ "type": "array",
1124
+ "minItems": 1,
1125
+ "description": "Providers to verify, in run order. The Verification Client runs each sequentially in one browser session and submits one combined result; all are required.",
1126
+ "items": {
1127
+ "type": "object",
1128
+ "additionalProperties": false,
1129
+ "description": "A provider (+ optional version) to verify in a session.",
1130
+ "required": [
1131
+ "providerId"
1132
+ ],
1133
+ "properties": {
1134
+ "providerId": {
1135
+ "type": "string",
1136
+ "format": "uuid"
1137
+ },
1138
+ "version": {
1139
+ "type": "string",
1140
+ "description": "Semver constraint; empty resolves to the latest trunk version.",
1141
+ "maxLength": 64
1142
+ }
1143
+ }
1144
+ }
813
1145
  },
814
- "notes": {
815
- "type": "string",
1146
+ "context": {
1147
+ "type": "object",
1148
+ "additionalProperties": true,
1149
+ "description": "Consumer context, shared by all providers. Validated against EACH resolved provider version's `requiredContext` JSON Schema (a 400 is returned on mismatch); extra fields are always allowed. Recipe requests reference these values as `{{context.<key>}}`. Echoed back (plus `reclaimSessionId`) in the result."
1150
+ },
1151
+ "verificationClientUrl": {
1152
+ "type": "string",
1153
+ "description": "Must contain a `{sessionId}` placeholder. Must be an http(s) URL.",
1154
+ "maxLength": 2000
1155
+ }
1156
+ }
1157
+ }
1158
+ },
1159
+ "required": [
1160
+ "params",
1161
+ "query",
1162
+ "body"
1163
+ ],
1164
+ "additionalProperties": false
1165
+ }),
1166
+ },
1167
+ "DecideProviderVersionReview": {
1168
+ description: "Record a decision on a verification version review\n\nAdmin only (Reclaim staff). Approves or rejects a verification version currently on the `in_review` branch. `APPROVED` clears the branch tag and promotes the version to the live channel; `REJECTED` moves it to the `rejected` branch where the author can address feedback and resubmit. A rejected version stays rejected — the author either fixes and resubmits, or abandons it.\nUntil RBAC is designed, \"admin\" is detected via the user's email domain (`@reclaimprotocol.org`). Non-admin callers receive a 403.",
1169
+ inputSchema: toZod({
1170
+ "type": "object",
1171
+ "properties": {
1172
+ "params": {
1173
+ "type": "object",
1174
+ "properties": {
1175
+ "providerId": {
1176
+ "type": "string",
1177
+ "format": "uuid"
1178
+ },
1179
+ "version": {
1180
+ "type": "string",
1181
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[a-zA-Z0-9_-]+(?:\\.[0-9]+)?)?$",
1182
+ "maxLength": 32
1183
+ }
1184
+ },
1185
+ "required": [
1186
+ "providerId",
1187
+ "version"
1188
+ ],
1189
+ "additionalProperties": false
1190
+ },
1191
+ "query": {
1192
+ "type": "object",
1193
+ "properties": {}
1194
+ },
1195
+ "body": {
1196
+ "type": "object",
1197
+ "additionalProperties": false,
1198
+ "description": "Body for recording a decision on a provider version in `in_review`. On `APPROVED` the branch tag is cleared and the version is promoted to the live channel (becomes public). On `REJECTED` the branch becomes `rejected`.",
1199
+ "required": [
1200
+ "decision"
1201
+ ],
1202
+ "properties": {
1203
+ "decision": {
1204
+ "type": "string",
1205
+ "enum": [
1206
+ "APPROVED",
1207
+ "REJECTED"
1208
+ ]
1209
+ },
1210
+ "notes": {
1211
+ "type": "string",
816
1212
  "description": "Free-form rationale shown to the author.",
817
1213
  "maxLength": 10000
818
1214
  }
@@ -827,6 +1223,112 @@ export const MCP_TOOLS = {
827
1223
  "additionalProperties": false
828
1224
  }),
829
1225
  },
1226
+ "DeleteCallbackSubscription": {
1227
+ description: "Delete a callback subscription\n\nRemoves a callback subscription. Authenticated by the org's `OrgToken`; the subscription must belong to that organization.",
1228
+ inputSchema: toZod({
1229
+ "type": "object",
1230
+ "properties": {
1231
+ "params": {
1232
+ "type": "object",
1233
+ "properties": {
1234
+ "subscriptionId": {
1235
+ "type": "string",
1236
+ "format": "uuid",
1237
+ "description": "Stable id for a callback subscription."
1238
+ }
1239
+ },
1240
+ "required": [
1241
+ "subscriptionId"
1242
+ ],
1243
+ "additionalProperties": false
1244
+ },
1245
+ "query": {
1246
+ "type": "object",
1247
+ "properties": {}
1248
+ },
1249
+ "body": {
1250
+ "type": "object"
1251
+ }
1252
+ },
1253
+ "required": [
1254
+ "params",
1255
+ "query"
1256
+ ],
1257
+ "additionalProperties": false
1258
+ }),
1259
+ },
1260
+ "DeleteOrgCallbackSubscription": {
1261
+ description: "Delete an organization's callback subscription\n\nRemoves a callback subscription. Caller must be an active member of the owning org.",
1262
+ inputSchema: toZod({
1263
+ "type": "object",
1264
+ "properties": {
1265
+ "params": {
1266
+ "type": "object",
1267
+ "properties": {
1268
+ "orgId": {
1269
+ "type": "string",
1270
+ "format": "uuid"
1271
+ },
1272
+ "subscriptionId": {
1273
+ "type": "string",
1274
+ "format": "uuid",
1275
+ "description": "Stable id for a callback subscription."
1276
+ }
1277
+ },
1278
+ "required": [
1279
+ "orgId",
1280
+ "subscriptionId"
1281
+ ],
1282
+ "additionalProperties": false
1283
+ },
1284
+ "query": {
1285
+ "type": "object",
1286
+ "properties": {}
1287
+ },
1288
+ "body": {
1289
+ "type": "object"
1290
+ }
1291
+ },
1292
+ "required": [
1293
+ "params",
1294
+ "query"
1295
+ ],
1296
+ "additionalProperties": false
1297
+ }),
1298
+ },
1299
+ "DeleteOrgKeypair": {
1300
+ description: "Clear the organization's encryption keypair\n\nRemoves the organization's encryption keypair (the org reverts to keyless ⇒ plaintext delivery, and loses its eth identity address) until a new keypair is set. Authenticated by the org's `OrgToken` or a human `BearerAuth` session for an active member of the org.",
1301
+ inputSchema: toZod({
1302
+ "type": "object",
1303
+ "properties": {
1304
+ "params": {
1305
+ "type": "object",
1306
+ "properties": {
1307
+ "orgId": {
1308
+ "type": "string",
1309
+ "format": "uuid"
1310
+ }
1311
+ },
1312
+ "required": [
1313
+ "orgId"
1314
+ ],
1315
+ "additionalProperties": false
1316
+ },
1317
+ "query": {
1318
+ "type": "object",
1319
+ "properties": {}
1320
+ },
1321
+ "body": {
1322
+ "type": "object"
1323
+ }
1324
+ },
1325
+ "required": [
1326
+ "params",
1327
+ "query"
1328
+ ],
1329
+ "additionalProperties": false
1330
+ }),
1331
+ },
830
1332
  "DeleteProvider": {
831
1333
  description: "Delete a verification\n\nOwner of the verification's organization only. Soft-archives the verification (sets `status` to `ARCHIVED`) so historical references remain resolvable. Supports optimistic concurrency via `If-Match`.",
832
1334
  inputSchema: toZod({
@@ -955,24 +1457,14 @@ export const MCP_TOOLS = {
955
1457
  "additionalProperties": false
956
1458
  }),
957
1459
  },
958
- "GetCredential": {
959
- description: "Get a credential\n\nReturns the credential row. Visibility: anyone can fetch an anonymous (`orgId` null) credential by id; linked credentials are visible only to active members of the owning org.",
1460
+ "GetMe": {
1461
+ description: "Get the authenticated user",
960
1462
  inputSchema: toZod({
961
1463
  "type": "object",
962
1464
  "properties": {
963
1465
  "params": {
964
1466
  "type": "object",
965
- "properties": {
966
- "credentialId": {
967
- "type": "string",
968
- "format": "uuid",
969
- "description": "Stable id for a `Credential` row."
970
- }
971
- },
972
- "required": [
973
- "credentialId"
974
- ],
975
- "additionalProperties": false
1467
+ "properties": {}
976
1468
  },
977
1469
  "query": {
978
1470
  "type": "object",
@@ -989,30 +1481,39 @@ export const MCP_TOOLS = {
989
1481
  "additionalProperties": false
990
1482
  }),
991
1483
  },
992
- "GetCredentialByAddress": {
993
- description: "Look up a credential by its lowercase ETH address\n\nCompanion to `GET /credentials/{credentialId}`. The MCP / CLI knows the credential by its address (the public handle the user actually types) rather than by its UUID id, so this shortcut returns the same `Credential` shape keyed on the address. Visibility rules mirror `GetCredential`: anonymous credentials are world-readable; linked credentials are visible only to active members of the owning org. Bumps `lastUsedAt` so the dashboard shows liveness.",
1484
+ "GetOrg": {
1485
+ description: "Get an organization",
994
1486
  inputSchema: toZod({
995
1487
  "type": "object",
996
1488
  "properties": {
997
1489
  "params": {
998
1490
  "type": "object",
999
1491
  "properties": {
1000
- "address": {
1492
+ "orgId": {
1001
1493
  "type": "string",
1002
- "description": "Lowercase Ethereum address (no EIP-55 mixed-case checksum). The client derives this from the public key via keccak-256 of the uncompressed pubkey minus the `0x04` prefix, taking the last 20 bytes. The server re-validates the format on insert but does not re-derive from the public key — that match is the client's responsibility.",
1003
- "pattern": "^0x[0-9a-f]{40}$",
1004
- "minLength": 42,
1005
- "maxLength": 42
1494
+ "format": "uuid"
1006
1495
  }
1007
1496
  },
1008
1497
  "required": [
1009
- "address"
1498
+ "orgId"
1010
1499
  ],
1011
1500
  "additionalProperties": false
1012
1501
  },
1013
1502
  "query": {
1014
1503
  "type": "object",
1015
- "properties": {}
1504
+ "properties": {
1505
+ "tab": {
1506
+ "type": "string",
1507
+ "enum": [
1508
+ "connect",
1509
+ "providers",
1510
+ "members",
1511
+ "themes",
1512
+ "sessions",
1513
+ "billing"
1514
+ ]
1515
+ }
1516
+ }
1016
1517
  },
1017
1518
  "body": {
1018
1519
  "type": "object"
@@ -1025,14 +1526,23 @@ export const MCP_TOOLS = {
1025
1526
  "additionalProperties": false
1026
1527
  }),
1027
1528
  },
1028
- "GetMe": {
1029
- description: "Get the authenticated user",
1529
+ "GetOrgBilling": {
1530
+ description: "Get the billing record for an organization\n\nOwner only. Returns `404` when no billing has been set; presence of the row is what promotes the org's credentials out of sandbox mode (see `Credential.mode`).",
1030
1531
  inputSchema: toZod({
1031
1532
  "type": "object",
1032
1533
  "properties": {
1033
1534
  "params": {
1034
1535
  "type": "object",
1035
- "properties": {}
1536
+ "properties": {
1537
+ "orgId": {
1538
+ "type": "string",
1539
+ "format": "uuid"
1540
+ }
1541
+ },
1542
+ "required": [
1543
+ "orgId"
1544
+ ],
1545
+ "additionalProperties": false
1036
1546
  },
1037
1547
  "query": {
1038
1548
  "type": "object",
@@ -1049,8 +1559,8 @@ export const MCP_TOOLS = {
1049
1559
  "additionalProperties": false
1050
1560
  }),
1051
1561
  },
1052
- "GetOrg": {
1053
- description: "Get an organization",
1562
+ "GetOrgKeypair": {
1563
+ description: "Get the organization's encryption keypair\n\nReturns the organization's single Ethereum (secp256k1) encryption keypair — its public JWK, derived eth address, and `canEncryptResult` flag — or `404` when none is set (the org is keyless ⇒ plaintext delivery). Authenticated by the org's `OrgToken` or a human `BearerAuth` session for an active member of the org.",
1054
1564
  inputSchema: toZod({
1055
1565
  "type": "object",
1056
1566
  "properties": {
@@ -1082,8 +1592,8 @@ export const MCP_TOOLS = {
1082
1592
  "additionalProperties": false
1083
1593
  }),
1084
1594
  },
1085
- "GetOrgBilling": {
1086
- description: "Get the billing record for an organization\n\nOwner only. Returns `404` when no billing has been set; presence of the row is what promotes the org's credentials out of sandbox mode (see `Credential.mode`).",
1595
+ "GetOrgToken": {
1596
+ description: "Get the organization's API token metadata\n\nReturns metadata about the organization's current API token — its last four characters, when it was created, and when it was last used — never the token itself. The caller must be an active **OWNER** of the organization. Returns `404` when no token has been issued.",
1087
1597
  inputSchema: toZod({
1088
1598
  "type": "object",
1089
1599
  "properties": {
@@ -1220,77 +1730,278 @@ export const MCP_TOOLS = {
1220
1730
  "additionalProperties": false
1221
1731
  }),
1222
1732
  },
1223
- "LinkCredential": {
1224
- description: "Link a credential to an organization\n\nLinks an ETH credential to an organization — registering it directly, or attaching an already-known one (matched by `address`). The private key MUST NOT leave the client — only the derived address and uncompressed public key are sent. `orgId` is required and the caller must be allowed to edit it. Idempotent for the same `(address, orgId)`. (Anonymous credentials live client-side; they are only stored here once linked.)",
1733
+ "GetVerificationSession": {
1734
+ description: "Get a verification session\n\nReturns the session. Authenticated by the consumer's `OrgToken` (or the\nVC service token); the resolved org must match the session's.\n\nReading `status`:\n- `pending` — created, not yet finished; the end-user can still\n complete it until `expiresAt`.\n- `success` / `rejected` / `error` — terminal outcomes (the matching\n `verification_*` event was recorded). Only after a terminal status is\n a result delivered to callbacks.\n- `expired` — `expiresAt` passed before a terminal event. A `pending`\n session whose `expiresAt` is in the past has effectively expired and\n flips to `expired` on the next sweep; the end-user can no longer\n complete it — issue a fresh session/link.\n\n`callbackDeliveryStatus` aggregates the session's callback deliveries\nand is only meaningful once the session is terminal. To investigate a\nstuck or failed session, pair this with `list_verification_events` (the\nper-stage lifecycle log) and `list_verification_deliveries` (callback\nhealth).\n",
1225
1735
  inputSchema: toZod({
1226
1736
  "type": "object",
1227
1737
  "properties": {
1228
1738
  "params": {
1739
+ "type": "object",
1740
+ "properties": {
1741
+ "sessionId": {
1742
+ "type": "string",
1743
+ "format": "uuid",
1744
+ "description": "Verification session id (UUID v7 when supported). Also echoed in the result payload as `reclaimSessionId`."
1745
+ }
1746
+ },
1747
+ "required": [
1748
+ "sessionId"
1749
+ ],
1750
+ "additionalProperties": false
1751
+ },
1752
+ "query": {
1229
1753
  "type": "object",
1230
1754
  "properties": {}
1231
1755
  },
1756
+ "body": {
1757
+ "type": "object"
1758
+ }
1759
+ },
1760
+ "required": [
1761
+ "params",
1762
+ "query"
1763
+ ],
1764
+ "additionalProperties": false
1765
+ }),
1766
+ },
1767
+ "IssueOrgToken": {
1768
+ description: "Issue (or regenerate) the organization's API token\n\nIssues a fresh per-organization API token (`rorg_…`). The caller must be an active **OWNER** of the organization. A successful call invalidates any previously issued token for the org. The plaintext token is returned **only once** in this response (the server stores only its HMAC); treat it like a password and store it securely.",
1769
+ inputSchema: toZod({
1770
+ "type": "object",
1771
+ "properties": {
1772
+ "params": {
1773
+ "type": "object",
1774
+ "properties": {
1775
+ "orgId": {
1776
+ "type": "string",
1777
+ "format": "uuid"
1778
+ }
1779
+ },
1780
+ "required": [
1781
+ "orgId"
1782
+ ],
1783
+ "additionalProperties": false
1784
+ },
1232
1785
  "query": {
1233
1786
  "type": "object",
1234
1787
  "properties": {}
1235
1788
  },
1236
1789
  "body": {
1790
+ "type": "object"
1791
+ }
1792
+ },
1793
+ "required": [
1794
+ "params",
1795
+ "query"
1796
+ ],
1797
+ "additionalProperties": false
1798
+ }),
1799
+ },
1800
+ "ListCallbackDlq": {
1801
+ description: "List dead-lettered callbacks (admin-only)\n\nAdmin only. Lists callback deliveries whose retries were exhausted and moved to the DLQ for manual recovery.",
1802
+ inputSchema: toZod({
1803
+ "type": "object",
1804
+ "properties": {
1805
+ "params": {
1237
1806
  "type": "object",
1238
- "additionalProperties": false,
1239
- "description": "Body for `POST /credentials`. Only the lowercase ETH `address` is sent — the private key MUST NOT leave the client, and the public key is not sent (the client derives the address from the key: keccak-256 of the uncompressed pubkey minus its `0x04` prefix, last 20 bytes, lowercase hex).",
1807
+ "properties": {}
1808
+ },
1809
+ "query": {
1810
+ "type": "object",
1811
+ "properties": {}
1812
+ },
1813
+ "body": {
1814
+ "type": "object"
1815
+ }
1816
+ },
1817
+ "required": [
1818
+ "params",
1819
+ "query"
1820
+ ],
1821
+ "additionalProperties": false
1822
+ }),
1823
+ },
1824
+ "ListCallbackSubscriptions": {
1825
+ description: "List callback subscriptions for the organization\n\nReturns every callback subscription owned by the organization the presented `OrgToken` resolves to.",
1826
+ inputSchema: toZod({
1827
+ "type": "object",
1828
+ "properties": {
1829
+ "params": {
1830
+ "type": "object",
1831
+ "properties": {}
1832
+ },
1833
+ "query": {
1834
+ "type": "object",
1835
+ "properties": {}
1836
+ },
1837
+ "body": {
1838
+ "type": "object"
1839
+ }
1840
+ },
1841
+ "required": [
1842
+ "params",
1843
+ "query"
1844
+ ],
1845
+ "additionalProperties": false
1846
+ }),
1847
+ },
1848
+ "ListOrgCallbackSubscriptions": {
1849
+ description: "List an organization's callback subscriptions\n\nReturns every callback subscription owned by the organization. Caller must be an active member of the org.",
1850
+ inputSchema: toZod({
1851
+ "type": "object",
1852
+ "properties": {
1853
+ "params": {
1854
+ "type": "object",
1855
+ "properties": {
1856
+ "orgId": {
1857
+ "type": "string",
1858
+ "format": "uuid"
1859
+ }
1860
+ },
1861
+ "required": [
1862
+ "orgId"
1863
+ ],
1864
+ "additionalProperties": false
1865
+ },
1866
+ "query": {
1867
+ "type": "object",
1868
+ "properties": {}
1869
+ },
1870
+ "body": {
1871
+ "type": "object"
1872
+ }
1873
+ },
1874
+ "required": [
1875
+ "params",
1876
+ "query"
1877
+ ],
1878
+ "additionalProperties": false
1879
+ }),
1880
+ },
1881
+ "ListOrgs": {
1882
+ description: "List organizations the caller belongs to",
1883
+ inputSchema: toZod({
1884
+ "type": "object",
1885
+ "properties": {
1886
+ "params": {
1887
+ "type": "object",
1888
+ "properties": {}
1889
+ },
1890
+ "query": {
1891
+ "type": "object",
1892
+ "properties": {
1893
+ "cursor": {
1894
+ "type": "string",
1895
+ "maxLength": 500
1896
+ }
1897
+ }
1898
+ },
1899
+ "body": {
1900
+ "type": "object"
1901
+ }
1902
+ },
1903
+ "required": [
1904
+ "params",
1905
+ "query"
1906
+ ],
1907
+ "additionalProperties": false
1908
+ }),
1909
+ },
1910
+ "ListOrgVerificationSessions": {
1911
+ description: "List an organization's verification sessions\n\nReturns verification sessions created under the organization, newest first. Optionally filter by `providerId`, `status`, `resolvedVersion`, `claimantClientId`, and a `createdAfter`/`createdBefore` time range. Caller must be an active member of the org. Opaque cursor pagination.\n\nNote: `status` filters on the stored column. A session that has passed `expiresAt` but has not yet been swept is reported as `expired` in its body while still stored as `pending`, so `status=expired` may not match such sessions until the sweep runs.",
1912
+ inputSchema: toZod({
1913
+ "type": "object",
1914
+ "properties": {
1915
+ "params": {
1916
+ "type": "object",
1917
+ "properties": {
1918
+ "orgId": {
1919
+ "type": "string",
1920
+ "format": "uuid"
1921
+ }
1922
+ },
1240
1923
  "required": [
1241
- "address",
1242
1924
  "orgId"
1243
1925
  ],
1926
+ "additionalProperties": false
1927
+ },
1928
+ "query": {
1929
+ "type": "object",
1244
1930
  "properties": {
1245
- "address": {
1931
+ "providerId": {
1246
1932
  "type": "string",
1247
- "description": "Lowercase Ethereum address (no EIP-55 mixed-case checksum). The client derives this from the public key via keccak-256 of the uncompressed pubkey minus the `0x04` prefix, taking the last 20 bytes. The server re-validates the format on insert but does not re-derive from the public key — that match is the client's responsibility.",
1248
- "pattern": "^0x[0-9a-f]{40}$",
1249
- "minLength": 42,
1250
- "maxLength": 42
1933
+ "format": "uuid"
1251
1934
  },
1252
- "orgId": {
1935
+ "status": {
1936
+ "type": "string",
1937
+ "description": "Status of a verification session, derived from its events. New values\nmay be added over time; clients MUST tolerate unknown values in\nresponses.\n\n- `pending`: Created, not yet finished; completable until `expiresAt`.\n\n- `success`: Terminal — `verification_success` recorded.\n\n- `rejected`: Terminal — `verification_rejected` recorded.\n\n- `error`: Terminal — `verification_error` recorded.\n\n- `expired`: `expiresAt` passed before a terminal event; the end-user\n can no longer complete it.",
1938
+ "enum": [
1939
+ "pending",
1940
+ "success",
1941
+ "rejected",
1942
+ "error",
1943
+ "expired"
1944
+ ]
1945
+ },
1946
+ "resolvedVersion": {
1947
+ "type": "string",
1948
+ "maxLength": 64
1949
+ },
1950
+ "claimantClientId": {
1253
1951
  "type": "string",
1254
1952
  "format": "uuid"
1255
1953
  },
1256
- "label": {
1954
+ "createdAfter": {
1257
1955
  "type": "string",
1258
- "description": "Optional human-readable label.",
1259
- "minLength": 1,
1260
- "maxLength": 100
1956
+ "format": "date-time"
1957
+ },
1958
+ "createdBefore": {
1959
+ "type": "string",
1960
+ "format": "date-time"
1961
+ },
1962
+ "cursor": {
1963
+ "type": "string",
1964
+ "maxLength": 500
1261
1965
  }
1262
1966
  }
1967
+ },
1968
+ "body": {
1969
+ "type": "object"
1263
1970
  }
1264
1971
  },
1265
1972
  "required": [
1266
1973
  "params",
1267
- "query",
1268
- "body"
1974
+ "query"
1269
1975
  ],
1270
1976
  "additionalProperties": false
1271
1977
  }),
1272
1978
  },
1273
- "ListOrgCredentials": {
1274
- description: "List credentials linked to an organization\n\nReturns every credential whose `orgId` equals the path parameter. Caller must be an active member of the org.",
1979
+ "ListProviderVersions": {
1980
+ description: "List a verification's versions\n\nLists versions visible to the caller. Non-public branches (`ai`, `draft`, `in_review`, `rejected`) are only visible to members of the verification's owning organization.",
1275
1981
  inputSchema: toZod({
1276
1982
  "type": "object",
1277
1983
  "properties": {
1278
1984
  "params": {
1279
1985
  "type": "object",
1280
1986
  "properties": {
1281
- "orgId": {
1987
+ "providerId": {
1282
1988
  "type": "string",
1283
1989
  "format": "uuid"
1284
1990
  }
1285
1991
  },
1286
1992
  "required": [
1287
- "orgId"
1993
+ "providerId"
1288
1994
  ],
1289
1995
  "additionalProperties": false
1290
1996
  },
1291
1997
  "query": {
1292
1998
  "type": "object",
1293
- "properties": {}
1999
+ "properties": {
2000
+ "cursor": {
2001
+ "type": "string",
2002
+ "maxLength": 500
2003
+ }
2004
+ }
1294
2005
  },
1295
2006
  "body": {
1296
2007
  "type": "object"
@@ -1303,23 +2014,28 @@ export const MCP_TOOLS = {
1303
2014
  "additionalProperties": false
1304
2015
  }),
1305
2016
  },
1306
- "ListOrgs": {
1307
- description: "List organizations the caller belongs to",
2017
+ "ListVerificationDeliveries": {
2018
+ description: "Get the callback delivery status for a session\n\nDiagnostic view of the session's callback deliveries: one entry per\n(subscription, terminal event) with its delivery state, attempt\ncount, last error, and whether it was dead-lettered. Lets a consumer\n(or the agent) answer \"did my callback arrive, and if not, why?\"\nwithout org-dashboard access. Only meaningful after the session\nreaches a terminal status (no deliveries exist before then). Auth\nmirrors the events GET: the Verification Client service token, or the\nconsumer's `OrgToken` (the resolved org must match the session).\n\nReading `deliveryStatus` per entry:\n- `delivered` — the callback POST succeeded; nothing to do.\n- `pending` — queued, not yet attempted (or between retries).\n- `attempt_failed` — a delivery attempt failed but retries remain;\n `lastError` holds the reason and `attempts` the count so far.\n- `failed` — all retries exhausted. When `deadLettered` is also true\n the delivery sits in the DLQ.\n\nTo recover a failed/dead-lettered delivery: confirm the `callbackUrl`\nis reachable and answers 2xx, then call `retry_verification_callback`\nto re-enqueue it (an org admin can also retry from the Callback DLQ).\n",
1308
2019
  inputSchema: toZod({
1309
2020
  "type": "object",
1310
2021
  "properties": {
1311
2022
  "params": {
1312
- "type": "object",
1313
- "properties": {}
1314
- },
1315
- "query": {
1316
2023
  "type": "object",
1317
2024
  "properties": {
1318
- "cursor": {
2025
+ "sessionId": {
1319
2026
  "type": "string",
1320
- "maxLength": 500
2027
+ "format": "uuid",
2028
+ "description": "Verification session id (UUID v7 when supported). Also echoed in the result payload as `reclaimSessionId`."
1321
2029
  }
1322
- }
2030
+ },
2031
+ "required": [
2032
+ "sessionId"
2033
+ ],
2034
+ "additionalProperties": false
2035
+ },
2036
+ "query": {
2037
+ "type": "object",
2038
+ "properties": {}
1323
2039
  },
1324
2040
  "body": {
1325
2041
  "type": "object"
@@ -1332,32 +2048,28 @@ export const MCP_TOOLS = {
1332
2048
  "additionalProperties": false
1333
2049
  }),
1334
2050
  },
1335
- "ListProviderVersions": {
1336
- description: "List a verification's versions\n\nLists versions visible to the caller. Non-public branches (`ai`, `draft`, `in_review`, `rejected`) are only visible to members of the verification's owning organization.",
2051
+ "ListVerificationEvents": {
2052
+ description: "Get the event log for a session\n\nReturns the append-only event log. Readable by the Verification Client\n(`X-VC-Token`) or the session creator (authenticated by the consumer's\n`OrgToken`; the resolved org must match the session).\n\nThis log is the primary tool for diagnosing a stuck or failed session.\nA healthy run proceeds through this lifecycle (in order):\n\n`session_pending` → `verification_client_opened` →\n`verification_client_ready` → `request_matched` →\n`request_claim_created` → `request_claim_completed` → terminal\n(`verification_success` | `verification_rejected` | `verification_error`),\nor `session_expired` if `expiresAt` passes first.\n\nRead the gaps to locate where the flow stalled:\n- no `verification_client_opened` → the end-user never opened the link.\n- opened but no `request_matched` → the user opened the page but didn't\n complete the login/journey on the provider site, so the target\n request was never captured.\n- `request_matched` but no terminal event → the proof run is still in\n progress (or stalled mid-claim).\n\nFailure detail lives in `eventData` on `request_claim_failed`,\n`request_claim_rejected`, `verification_error`, and\n`verification_rejected` — inspect it for the reason. Request-level\nevents also carry a `request_id` in `eventData`. Pair with\n`get_verification_session` (status/expiry) and\n`list_verification_deliveries` (callback health) for the full picture.\n",
1337
2053
  inputSchema: toZod({
1338
2054
  "type": "object",
1339
2055
  "properties": {
1340
2056
  "params": {
1341
2057
  "type": "object",
1342
2058
  "properties": {
1343
- "providerId": {
2059
+ "sessionId": {
1344
2060
  "type": "string",
1345
- "format": "uuid"
2061
+ "format": "uuid",
2062
+ "description": "Verification session id (UUID v7 when supported). Also echoed in the result payload as `reclaimSessionId`."
1346
2063
  }
1347
2064
  },
1348
2065
  "required": [
1349
- "providerId"
2066
+ "sessionId"
1350
2067
  ],
1351
2068
  "additionalProperties": false
1352
2069
  },
1353
2070
  "query": {
1354
2071
  "type": "object",
1355
- "properties": {
1356
- "cursor": {
1357
- "type": "string",
1358
- "maxLength": 500
1359
- }
1360
- }
2072
+ "properties": {}
1361
2073
  },
1362
2074
  "body": {
1363
2075
  "type": "object"
@@ -1427,7 +2139,6 @@ export const MCP_TOOLS = {
1427
2139
  "properties": {
1428
2140
  "q": {
1429
2141
  "type": "string",
1430
- "minLength": 1,
1431
2142
  "maxLength": 200
1432
2143
  },
1433
2144
  "tag": {
@@ -1550,22 +2261,22 @@ export const MCP_TOOLS = {
1550
2261
  "additionalProperties": false
1551
2262
  }),
1552
2263
  },
1553
- "RevokeCredential": {
1554
- description: "Revoke a credential\n\nSoft-revokes the credential (sets `revokedAt`). Allowed for the creating user (anonymous credentials), an active OWNER of the owning org (linked credentials), or a Reclaim admin. Revoked credentials cannot be used for verification and cannot be re-linked.",
2264
+ "RetryVerificationCallback": {
2265
+ description: "Re-enqueue callback delivery for a session\n\nRe-enqueues delivery of a session's stored result to its callback subscriptions. Use this after `list_verification_deliveries` shows a `failed` or dead-lettered delivery, once the consumer's callback endpoint is reachable again and answers 2xx — it re-attempts every not-yet-delivered callback for the session. Usable by the session creator (authenticated by the consumer's `OrgToken`) to recover from a transient consumer-side outage.",
1555
2266
  inputSchema: toZod({
1556
2267
  "type": "object",
1557
2268
  "properties": {
1558
2269
  "params": {
1559
2270
  "type": "object",
1560
2271
  "properties": {
1561
- "credentialId": {
2272
+ "sessionId": {
1562
2273
  "type": "string",
1563
2274
  "format": "uuid",
1564
- "description": "Stable id for a `Credential` row."
2275
+ "description": "Verification session id (UUID v7 when supported). Also echoed in the result payload as `reclaimSessionId`."
1565
2276
  }
1566
2277
  },
1567
2278
  "required": [
1568
- "credentialId"
2279
+ "sessionId"
1569
2280
  ],
1570
2281
  "additionalProperties": false
1571
2282
  },
@@ -1584,27 +2295,21 @@ export const MCP_TOOLS = {
1584
2295
  "additionalProperties": false
1585
2296
  }),
1586
2297
  },
1587
- "SubmitProviderVersionForReview": {
1588
- description: "Submit a verification version for review\n\nSubmits a verification version (currently on the `draft` or `rejected` branch) for admin review. On success the version's branch transitions to `in_review`. Callable by any authenticated member of the verification's owning org. Meaningful only on `PUBLIC` verifications — on `PRIVATE` verifications new versions go to the live channel directly and never need review.",
2298
+ "SetOrgKeypair": {
2299
+ description: "Set (or rotate) the organization's encryption keypair\n\nUpserts the organization's single Ethereum (secp256k1) encryption keypair. The body carries the org's **eth public key** — as an uncompressed hex string (`0x04`+128 hex) or a secp256k1 public JWK (`{kty:'EC', crv:'secp256k1', x, y}`) — and `canEncryptResult`. The matching private key never leaves the consumer. Setting overwrites the single row (and creates it for a keyless org). When `canEncryptResult` is true, terminal results are delivered as an ECIES ciphertext encrypted to this key; otherwise plaintext. Authenticated by the org's `OrgToken` or a human `BearerAuth` session for an active member of the org.",
1589
2300
  inputSchema: toZod({
1590
2301
  "type": "object",
1591
2302
  "properties": {
1592
2303
  "params": {
1593
2304
  "type": "object",
1594
2305
  "properties": {
1595
- "providerId": {
2306
+ "orgId": {
1596
2307
  "type": "string",
1597
2308
  "format": "uuid"
1598
- },
1599
- "version": {
1600
- "type": "string",
1601
- "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[a-zA-Z0-9_-]+(?:\\.[0-9]+)?)?$",
1602
- "maxLength": 32
1603
2309
  }
1604
2310
  },
1605
2311
  "required": [
1606
- "providerId",
1607
- "version"
2312
+ "orgId"
1608
2313
  ],
1609
2314
  "additionalProperties": false
1610
2315
  },
@@ -1613,16 +2318,88 @@ export const MCP_TOOLS = {
1613
2318
  "properties": {}
1614
2319
  },
1615
2320
  "body": {
1616
- "type": "object",
1617
- "additionalProperties": false,
1618
- "description": "Body for submitting a provider version for review. Transitions the version's branch from `draft` (or `rejected`) to `in_review`.",
1619
- "properties": {
1620
- "notes": {
1621
- "type": "string",
1622
- "description": "Optional note from the author to reviewers (changelog, areas to focus on, etc.).",
1623
- "maxLength": 10000
2321
+ "oneOf": [
2322
+ {
2323
+ "type": "object",
2324
+ "additionalProperties": false,
2325
+ "description": "Body for `PUT /orgs/{orgId}/keypair`. Carries the org's eth public key as an uncompressed hex string (`0x04` + 128 hex) — the eth-native form wallets/ethers emit. The matching private key never leaves the consumer.",
2326
+ "required": [
2327
+ "publicKey"
2328
+ ],
2329
+ "properties": {
2330
+ "publicKey": {
2331
+ "type": "string",
2332
+ "description": "Uncompressed secp256k1 public key, `0x04` + 128 hex.",
2333
+ "pattern": "^0x04[0-9a-fA-F]{128}$"
2334
+ },
2335
+ "canEncryptResult": {
2336
+ "type": "boolean",
2337
+ "default": false
2338
+ },
2339
+ "label": {
2340
+ "type": "string",
2341
+ "minLength": 1,
2342
+ "maxLength": 100
2343
+ }
2344
+ }
2345
+ },
2346
+ {
2347
+ "type": "object",
2348
+ "additionalProperties": false,
2349
+ "description": "Body for `PUT /orgs/{orgId}/keypair`. Carries the org's eth public key as a secp256k1 public JWK.",
2350
+ "required": [
2351
+ "publicKeyJwk"
2352
+ ],
2353
+ "properties": {
2354
+ "publicKeyJwk": {
2355
+ "type": "object",
2356
+ "additionalProperties": false,
2357
+ "description": "A secp256k1 (Ethereum) public key in JWK form (`{kty:'EC', crv:'secp256k1', x, y}`), used to ECIES-encrypt delivered verification results and to identify the org. The matching private key never leaves the consumer. Same shape published by the signing JWKS.",
2358
+ "required": [
2359
+ "kty",
2360
+ "crv",
2361
+ "x",
2362
+ "y"
2363
+ ],
2364
+ "properties": {
2365
+ "kty": {
2366
+ "type": "string",
2367
+ "enum": [
2368
+ "EC"
2369
+ ]
2370
+ },
2371
+ "crv": {
2372
+ "type": "string",
2373
+ "enum": [
2374
+ "secp256k1"
2375
+ ]
2376
+ },
2377
+ "x": {
2378
+ "type": "string",
2379
+ "description": "base64url-encoded X coordinate (32 bytes).",
2380
+ "minLength": 1,
2381
+ "maxLength": 64
2382
+ },
2383
+ "y": {
2384
+ "type": "string",
2385
+ "description": "base64url-encoded Y coordinate (32 bytes).",
2386
+ "minLength": 1,
2387
+ "maxLength": 64
2388
+ }
2389
+ }
2390
+ },
2391
+ "canEncryptResult": {
2392
+ "type": "boolean",
2393
+ "default": false
2394
+ },
2395
+ "label": {
2396
+ "type": "string",
2397
+ "minLength": 1,
2398
+ "maxLength": 100
2399
+ }
2400
+ }
1624
2401
  }
1625
- }
2402
+ ]
1626
2403
  }
1627
2404
  },
1628
2405
  "required": [
@@ -1633,8 +2410,8 @@ export const MCP_TOOLS = {
1633
2410
  "additionalProperties": false
1634
2411
  }),
1635
2412
  },
1636
- "TransferProvider": {
1637
- description: "Transfer a verification to a different workspace\n\nAdmin-only. Moves the verification's `orgId` to the supplied workspace; preserves slug, versions, members. SQL function `builder.transfer_provider` enforces the admin gate and target existence atomically.",
2413
+ "SubmitProviderVersionForReview": {
2414
+ description: "Submit a verification version for review\n\nSubmits a verification version (currently on the `draft` or `rejected` branch) for admin review. On success the version's branch transitions to `in_review`. Callable by any authenticated member of the verification's owning org. Meaningful only on `PUBLIC` verifications — on `PRIVATE` verifications new versions go to the live channel directly and never need review.",
1638
2415
  inputSchema: toZod({
1639
2416
  "type": "object",
1640
2417
  "properties": {
@@ -1644,10 +2421,16 @@ export const MCP_TOOLS = {
1644
2421
  "providerId": {
1645
2422
  "type": "string",
1646
2423
  "format": "uuid"
2424
+ },
2425
+ "version": {
2426
+ "type": "string",
2427
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[a-zA-Z0-9_-]+(?:\\.[0-9]+)?)?$",
2428
+ "maxLength": 32
1647
2429
  }
1648
2430
  },
1649
2431
  "required": [
1650
- "providerId"
2432
+ "providerId",
2433
+ "version"
1651
2434
  ],
1652
2435
  "additionalProperties": false
1653
2436
  },
@@ -1658,13 +2441,12 @@ export const MCP_TOOLS = {
1658
2441
  "body": {
1659
2442
  "type": "object",
1660
2443
  "additionalProperties": false,
1661
- "required": [
1662
- "orgId"
1663
- ],
2444
+ "description": "Body for submitting a provider version for review. Transitions the version's branch from `draft` (or `rejected`) to `in_review`.",
1664
2445
  "properties": {
1665
- "orgId": {
2446
+ "notes": {
1666
2447
  "type": "string",
1667
- "format": "uuid"
2448
+ "description": "Optional note from the author to reviewers (changelog, areas to focus on, etc.).",
2449
+ "maxLength": 10000
1668
2450
  }
1669
2451
  }
1670
2452
  }
@@ -1677,14 +2459,23 @@ export const MCP_TOOLS = {
1677
2459
  "additionalProperties": false
1678
2460
  }),
1679
2461
  },
1680
- "UpdateMe": {
1681
- description: "Update the authenticated user's profile",
2462
+ "TransferProvider": {
2463
+ description: "Transfer a verification to a different workspace\n\nAdmin-only. Moves the verification's `orgId` to the supplied workspace; preserves slug, versions, members. SQL function `builder.transfer_provider` enforces the admin gate and target existence atomically.",
1682
2464
  inputSchema: toZod({
1683
2465
  "type": "object",
1684
2466
  "properties": {
1685
2467
  "params": {
1686
2468
  "type": "object",
1687
- "properties": {}
2469
+ "properties": {
2470
+ "providerId": {
2471
+ "type": "string",
2472
+ "format": "uuid"
2473
+ }
2474
+ },
2475
+ "required": [
2476
+ "providerId"
2477
+ ],
2478
+ "additionalProperties": false
1688
2479
  },
1689
2480
  "query": {
1690
2481
  "type": "object",
@@ -1693,12 +2484,13 @@ export const MCP_TOOLS = {
1693
2484
  "body": {
1694
2485
  "type": "object",
1695
2486
  "additionalProperties": false,
1696
- "description": "Caller-editable fields on the authenticated user.",
2487
+ "required": [
2488
+ "orgId"
2489
+ ],
1697
2490
  "properties": {
1698
- "name": {
2491
+ "orgId": {
1699
2492
  "type": "string",
1700
- "minLength": 1,
1701
- "maxLength": 200
2493
+ "format": "uuid"
1702
2494
  }
1703
2495
  }
1704
2496
  }
@@ -2072,9 +2864,9 @@ export const MCP_TOOLS = {
2072
2864
  }
2073
2865
  }
2074
2866
  },
2075
- "matches": {
2867
+ "responseMatches": {
2076
2868
  "type": "array",
2077
- "description": "A list of match conditions for the response.",
2869
+ "description": "Conditions the (redacted) response must satisfy for the proof to be valid. Each runs against the union of the portions revealed by `responseRedactions` (or the whole response when there are none). Mirrors attestor-core `responseMatches`.",
2078
2870
  "minItems": 1,
2079
2871
  "items": {
2080
2872
  "type": "object",
@@ -2112,9 +2904,169 @@ export const MCP_TOOLS = {
2112
2904
  "value": {
2113
2905
  "type": "string",
2114
2906
  "description": "The pattern or value to look for in the response. When `type` is 'contains', supports template variable declaration using `{{variable}}` syntax. When `type` is 'regex', can be used to extract variables using regex named groups."
2907
+ }
2908
+ }
2909
+ }
2910
+ },
2911
+ "responseRedactions": {
2912
+ "type": "array",
2913
+ "description": "Portions to select/reveal from the response, applied in order (xPath => jsonPath => regex). Done client-side; only the selected portions (plus the first response line) are sent to the attestor. An independent ordered list — NOT paired 1:1 with `responseMatches`. Mirrors attestor-core `responseRedactions`.",
2914
+ "items": {
2915
+ "type": "object",
2916
+ "additionalProperties": false,
2917
+ "description": "Which portions to select from a response. These are selected in order, xpath => jsonPath => regex * These redactions are done client side and only the selected portions are sent to the attestor. The attestor will only be able to see the selected portions alongside the first line of the HTTP response (i.e. \"HTTP/1.1 200 OK\")",
2918
+ "properties": {
2919
+ "xPath": {
2920
+ "type": "string",
2921
+ "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
2922
+ },
2923
+ "jsonPath": {
2924
+ "type": "string",
2925
+ "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
2115
2926
  },
2116
- "extract": {
2927
+ "regex": {
2928
+ "type": "string",
2929
+ "description": "select a regex match from the response"
2930
+ },
2931
+ "hash": {
2932
+ "type": "string",
2933
+ "description": "If provided, the value inside will be hashed instead of being redacted. Useful for cases where the data inside is an identifiying piece of information that you don't want to reveal to the attestor, eg. an email address.\nIf the hash function produces more bytes than the original value, the hash will be truncated.\nEg. if hash is enabled, the original value is \"hello\", and hashed is \"a1b2c\", then the attestor will only see \"a1b2c\".\nNote: if a regex with named groups is provided, only the named groups will be hashed.",
2934
+ "enum": [
2935
+ "oprf",
2936
+ "oprf-mpc",
2937
+ "oprf-raw"
2938
+ ]
2939
+ }
2940
+ }
2941
+ }
2942
+ }
2943
+ }
2944
+ }
2945
+ },
2946
+ "allowedJsRequests": {
2947
+ "type": "array",
2948
+ "minItems": 0,
2949
+ "items": {
2950
+ "type": "object",
2951
+ "additionalProperties": false,
2952
+ "description": "A template for selecting request",
2953
+ "allOf": [
2954
+ {
2955
+ "type": "object",
2956
+ "additionalProperties": false,
2957
+ "description": "A matcher for one HTTP request in observed traffic, together with the response constraints that must hold for a Reclaim proof over that request to be valid. Used by interceptors, in-page injections, and LLM agents.",
2958
+ "required": [
2959
+ "url",
2960
+ "method"
2961
+ ],
2962
+ "properties": {
2963
+ "url": {
2964
+ "type": "string",
2965
+ "description": "The URL or generic path of the HTTP request."
2966
+ },
2967
+ "method": {
2968
+ "type": "string",
2969
+ "description": "The HTTP method used for the request.",
2970
+ "enum": [
2971
+ "GET",
2972
+ "POST",
2973
+ "PUT",
2974
+ "PATCH",
2975
+ "DELETE"
2976
+ ]
2977
+ },
2978
+ "requestBodyTemplate": {
2979
+ "type": "string",
2980
+ "description": "Template used to match or capture an outgoing request body. Template can use regex templates as placeholders. For example, to match an outgoing request body that contains a request ID, you can use the following template: `(?<requestId>.*)`.",
2981
+ "maxLength": 100000
2982
+ },
2983
+ "credentials": {
2984
+ "type": "string",
2985
+ "description": "Mirrors the Fetch API `RequestCredentials` value used when issuing the request — controls whether cookies and auth headers are sent.",
2986
+ "enum": [
2987
+ "omit",
2988
+ "same-origin",
2989
+ "include"
2990
+ ]
2991
+ },
2992
+ "writeRedactionMode": {
2993
+ "type": "string",
2994
+ "description": "How the matched portion of the response should be redacted before the transcript is handed to the attestor.\n- `zk`: redact using a zero-knowledge proof over the original\n bytes.\n\n- `key-update`: redact by performing a TLS key update so the\n attestor never observes the matched bytes in cleartext.",
2995
+ "enum": [
2996
+ "zk",
2997
+ "key-update"
2998
+ ]
2999
+ },
3000
+ "additionalClientOptions": {
3001
+ "type": "object",
3002
+ "additionalProperties": false,
3003
+ "description": "Apply TLS configuration when creating the tunnel to the attestor.",
3004
+ "properties": {
3005
+ "supportedProtocolVersions": {
3006
+ "type": "array",
3007
+ "description": "TLS protocol versions the client is allowed to negotiate.",
3008
+ "minItems": 1,
3009
+ "uniqueItems": true,
3010
+ "items": {
3011
+ "type": "string",
3012
+ "enum": [
3013
+ "TLS1_2",
3014
+ "TLS1_3"
3015
+ ]
3016
+ }
3017
+ }
3018
+ }
3019
+ },
3020
+ "responseMatches": {
3021
+ "type": "array",
3022
+ "description": "Conditions the (redacted) response must satisfy for the proof to be valid. Each runs against the union of the portions revealed by `responseRedactions` (or the whole response when there are none). Mirrors attestor-core `responseMatches`.",
3023
+ "minItems": 1,
3024
+ "items": {
3025
+ "type": "object",
3026
+ "additionalProperties": false,
3027
+ "description": "Specifies a rule to match against a string in response to validate proof content.",
3028
+ "required": [
3029
+ "type",
3030
+ "value"
3031
+ ],
3032
+ "properties": {
3033
+ "isOptional": {
3034
+ "type": "boolean",
3035
+ "description": "If true, the match condition is optional and won't fail if absent",
3036
+ "default": false
3037
+ },
3038
+ "description": {
3039
+ "type": "string",
3040
+ "description": "The description of the field that is extracted using this match rule",
3041
+ "minLength": 1,
3042
+ "maxLength": 1000
3043
+ },
3044
+ "order": {
3045
+ "type": "integer",
3046
+ "description": "The order in which the field should be displayed to user in UI",
3047
+ "minimum": 0
3048
+ },
3049
+ "type": {
3050
+ "type": "string",
3051
+ "description": "The matching mechanism to use value as against response. Typically regex or simple string containment",
3052
+ "enum": [
3053
+ "regex",
3054
+ "contains"
3055
+ ]
3056
+ },
3057
+ "value": {
3058
+ "type": "string",
3059
+ "description": "The pattern or value to look for in the response. When `type` is 'contains', supports template variable declaration using `{{variable}}` syntax. When `type` is 'regex', can be used to extract variables using regex named groups."
3060
+ }
3061
+ }
3062
+ }
3063
+ },
3064
+ "responseRedactions": {
3065
+ "type": "array",
3066
+ "description": "Portions to select/reveal from the response, applied in order (xPath => jsonPath => regex). Done client-side; only the selected portions (plus the first response line) are sent to the attestor. An independent ordered list — NOT paired 1:1 with `responseMatches`. Mirrors attestor-core `responseRedactions`.",
3067
+ "items": {
2117
3068
  "type": "object",
3069
+ "additionalProperties": false,
2118
3070
  "description": "Which portions to select from a response. These are selected in order, xpath => jsonPath => regex * These redactions are done client side and only the selected portions are sent to the attestor. The attestor will only be able to see the selected portions alongside the first line of the HTTP response (i.e. \"HTTP/1.1 200 OK\")",
2119
3071
  "properties": {
2120
3072
  "xPath": {
@@ -2142,20 +3094,6 @@ export const MCP_TOOLS = {
2142
3094
  }
2143
3095
  }
2144
3096
  }
2145
- }
2146
- }
2147
- }
2148
- },
2149
- "allowedJsRequests": {
2150
- "type": "array",
2151
- "minItems": 0,
2152
- "items": {
2153
- "type": "object",
2154
- "additionalProperties": false,
2155
- "description": "A template for selecting request",
2156
- "allOf": [
2157
- {
2158
- "$ref": "#/components/schemas/RequestSelection"
2159
3097
  },
2160
3098
  {
2161
3099
  "type": "object",
@@ -2187,7 +3125,8 @@ export const MCP_TOOLS = {
2187
3125
  "geoLocation": {
2188
3126
  "type": "string",
2189
3127
  "description": "Geographic location (e.g. ISO country code or {{DYNAMIC_GEO}} to use user's geo location) the verification should appear to originate from.",
2190
- "maxLength": 15
3128
+ "maxLength": 15,
3129
+ "default": "{{DYNAMIC_GEO}}"
2191
3130
  },
2192
3131
  "clientOptions": {
2193
3132
  "type": "object",
@@ -2202,7 +3141,7 @@ export const MCP_TOOLS = {
2202
3141
  "useProxy": {
2203
3142
  "type": "boolean",
2204
3143
  "description": "When true, network traffic from the portal client and attestation is routed through a proxy.",
2205
- "default": false
3144
+ "default": true
2206
3145
  },
2207
3146
  "userAgent": {
2208
3147
  "type": "string",
@@ -2272,14 +3211,10 @@ export const MCP_TOOLS = {
2272
3211
  }
2273
3212
  }
2274
3213
  },
2275
- "requiredParameters": {
3214
+ "requiredContext": {
2276
3215
  "type": "object",
2277
- "description": "Map of parameter names needed (optional or required) to use this provider to their human-readable descriptions/labels. Values are plain strings shown alongside the field in dashboards and prompts.",
2278
- "maxProperties": 50,
2279
- "additionalProperties": {
2280
- "type": "string",
2281
- "maxLength": 500
2282
- }
3216
+ "description": "Optional JSON Schema describing the `context` a Consumer must supply when creating a verification session for this provider version. Only needed when the recipe expects Consumer-supplied values: those are referenced as `{{context.<key>}}` in recipe requests. Bare `{{parameterName}}` placeholders are provider parameters (extracted / not Consumer-supplied) and need no declaration here. The Builder validates `CreateVerificationSessionRequest.context` against this schema and rejects the request (400) on mismatch. Extra context fields are always allowed regardless of the schema (a root-level `additionalProperties: false` is ignored). Empty/absent accepts any context.",
3217
+ "additionalProperties": true
2283
3218
  },
2284
3219
  "notes": {
2285
3220
  "type": "string",