@agledger/mcp-server 1.2.1 → 1.3.1

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 (131) hide show
  1. package/dist/enums.d.ts +6 -4
  2. package/dist/enums.d.ts.map +1 -1
  3. package/dist/enums.js +2 -2
  4. package/dist/enums.js.map +1 -1
  5. package/dist/errors.d.ts +0 -1
  6. package/dist/errors.d.ts.map +1 -1
  7. package/dist/errors.js +0 -1
  8. package/dist/errors.js.map +1 -1
  9. package/dist/index.d.ts +0 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +0 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/resources/contract-types.d.ts +0 -1
  14. package/dist/resources/contract-types.d.ts.map +1 -1
  15. package/dist/resources/contract-types.js +0 -3
  16. package/dist/resources/contract-types.js.map +1 -1
  17. package/dist/server.d.ts +0 -1
  18. package/dist/server.d.ts.map +1 -1
  19. package/dist/server.js +0 -1
  20. package/dist/server.js.map +1 -1
  21. package/dist/tool-scopes.d.ts +0 -12
  22. package/dist/tool-scopes.d.ts.map +1 -1
  23. package/dist/tool-scopes.js +19 -31
  24. package/dist/tool-scopes.js.map +1 -1
  25. package/dist/tools/a2a.d.ts +0 -1
  26. package/dist/tools/a2a.d.ts.map +1 -1
  27. package/dist/tools/a2a.js +96 -75
  28. package/dist/tools/a2a.js.map +1 -1
  29. package/dist/tools/agent-mandates.d.ts +0 -1
  30. package/dist/tools/agent-mandates.d.ts.map +1 -1
  31. package/dist/tools/agent-mandates.js +0 -10
  32. package/dist/tools/agent-mandates.js.map +1 -1
  33. package/dist/tools/agents-refs.d.ts +0 -1
  34. package/dist/tools/agents-refs.d.ts.map +1 -1
  35. package/dist/tools/agents-refs.js +0 -8
  36. package/dist/tools/agents-refs.js.map +1 -1
  37. package/dist/tools/capabilities.d.ts +0 -1
  38. package/dist/tools/capabilities.d.ts.map +1 -1
  39. package/dist/tools/capabilities.js +0 -3
  40. package/dist/tools/capabilities.js.map +1 -1
  41. package/dist/tools/code-mode.d.ts +0 -1
  42. package/dist/tools/code-mode.d.ts.map +1 -1
  43. package/dist/tools/code-mode.js +0 -9
  44. package/dist/tools/code-mode.js.map +1 -1
  45. package/dist/tools/compliance.d.ts +0 -1
  46. package/dist/tools/compliance.d.ts.map +1 -1
  47. package/dist/tools/compliance.js +0 -1
  48. package/dist/tools/compliance.js.map +1 -1
  49. package/dist/tools/dashboard.d.ts +0 -1
  50. package/dist/tools/dashboard.d.ts.map +1 -1
  51. package/dist/tools/dashboard.js +0 -1
  52. package/dist/tools/dashboard.js.map +1 -1
  53. package/dist/tools/disputes.d.ts +0 -1
  54. package/dist/tools/disputes.d.ts.map +1 -1
  55. package/dist/tools/disputes.js +0 -5
  56. package/dist/tools/disputes.js.map +1 -1
  57. package/dist/tools/enterprises.d.ts +0 -1
  58. package/dist/tools/enterprises.d.ts.map +1 -1
  59. package/dist/tools/enterprises.js +0 -7
  60. package/dist/tools/enterprises.js.map +1 -1
  61. package/dist/tools/events.d.ts +0 -1
  62. package/dist/tools/events.d.ts.map +1 -1
  63. package/dist/tools/events.js +0 -2
  64. package/dist/tools/events.js.map +1 -1
  65. package/dist/tools/federation-admin.d.ts +0 -1
  66. package/dist/tools/federation-admin.d.ts.map +1 -1
  67. package/dist/tools/federation-admin.js +0 -25
  68. package/dist/tools/federation-admin.js.map +1 -1
  69. package/dist/tools/federation.d.ts +0 -1
  70. package/dist/tools/federation.d.ts.map +1 -1
  71. package/dist/tools/federation.js +0 -21
  72. package/dist/tools/federation.js.map +1 -1
  73. package/dist/tools/health.d.ts +0 -1
  74. package/dist/tools/health.d.ts.map +1 -1
  75. package/dist/tools/health.js +0 -2
  76. package/dist/tools/health.js.map +1 -1
  77. package/dist/tools/mandates.d.ts +0 -1
  78. package/dist/tools/mandates.d.ts.map +1 -1
  79. package/dist/tools/mandates.js +0 -11
  80. package/dist/tools/mandates.js.map +1 -1
  81. package/dist/tools/openclaw.d.ts +0 -5
  82. package/dist/tools/openclaw.d.ts.map +1 -1
  83. package/dist/tools/openclaw.js +0 -5
  84. package/dist/tools/openclaw.js.map +1 -1
  85. package/dist/tools/receipts.d.ts +0 -1
  86. package/dist/tools/receipts.d.ts.map +1 -1
  87. package/dist/tools/receipts.js +59 -24
  88. package/dist/tools/receipts.js.map +1 -1
  89. package/dist/tools/reputation.d.ts +0 -1
  90. package/dist/tools/reputation.d.ts.map +1 -1
  91. package/dist/tools/reputation.js +0 -1
  92. package/dist/tools/reputation.js.map +1 -1
  93. package/dist/tools/schemas.d.ts +0 -1
  94. package/dist/tools/schemas.d.ts.map +1 -1
  95. package/dist/tools/schemas.js +0 -17
  96. package/dist/tools/schemas.js.map +1 -1
  97. package/dist/tools/verification-keys.d.ts +0 -1
  98. package/dist/tools/verification-keys.d.ts.map +1 -1
  99. package/dist/tools/verification-keys.js +0 -1
  100. package/dist/tools/verification-keys.js.map +1 -1
  101. package/dist/tools/verification.d.ts +0 -1
  102. package/dist/tools/verification.d.ts.map +1 -1
  103. package/dist/tools/verification.js +2 -4
  104. package/dist/tools/verification.js.map +1 -1
  105. package/package.json +2 -2
  106. package/src/enums.ts +2 -3
  107. package/src/errors.ts +0 -2
  108. package/src/index.ts +0 -2
  109. package/src/resources/contract-types.ts +0 -4
  110. package/src/server.ts +0 -2
  111. package/src/tool-scopes.ts +19 -32
  112. package/src/tools/a2a.ts +158 -113
  113. package/src/tools/agent-mandates.ts +0 -11
  114. package/src/tools/agents-refs.ts +0 -9
  115. package/src/tools/capabilities.ts +0 -4
  116. package/src/tools/code-mode.ts +0 -12
  117. package/src/tools/compliance.ts +0 -2
  118. package/src/tools/dashboard.ts +0 -2
  119. package/src/tools/disputes.ts +0 -6
  120. package/src/tools/enterprises.ts +0 -8
  121. package/src/tools/events.ts +0 -3
  122. package/src/tools/federation-admin.ts +0 -26
  123. package/src/tools/federation.ts +0 -22
  124. package/src/tools/health.ts +0 -3
  125. package/src/tools/mandates.ts +0 -12
  126. package/src/tools/openclaw.ts +0 -6
  127. package/src/tools/receipts.ts +82 -46
  128. package/src/tools/reputation.ts +0 -2
  129. package/src/tools/schemas.ts +0 -18
  130. package/src/tools/verification-keys.ts +0 -2
  131. package/src/tools/verification.ts +2 -5
@@ -1,45 +1,65 @@
1
- /** AGLedger™ — Receipt MCP tools (submit, accept, reject, list). Patent Pending. Copyright 2026 AGLedger LLC. All rights reserved. */
2
-
3
1
  import { z } from 'zod';
4
2
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
3
  import type { AgledgerClient } from '@agledger/sdk';
6
4
  import { apiErrorResult } from '../errors.js';
7
- import { NextStepsField, ReceiptStatusEnum } from '../enums.js';
5
+ import { NextStepsField, StructuralValidationEnum } from '../enums.js';
8
6
  import { toolMeta } from '../tool-scopes.js';
9
7
 
10
- const ReceiptOutputSchema = z.object({
11
- id: z.string().describe('Receipt UUID'),
12
- mandateId: z.string().describe('Associated mandate UUID'),
13
- agentId: z.string().describe('Agent that submitted the receipt'),
14
- status: ReceiptStatusEnum,
15
- evidence: z.record(z.string(), z.unknown()).describe('Evidence payload'),
16
- evidenceHash: z.string().nullable().optional().describe('SHA-256 hash of evidence'),
17
- notes: z.string().nullable().optional().describe('Human-readable notes'),
18
- verificationPhase: z.string().nullable().optional().describe('Current verification phase'),
19
- verificationResult: z.record(z.string(), z.unknown()).nullable().optional().describe('Verification result details'),
20
- validationErrors: z.array(z.string()).nullable().optional().describe('Validation errors if any'),
21
- idempotencyKey: z.string().nullable().optional().describe('Idempotency key for deduplication'),
22
- createdAt: z.string().describe('ISO 8601 creation timestamp'),
23
- updatedAt: z.string().nullable().optional().describe('ISO 8601 last update timestamp'),
24
- nextSteps: NextStepsField,
25
- }).passthrough().describe('AGLedger receipt (task attestation) object');
8
+ const ReceiptOutputSchema = z
9
+ .object({
10
+ id: z.string().describe('Receipt UUID'),
11
+ mandateId: z.string().describe('Associated mandate UUID'),
12
+ agentId: z.string().describe('Agent that submitted the receipt'),
13
+ structuralValidation: StructuralValidationEnum.nullable()
14
+ .optional()
15
+ .describe('Structural validation result'),
16
+ evidence: z.record(z.string(), z.unknown()).describe('Evidence payload'),
17
+ evidenceHash: z.string().nullable().optional().describe('SHA-256 hash of evidence'),
18
+ notes: z.string().nullable().optional().describe('Human-readable notes'),
19
+ verificationPhase: z.string().nullable().optional().describe('Current verification phase'),
20
+ verificationResult: z
21
+ .record(z.string(), z.unknown())
22
+ .nullable()
23
+ .optional()
24
+ .describe('Verification result details'),
25
+ validationErrors: z
26
+ .array(z.string())
27
+ .nullable()
28
+ .optional()
29
+ .describe('Validation errors if any'),
30
+ idempotencyKey: z.string().nullable().optional().describe('Idempotency key for deduplication'),
31
+ createdAt: z.string().describe('ISO 8601 creation timestamp'),
32
+ updatedAt: z.string().nullable().optional().describe('ISO 8601 last update timestamp'),
33
+ nextSteps: NextStepsField,
34
+ })
35
+ .passthrough()
36
+ .describe('AGLedger receipt (task attestation) object');
26
37
 
27
- const ReceiptListOutputSchema = z.object({
28
- data: z.array(ReceiptOutputSchema).describe('Array of receipts for the mandate'),
29
- nextCursor: z.string().nullable().optional().describe('Cursor for the next page (null if no more results)'),
30
- }).passthrough().describe('List of receipts for a mandate');
38
+ const ReceiptListOutputSchema = z
39
+ .object({
40
+ data: z.array(ReceiptOutputSchema).describe('Array of receipts for the mandate'),
41
+ nextCursor: z
42
+ .string()
43
+ .nullable()
44
+ .optional()
45
+ .describe('Cursor for the next page (null if no more results)'),
46
+ })
47
+ .passthrough()
48
+ .describe('List of receipts for a mandate');
31
49
 
32
50
  export function registerReceiptTools(mcp: McpServer, client: AgledgerClient): void {
33
- // --- submit_receipt ---
34
51
  mcp.registerTool(
35
52
  'submit_receipt',
36
53
  {
37
54
  title: 'Submit Receipt',
38
- description: 'Submit a task attestation (receipt) with evidence against a mandate. REQUIRED to close the accountability loop — do NOT skip this step after completing work.',
55
+ description:
56
+ 'Submit a task attestation (receipt) with evidence against a mandate. REQUIRED to close the accountability loop — do NOT skip this step after completing work.',
39
57
  inputSchema: {
40
58
  mandateId: z.string().describe('UUID of the mandate this receipt is for'),
41
59
  agentId: z.string().describe('Agent ID submitting the receipt'),
42
- evidence: z.record(z.string(), z.unknown()).describe('Evidence JSON object proving task completion'),
60
+ evidence: z
61
+ .record(z.string(), z.unknown())
62
+ .describe('Evidence JSON object proving task completion'),
43
63
  notes: z.string().optional().describe('Human-readable notes about the submission'),
44
64
  },
45
65
  outputSchema: ReceiptOutputSchema,
@@ -55,13 +75,13 @@ export function registerReceiptTools(mcp: McpServer, client: AgledgerClient): vo
55
75
  try {
56
76
  const { mandateId, ...submitParams } = args;
57
77
  const receipt = await client.receipts.submit(mandateId, submitParams);
58
- let text = `✓ Receipt ${receipt.id} submitted for mandate ${mandateId}. Status: ${receipt.structuralValidation}.`;
78
+ let text = `Receipt ${receipt.id} submitted for mandate ${mandateId}. Status: ${receipt.structuralValidation}.`;
59
79
  // Use denormalized mandateStatus from receipt response (no extra API call)
60
80
  const ms = receipt.mandateStatus;
61
81
  if (ms === 'FULFILLED') {
62
- text += '\n\n✅ Mandate settled to FULFILLED. Accountability loop closed.';
82
+ text += '\n\nMandate settled to FULFILLED. Accountability loop closed.';
63
83
  } else if (ms === 'PROCESSING') {
64
- text += '\n\n⏳ Evidence is being verified. The principal will accept or reject.';
84
+ text += '\n\nEvidence is being verified. The principal will accept or reject.';
65
85
  }
66
86
  return {
67
87
  content: [{ type: 'text', text }],
@@ -73,27 +93,33 @@ export function registerReceiptTools(mcp: McpServer, client: AgledgerClient): vo
73
93
  },
74
94
  );
75
95
 
76
- // --- report_outcome (accept/reject receipt via principal verdict) ---
77
96
  mcp.registerTool(
78
97
  'report_outcome',
79
98
  {
80
99
  title: 'Report Outcome',
81
- description: 'Report the principal verdict (PASS or FAIL) on a receipt. PASS accepts the receipt; FAIL rejects it. This is the standard way to close the accountability loop.',
100
+ description:
101
+ 'Report the principal verdict (PASS or FAIL) on a receipt. PASS accepts the receipt; FAIL rejects it. This is the standard way to close the accountability loop.',
82
102
  inputSchema: {
83
103
  mandateId: z.string().describe('UUID of the mandate'),
84
104
  receiptId: z.string().describe('UUID of the receipt to judge'),
85
105
  outcome: z.enum(['PASS', 'FAIL']).describe('Verdict: PASS (accept) or FAIL (reject)'),
86
- checks: z.record(z.string(), z.unknown()).optional().describe('Optional per-field check results'),
106
+ checks: z
107
+ .record(z.string(), z.unknown())
108
+ .optional()
109
+ .describe('Optional per-field check results'),
87
110
  },
88
- outputSchema: z.object({
89
- mandateId: z.string().describe('Mandate UUID'),
90
- receiptId: z.string().describe('Receipt UUID'),
91
- outcome: z.enum(['PASS', 'FAIL']).describe('Reported outcome'),
92
- signal: z.string().describe('Settlement signal: SETTLE, HOLD, or RELEASE'),
93
- reporterType: z.string().describe('Who reported: principal'),
94
- reportedAt: z.string().describe('ISO 8601 timestamp'),
95
- nextSteps: NextStepsField,
96
- }).passthrough().describe('Outcome result'),
111
+ outputSchema: z
112
+ .object({
113
+ mandateId: z.string().describe('Mandate UUID'),
114
+ receiptId: z.string().describe('Receipt UUID'),
115
+ outcome: z.enum(['PASS', 'FAIL']).describe('Reported outcome'),
116
+ signal: z.string().describe('Settlement signal: SETTLE, HOLD, or RELEASE'),
117
+ reporterType: z.string().describe('Who reported: principal'),
118
+ reportedAt: z.string().describe('ISO 8601 timestamp'),
119
+ nextSteps: NextStepsField,
120
+ })
121
+ .passthrough()
122
+ .describe('Outcome result'),
97
123
  annotations: {
98
124
  readOnlyHint: false,
99
125
  destructiveHint: false,
@@ -108,7 +134,9 @@ export function registerReceiptTools(mcp: McpServer, client: AgledgerClient): vo
108
134
  const result = await client.mandates.reportOutcome(mandateId, outcomeParams);
109
135
  const verb = result.outcome === 'PASS' ? 'accepted' : 'rejected';
110
136
  return {
111
- content: [{ type: 'text', text: `Receipt ${args.receiptId} ${verb}. Signal: ${result.signal}.` }],
137
+ content: [
138
+ { type: 'text', text: `Receipt ${args.receiptId} ${verb}. Signal: ${result.signal}.` },
139
+ ],
112
140
  structuredContent: result as unknown as Record<string, unknown>,
113
141
  };
114
142
  } catch (err) {
@@ -117,7 +145,6 @@ export function registerReceiptTools(mcp: McpServer, client: AgledgerClient): vo
117
145
  },
118
146
  );
119
147
 
120
- // --- get_receipt ---
121
148
  mcp.registerTool(
122
149
  'get_receipt',
123
150
  {
@@ -140,7 +167,12 @@ export function registerReceiptTools(mcp: McpServer, client: AgledgerClient): vo
140
167
  try {
141
168
  const receipt = await client.receipts.get(args.mandateId, args.receiptId);
142
169
  return {
143
- content: [{ type: 'text', text: `Receipt ${receipt.id}: status=${receipt.structuralValidation}, mandate=${receipt.mandateId}.` }],
170
+ content: [
171
+ {
172
+ type: 'text',
173
+ text: `Receipt ${receipt.id}: status=${receipt.structuralValidation}, mandate=${receipt.mandateId}.`,
174
+ },
175
+ ],
144
176
  structuredContent: receipt as unknown as Record<string, unknown>,
145
177
  };
146
178
  } catch (err) {
@@ -149,7 +181,6 @@ export function registerReceiptTools(mcp: McpServer, client: AgledgerClient): vo
149
181
  },
150
182
  );
151
183
 
152
- // --- list_receipts ---
153
184
  mcp.registerTool(
154
185
  'list_receipts',
155
186
  {
@@ -174,7 +205,12 @@ export function registerReceiptTools(mcp: McpServer, client: AgledgerClient): vo
174
205
  const { mandateId, ...paginationParams } = args;
175
206
  const result = await client.receipts.list(mandateId, paginationParams);
176
207
  return {
177
- content: [{ type: 'text', text: `Found ${result.data.length} receipts for mandate ${mandateId}.` }],
208
+ content: [
209
+ {
210
+ type: 'text',
211
+ text: `Found ${result.data.length} receipts for mandate ${mandateId}.`,
212
+ },
213
+ ],
178
214
  structuredContent: result as unknown as Record<string, unknown>,
179
215
  };
180
216
  } catch (err) {
@@ -1,5 +1,3 @@
1
- /** AGLedger™ — Reputation MCP tools. Patent Pending. Copyright 2026 AGLedger LLC. All rights reserved. */
2
-
3
1
  import { z } from 'zod';
4
2
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
3
  import type { AgledgerClient } from '@agledger/sdk';
@@ -1,5 +1,3 @@
1
- /** AGLedger™ — Schema MCP tools (list, get, and schema development tools). Patent Pending. Copyright 2026 AGLedger LLC. All rights reserved. */
2
-
3
1
  import { z } from 'zod';
4
2
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
3
  import type { AgledgerClient } from '@agledger/sdk';
@@ -133,7 +131,6 @@ const CompatibilityModeEnum = z.enum(['FULL', 'BACKWARD', 'FORWARD', 'NONE'])
133
131
  .describe('Schema compatibility mode');
134
132
 
135
133
  export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): void {
136
- // --- list_contract_schemas ---
137
134
  mcp.registerTool(
138
135
  'list_contract_schemas',
139
136
  {
@@ -162,7 +159,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
162
159
  },
163
160
  );
164
161
 
165
- // --- get_contract_schema ---
166
162
  mcp.registerTool(
167
163
  'get_contract_schema',
168
164
  {
@@ -193,7 +189,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
193
189
  },
194
190
  );
195
191
 
196
- // --- get_meta_schema ---
197
192
  mcp.registerTool(
198
193
  'get_meta_schema',
199
194
  {
@@ -222,7 +217,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
222
217
  },
223
218
  );
224
219
 
225
- // --- preview_schema ---
226
220
  mcp.registerTool(
227
221
  'preview_schema',
228
222
  {
@@ -272,7 +266,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
272
266
  },
273
267
  );
274
268
 
275
- // --- register_schema ---
276
269
  mcp.registerTool(
277
270
  'register_schema',
278
271
  {
@@ -319,7 +312,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
319
312
  },
320
313
  );
321
314
 
322
- // --- get_schema_versions ---
323
315
  mcp.registerTool(
324
316
  'get_schema_versions',
325
317
  {
@@ -353,7 +345,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
353
345
  },
354
346
  );
355
347
 
356
- // --- diff_schema_versions ---
357
348
  mcp.registerTool(
358
349
  'diff_schema_versions',
359
350
  {
@@ -392,7 +383,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
392
383
  },
393
384
  );
394
385
 
395
- // --- get_schema_template ---
396
386
  mcp.registerTool(
397
387
  'get_schema_template',
398
388
  {
@@ -422,7 +412,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
422
412
  },
423
413
  );
424
414
 
425
- // --- get_blank_schema_template ---
426
415
  mcp.registerTool(
427
416
  'get_blank_schema_template',
428
417
  {
@@ -450,7 +439,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
450
439
  },
451
440
  );
452
441
 
453
- // --- check_schema_compatibility ---
454
442
  mcp.registerTool(
455
443
  'check_schema_compatibility',
456
444
  {
@@ -485,7 +473,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
485
473
  },
486
474
  );
487
475
 
488
- // --- get_schema_version ---
489
476
  mcp.registerTool(
490
477
  'get_schema_version',
491
478
  {
@@ -520,7 +507,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
520
507
  },
521
508
  );
522
509
 
523
- // --- validate_receipt_schema ---
524
510
  mcp.registerTool(
525
511
  'validate_receipt_schema',
526
512
  {
@@ -562,7 +548,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
562
548
  },
563
549
  );
564
550
 
565
- // --- get_schema_rules ---
566
551
  mcp.registerTool(
567
552
  'get_schema_rules',
568
553
  {
@@ -593,7 +578,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
593
578
  },
594
579
  );
595
580
 
596
- // --- delete_schema ---
597
581
  mcp.registerTool(
598
582
  'delete_schema',
599
583
  {
@@ -623,7 +607,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
623
607
  },
624
608
  );
625
609
 
626
- // --- export_schema ---
627
610
  mcp.registerTool(
628
611
  'export_schema',
629
612
  {
@@ -653,7 +636,6 @@ export function registerSchemaTools(mcp: McpServer, client: AgledgerClient): voi
653
636
  },
654
637
  );
655
638
 
656
- // --- import_schema ---
657
639
  mcp.registerTool(
658
640
  'import_schema',
659
641
  {
@@ -1,5 +1,3 @@
1
- /** AGLedger™ — Verification keys MCP tool. Patent Pending. Copyright 2026 AGLedger LLC. All rights reserved. */
2
-
3
1
  import { z } from 'zod';
4
2
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
3
  import type { AgledgerClient } from '@agledger/sdk';
@@ -1,9 +1,8 @@
1
- /** AGLedger™ — Verification MCP tools (verify mandate, get verification status). Patent Pending. Copyright 2026 AGLedger LLC. All rights reserved. */
2
-
3
1
  import { z } from 'zod';
4
2
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
3
  import type { AgledgerClient } from '@agledger/sdk';
6
4
  import { apiErrorResult } from '../errors.js';
5
+ import { VerificationOutcomeEnum } from '../enums.js';
7
6
  import { toolMeta } from '../tool-scopes.js';
8
7
 
9
8
  const VerificationResultOutputSchema = z.object({
@@ -13,7 +12,7 @@ const VerificationResultOutputSchema = z.object({
13
12
  phase1Result: z.record(z.string(), z.unknown()).optional().describe('Phase 1 (sync) verification result'),
14
13
  phase2Result: z.record(z.string(), z.unknown()).optional().describe('Phase 2 (async) verification result'),
15
14
  })).describe('Per-receipt verification results'),
16
- overallStatus: z.string().describe('Overall verification outcome'),
15
+ overallStatus: VerificationOutcomeEnum.describe('Overall verification outcome: PASS, FAIL, or REVIEW_REQUIRED'),
17
16
  }).passthrough().describe('Mandate verification result');
18
17
 
19
18
  const VerificationStatusOutputSchema = z.object({
@@ -25,7 +24,6 @@ const VerificationStatusOutputSchema = z.object({
25
24
  }).passthrough().describe('Current verification status for a mandate');
26
25
 
27
26
  export function registerVerificationTools(mcp: McpServer, client: AgledgerClient): void {
28
- // --- verify_mandate ---
29
27
  mcp.registerTool(
30
28
  'verify_mandate',
31
29
  {
@@ -56,7 +54,6 @@ export function registerVerificationTools(mcp: McpServer, client: AgledgerClient
56
54
  },
57
55
  );
58
56
 
59
- // --- get_verification_status ---
60
57
  mcp.registerTool(
61
58
  'get_verification_status',
62
59
  {