@agledger/mcp-server 1.5.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/api-client.d.ts +16 -0
  2. package/dist/api-client.d.ts.map +1 -0
  3. package/dist/api-client.js +52 -0
  4. package/dist/api-client.js.map +1 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +17 -58
  7. package/dist/index.js.map +1 -1
  8. package/dist/server.d.ts +2 -13
  9. package/dist/server.d.ts.map +1 -1
  10. package/dist/server.js +113 -109
  11. package/dist/server.js.map +1 -1
  12. package/package.json +2 -3
  13. package/src/api-client.ts +72 -0
  14. package/src/index.ts +27 -60
  15. package/src/server.ts +136 -120
  16. package/tests/api-client.test.ts +147 -0
  17. package/tests/harness.ts +8 -35
  18. package/tests/integration.test.ts +373 -0
  19. package/tests/server.test.ts +286 -0
  20. package/src/enums.ts +0 -47
  21. package/src/errors.ts +0 -44
  22. package/src/resources/contract-types.ts +0 -130
  23. package/src/tool-scopes.ts +0 -180
  24. package/src/tools/a2a.ts +0 -430
  25. package/src/tools/agent-mandates.ts +0 -259
  26. package/src/tools/agents-refs.ts +0 -232
  27. package/src/tools/capabilities.ts +0 -63
  28. package/src/tools/compliance.ts +0 -70
  29. package/src/tools/dashboard.ts +0 -64
  30. package/src/tools/disputes.ts +0 -121
  31. package/src/tools/enterprises.ts +0 -203
  32. package/src/tools/events.ts +0 -33
  33. package/src/tools/federation-admin.ts +0 -665
  34. package/src/tools/federation.ts +0 -587
  35. package/src/tools/health.ts +0 -30
  36. package/src/tools/mandates.ts +0 -264
  37. package/src/tools/openclaw.ts +0 -122
  38. package/src/tools/receipts.ts +0 -134
  39. package/src/tools/reputation.ts +0 -69
  40. package/src/tools/schemas.ts +0 -535
  41. package/src/tools/verification-keys.ts +0 -33
  42. package/src/tools/verification.ts +0 -59
  43. package/tests/conformance.test.ts +0 -197
  44. package/tests/conformance.ts +0 -65
  45. package/tests/mock-client.ts +0 -71
  46. package/tests/profiles.test.ts +0 -120
  47. package/tests/resources/contract-types.test.ts +0 -82
  48. package/tests/tools/a2a.test.ts +0 -213
  49. package/tests/tools/agent-mandates.test.ts +0 -196
  50. package/tests/tools/agents-refs.test.ts +0 -190
  51. package/tests/tools/capabilities.test.ts +0 -80
  52. package/tests/tools/compliance.test.ts +0 -123
  53. package/tests/tools/dashboard.test.ts +0 -111
  54. package/tests/tools/disputes.test.ts +0 -123
  55. package/tests/tools/enterprises.test.ts +0 -171
  56. package/tests/tools/events.test.ts +0 -56
  57. package/tests/tools/federation-admin.test.ts +0 -468
  58. package/tests/tools/federation.test.ts +0 -522
  59. package/tests/tools/health.test.ts +0 -56
  60. package/tests/tools/mandates.test.ts +0 -143
  61. package/tests/tools/openclaw.test.ts +0 -148
  62. package/tests/tools/receipts.test.ts +0 -157
  63. package/tests/tools/reputation.test.ts +0 -108
  64. package/tests/tools/schemas.test.ts +0 -374
  65. package/tests/tools/verification-keys.test.ts +0 -56
  66. package/tests/tools/verification.test.ts +0 -64
@@ -1,232 +0,0 @@
1
- import { z } from 'zod';
2
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
- import type { AgledgerClient } from '@agledger/sdk';
4
- import { apiErrorResult, toStructuredContent } from '../errors.js';
5
- import { toolMeta } from '../tool-scopes.js';
6
-
7
- export function registerAgentsRefsTools(mcp: McpServer, client: AgledgerClient): void {
8
- mcp.registerTool(
9
- 'get_agent',
10
- {
11
- title: 'Get Agent Profile',
12
- description:
13
- 'Retrieve an agent\'s profile by ID, including identity fields like agentClass, ownerRef, and orgUnit. ' +
14
- 'Use this before update_agent to see current values, or to verify an agent exists before assigning mandates.',
15
- inputSchema: {
16
- agentId: z.string().describe('Agent ID to retrieve'),
17
- },
18
- annotations: {
19
- readOnlyHint: true,
20
- destructiveHint: false,
21
- idempotentHint: true,
22
- openWorldHint: true,
23
- },
24
- _meta: toolMeta('get_agent'),
25
- },
26
- async (args) => {
27
- try {
28
- const result = await client.agents.get(args.agentId);
29
- return { content: [], structuredContent: toStructuredContent(result) };
30
- } catch (err) {
31
- return apiErrorResult(err);
32
- }
33
- },
34
- );
35
-
36
- mcp.registerTool(
37
- 'update_agent',
38
- {
39
- title: 'Update Agent Profile',
40
- description:
41
- 'Update an agent\'s identity fields (agentClass, ownerRef, orgUnit, description). ' +
42
- 'Only provided fields are changed; omitted fields remain unchanged. ' +
43
- 'Use get_agent first to review current values.',
44
- inputSchema: {
45
- agentId: z.string().describe('Agent ID to update'),
46
- agentClass: z.string().optional().describe('Agent classification (e.g. "data-processor", "orchestrator")'),
47
- ownerRef: z.string().optional().describe('Owner or team reference'),
48
- orgUnit: z.string().optional().describe('Organizational unit'),
49
- description: z.string().optional().describe('Human-readable agent description'),
50
- },
51
- annotations: {
52
- readOnlyHint: false,
53
- destructiveHint: false,
54
- idempotentHint: true,
55
- openWorldHint: true,
56
- },
57
- _meta: toolMeta('update_agent'),
58
- },
59
- async (args) => {
60
- try {
61
- const result = await client.agents.update(args.agentId, {
62
- agentClass: args.agentClass,
63
- ownerRef: args.ownerRef,
64
- orgUnit: args.orgUnit,
65
- description: args.description,
66
- });
67
- return { content: [], structuredContent: toStructuredContent(result) };
68
- } catch (err) {
69
- return apiErrorResult(err);
70
- }
71
- },
72
- );
73
-
74
- mcp.registerTool(
75
- 'add_agent_references',
76
- {
77
- title: 'Add Agent References',
78
- description:
79
- 'Add external references to an agent, linking it to records in external systems like Jira, Salesforce, or GitHub. ' +
80
- 'References enable reverse lookup via lookup_reference. ' +
81
- 'Use get_agent_references to see existing references before adding.',
82
- inputSchema: {
83
- agentId: z.string().describe('Agent ID to add references to'),
84
- references: z.array(z.object({
85
- system: z.string().describe('External system name (e.g. "jira", "salesforce", "github")'),
86
- refType: z.string().describe('Reference type within the system (e.g. "ticket", "case", "issue")'),
87
- refId: z.string().describe('Identifier in the external system'),
88
- metadata: z.record(z.string(), z.unknown()).optional().describe('Additional metadata about the reference'),
89
- })).describe('References to add'),
90
- },
91
- annotations: {
92
- readOnlyHint: false,
93
- destructiveHint: false,
94
- idempotentHint: false,
95
- openWorldHint: true,
96
- },
97
- _meta: toolMeta('add_agent_references'),
98
- },
99
- async (args) => {
100
- try {
101
- const result = await client.agents.addReferences(args.agentId, args.references);
102
- return { content: [], structuredContent: toStructuredContent(result) };
103
- } catch (err) {
104
- return apiErrorResult(err);
105
- }
106
- },
107
- );
108
-
109
- mcp.registerTool(
110
- 'get_agent_references',
111
- {
112
- title: 'Get Agent References',
113
- description:
114
- 'Get all external references for an agent. Returns links to external systems like Jira, Salesforce, or GitHub. ' +
115
- 'Use this to audit cross-system linkage or before adding new references.',
116
- inputSchema: {
117
- agentId: z.string().describe('Agent ID to get references for'),
118
- },
119
- annotations: {
120
- readOnlyHint: true,
121
- destructiveHint: false,
122
- idempotentHint: true,
123
- openWorldHint: true,
124
- },
125
- _meta: toolMeta('get_agent_references'),
126
- },
127
- async (args) => {
128
- try {
129
- const result = await client.agents.getReferences(args.agentId);
130
- const structured = Array.isArray(result) ? { references: result } : result;
131
- return { content: [], structuredContent: toStructuredContent(structured) };
132
- } catch (err) {
133
- return apiErrorResult(err);
134
- }
135
- },
136
- );
137
-
138
- mcp.registerTool(
139
- 'lookup_reference',
140
- {
141
- title: 'Lookup by External Reference',
142
- description:
143
- 'Reverse lookup an AGLedger entity by its external reference. ' +
144
- 'Use this to find mandates by Jira ticket IDs, Salesforce case numbers, GitHub issue URLs, or any other external system identifier. ' +
145
- 'Returns the AGLedger entity type and ID that matches the reference.',
146
- inputSchema: {
147
- system: z.string().describe('External system name (e.g. "jira", "salesforce", "github")'),
148
- refType: z.string().describe('Reference type within the system (e.g. "ticket", "case", "issue")'),
149
- refId: z.string().describe('Identifier in the external system'),
150
- },
151
- annotations: {
152
- readOnlyHint: true,
153
- destructiveHint: false,
154
- idempotentHint: true,
155
- openWorldHint: true,
156
- },
157
- _meta: toolMeta('lookup_reference'),
158
- },
159
- async (args) => {
160
- try {
161
- const result = await client.references.lookup(args);
162
- return { content: [], structuredContent: toStructuredContent(result) };
163
- } catch (err) {
164
- return apiErrorResult(err);
165
- }
166
- },
167
- );
168
-
169
- mcp.registerTool(
170
- 'add_mandate_references',
171
- {
172
- title: 'Add Mandate References',
173
- description:
174
- 'Add external references to a mandate, linking it to records in external systems. ' +
175
- 'For example, link a mandate to a Jira ticket, Salesforce opportunity, or GitHub PR. ' +
176
- 'References enable reverse lookup via lookup_reference and cross-system traceability.',
177
- inputSchema: {
178
- mandateId: z.string().describe('Mandate ID to add references to'),
179
- references: z.array(z.object({
180
- system: z.string().describe('External system name (e.g. "jira", "salesforce", "github")'),
181
- refType: z.string().describe('Reference type within the system (e.g. "ticket", "case", "pr")'),
182
- refId: z.string().describe('Identifier in the external system'),
183
- metadata: z.record(z.string(), z.unknown()).optional().describe('Additional metadata about the reference'),
184
- })).describe('References to add'),
185
- },
186
- annotations: {
187
- readOnlyHint: false,
188
- destructiveHint: false,
189
- idempotentHint: false,
190
- openWorldHint: true,
191
- },
192
- _meta: toolMeta('add_mandate_references'),
193
- },
194
- async (args) => {
195
- try {
196
- const result = await client.references.addMandateReferences(args.mandateId, args.references);
197
- return { content: [], structuredContent: toStructuredContent(result) };
198
- } catch (err) {
199
- return apiErrorResult(err);
200
- }
201
- },
202
- );
203
-
204
- mcp.registerTool(
205
- 'get_mandate_references',
206
- {
207
- title: 'Get Mandate References',
208
- description:
209
- 'Get all external references for a mandate. Returns links to external systems like Jira, Salesforce, or GitHub. ' +
210
- 'Use this for cross-system traceability or to verify linkage before adding new references.',
211
- inputSchema: {
212
- mandateId: z.string().describe('Mandate ID to get references for'),
213
- },
214
- annotations: {
215
- readOnlyHint: true,
216
- destructiveHint: false,
217
- idempotentHint: true,
218
- openWorldHint: true,
219
- },
220
- _meta: toolMeta('get_mandate_references'),
221
- },
222
- async (args) => {
223
- try {
224
- const result = await client.references.getMandateReferences(args.mandateId);
225
- const structured = Array.isArray(result) ? { references: result } : result;
226
- return { content: [], structuredContent: toStructuredContent(structured) };
227
- } catch (err) {
228
- return apiErrorResult(err);
229
- }
230
- },
231
- );
232
- }
@@ -1,63 +0,0 @@
1
- import { z } from 'zod';
2
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
- import type { AgledgerClient } from '@agledger/sdk';
4
- import { apiErrorResult, toStructuredContent } from '../errors.js';
5
- import { toolMeta } from '../tool-scopes.js';
6
- import { ContractTypeEnum } from '../enums.js';
7
-
8
- export function registerCapabilityTools(mcp: McpServer, client: AgledgerClient): void {
9
- mcp.registerTool(
10
- 'get_agent_capabilities',
11
- {
12
- title: 'Get Agent Capabilities',
13
- description: 'Get the declared contract type capabilities for an agent.',
14
- inputSchema: {
15
- agentId: z.string().describe('Agent ID to check capabilities for'),
16
- },
17
- annotations: {
18
- readOnlyHint: true,
19
- destructiveHint: false,
20
- idempotentHint: true,
21
- openWorldHint: true,
22
- },
23
- _meta: toolMeta('get_agent_capabilities'),
24
- },
25
- async (args) => {
26
- try {
27
- const result = await client.capabilities.get(args.agentId);
28
- return { content: [], structuredContent: toStructuredContent(result) };
29
- } catch (err) {
30
- return apiErrorResult(err);
31
- }
32
- },
33
- );
34
-
35
- mcp.registerTool(
36
- 'declare_capabilities',
37
- {
38
- title: 'Declare Capabilities',
39
- description: 'Declare the contract types this agent supports.',
40
- inputSchema: {
41
- agentId: z.string().describe('Agent ID to set capabilities for'),
42
- contractTypes: z.array(ContractTypeEnum).describe('Contract types this agent supports'),
43
- },
44
- annotations: {
45
- readOnlyHint: false,
46
- destructiveHint: false,
47
- idempotentHint: true,
48
- openWorldHint: true,
49
- },
50
- _meta: toolMeta('declare_capabilities'),
51
- },
52
- async (args) => {
53
- try {
54
- const result = await client.capabilities.set(args.agentId, {
55
- contractTypes: args.contractTypes,
56
- });
57
- return { content: [], structuredContent: toStructuredContent(result) };
58
- } catch (err) {
59
- return apiErrorResult(err);
60
- }
61
- },
62
- );
63
- }
@@ -1,70 +0,0 @@
1
- import { z } from 'zod';
2
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
- import type { AgledgerClient } from '@agledger/sdk';
4
- import { apiErrorResult, toStructuredContent } from '../errors.js';
5
- import { toolMeta } from '../tool-scopes.js';
6
-
7
- export function registerComplianceTools(mcp: McpServer, client: AgledgerClient): void {
8
- mcp.registerTool(
9
- 'create_compliance_record',
10
- {
11
- title: 'Create Compliance Record',
12
- description: 'Create a per-mandate compliance attestation. Record types: workplace_notification, affected_persons, input_data_quality, fundamental_rights_impact_assessment.',
13
- inputSchema: {
14
- mandateId: z.string().describe('Mandate ID to attach the record to'),
15
- recordType: z.string().describe('Record type (e.g. workplace_notification, affected_persons)'),
16
- attestation: z.record(z.string(), z.unknown()).describe('Attestation data'),
17
- attestedBy: z.string().describe('Who attested (name or ID)'),
18
- },
19
- annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
20
- _meta: toolMeta('create_compliance_record'),
21
- },
22
- async (args) => {
23
- try {
24
- const record = await client.compliance.createRecord(args.mandateId, {
25
- recordType: args.recordType as 'workplace_notification',
26
- attestation: args.attestation,
27
- attestedBy: args.attestedBy,
28
- });
29
- return { content: [], structuredContent: toStructuredContent(record) };
30
- } catch (err) { return apiErrorResult(err); }
31
- },
32
- );
33
-
34
- mcp.registerTool(
35
- 'list_compliance_records',
36
- {
37
- title: 'List Compliance Records',
38
- description: 'List compliance attestation records for a mandate.',
39
- inputSchema: {
40
- mandateId: z.string().describe('Mandate ID'),
41
- limit: z.number().optional().describe('Page size'),
42
- },
43
- annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
44
- _meta: toolMeta('list_compliance_records'),
45
- },
46
- async (args) => {
47
- try {
48
- const result = await client.compliance.listRecords(args.mandateId, { limit: args.limit });
49
- return { content: [], structuredContent: toStructuredContent(result) };
50
- } catch (err) { return apiErrorResult(err); }
51
- },
52
- );
53
-
54
- mcp.registerTool(
55
- 'get_eu_ai_act_report',
56
- {
57
- title: 'EU AI Act Report',
58
- description: 'Get EU AI Act compliance report showing risk classifications, human oversight designations, and audit status across all mandates.',
59
- inputSchema: {},
60
- annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
61
- _meta: toolMeta('get_eu_ai_act_report'),
62
- },
63
- async () => {
64
- try {
65
- const report = await client.compliance.getEuAiActReport();
66
- return { content: [], structuredContent: toStructuredContent(report) };
67
- } catch (err) { return apiErrorResult(err); }
68
- },
69
- );
70
- }
@@ -1,64 +0,0 @@
1
- import { z } from 'zod';
2
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
- import type { AgledgerClient } from '@agledger/sdk';
4
- import { apiErrorResult, toStructuredContent } from '../errors.js';
5
- import { toolMeta } from '../tool-scopes.js';
6
-
7
- export function registerDashboardTools(mcp: McpServer, client: AgledgerClient): void {
8
- mcp.registerTool(
9
- 'get_dashboard_summary',
10
- {
11
- title: 'Dashboard Summary',
12
- description: 'Get a high-level dashboard summary: mandate counts, active agents, fulfillment rates, settlement signals. Start here for situational awareness.',
13
- inputSchema: {},
14
- annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
15
- _meta: toolMeta('get_dashboard_summary'),
16
- },
17
- async () => {
18
- try {
19
- const summary = await client.dashboard.getSummary();
20
- return { content: [], structuredContent: toStructuredContent(summary) };
21
- } catch (err) { return apiErrorResult(err); }
22
- },
23
- );
24
-
25
- mcp.registerTool(
26
- 'get_dashboard_metrics',
27
- {
28
- title: 'Dashboard Metrics',
29
- description: 'Get time-series dashboard metrics (mandates, receipts, disputes) over a date range. Use for trend analysis.',
30
- inputSchema: {
31
- from: z.string().optional().describe('Start date (ISO 8601)'),
32
- to: z.string().optional().describe('End date (ISO 8601)'),
33
- granularity: z.enum(['daily', 'weekly', 'monthly']).optional().describe('Time bucket size'),
34
- },
35
- annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
36
- _meta: toolMeta('get_dashboard_metrics'),
37
- },
38
- async (args) => {
39
- try {
40
- const metrics = await client.dashboard.getMetrics(args);
41
- return { content: [], structuredContent: toStructuredContent(metrics) };
42
- } catch (err) { return apiErrorResult(err); }
43
- },
44
- );
45
-
46
- mcp.registerTool(
47
- 'get_dashboard_alerts',
48
- {
49
- title: 'Dashboard Alerts',
50
- description: 'Get active dashboard alerts (overdue mandates, failed verifications, circuit-breaker trips). Check this for issues requiring attention.',
51
- inputSchema: {
52
- limit: z.number().optional().describe('Page size'),
53
- },
54
- annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
55
- _meta: toolMeta('get_dashboard_alerts'),
56
- },
57
- async (args) => {
58
- try {
59
- const result = await client.dashboard.getAlerts(args);
60
- return { content: [], structuredContent: toStructuredContent(result) };
61
- } catch (err) { return apiErrorResult(err); }
62
- },
63
- );
64
- }
@@ -1,121 +0,0 @@
1
- import { z } from 'zod';
2
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
- import type { AgledgerClient } from '@agledger/sdk';
4
- import { apiErrorResult, toStructuredContent } from '../errors.js';
5
- import { toolMeta } from '../tool-scopes.js';
6
-
7
- export function registerDisputeTools(mcp: McpServer, client: AgledgerClient): void {
8
- mcp.registerTool(
9
- 'create_dispute',
10
- {
11
- title: 'Create Dispute',
12
- description: 'Open a dispute on a mandate. Grounds examples: "pricing_dispute", "mandate_ambiguity", "quality_issue".',
13
- inputSchema: {
14
- mandateId: z.string().describe('UUID of the mandate to dispute'),
15
- grounds: z.string().describe('Dispute grounds (e.g. "pricing_dispute", "mandate_ambiguity")'),
16
- context: z.string().optional().describe('Additional context for the dispute'),
17
- },
18
- annotations: {
19
- readOnlyHint: false,
20
- destructiveHint: false,
21
- idempotentHint: false,
22
- openWorldHint: true,
23
- },
24
- _meta: toolMeta('create_dispute'),
25
- },
26
- async (args) => {
27
- try {
28
- const { mandateId, ...disputeParams } = args;
29
- const dispute = await client.disputes.create(mandateId, disputeParams);
30
- return { content: [], structuredContent: toStructuredContent(dispute) };
31
- } catch (err) {
32
- return apiErrorResult(err);
33
- }
34
- },
35
- );
36
-
37
- mcp.registerTool(
38
- 'get_dispute',
39
- {
40
- title: 'Get Dispute',
41
- description: 'Get the dispute details for a mandate.',
42
- inputSchema: {
43
- mandateId: z.string().describe('UUID of the mandate with the dispute'),
44
- },
45
- annotations: {
46
- readOnlyHint: true,
47
- destructiveHint: false,
48
- idempotentHint: true,
49
- openWorldHint: true,
50
- },
51
- _meta: toolMeta('get_dispute'),
52
- },
53
- async (args) => {
54
- try {
55
- const result = await client.disputes.get(args.mandateId);
56
- const dispute = result.dispute;
57
- return { content: [], structuredContent: toStructuredContent(dispute) };
58
- } catch (err) {
59
- return apiErrorResult(err);
60
- }
61
- },
62
- );
63
-
64
- mcp.registerTool(
65
- 'escalate_dispute',
66
- {
67
- title: 'Escalate Dispute',
68
- description: 'Escalate a dispute to the next review tier. Use when tier-1 auto-resolution was insufficient.',
69
- inputSchema: {
70
- mandateId: z.string().describe('UUID of the mandate whose dispute to escalate'),
71
- },
72
- annotations: {
73
- readOnlyHint: false,
74
- destructiveHint: false,
75
- idempotentHint: false,
76
- openWorldHint: true,
77
- },
78
- _meta: toolMeta('escalate_dispute'),
79
- },
80
- async (args) => {
81
- try {
82
- const dispute = await client.disputes.escalate(args.mandateId);
83
- return { content: [], structuredContent: toStructuredContent(dispute) };
84
- } catch (err) {
85
- return apiErrorResult(err);
86
- }
87
- },
88
- );
89
-
90
- mcp.registerTool(
91
- 'submit_dispute_evidence',
92
- {
93
- title: 'Submit Dispute Evidence',
94
- description: 'Submit additional evidence for an open dispute. Evidence types: screenshot, external_lookup, document, communication, other.',
95
- inputSchema: {
96
- mandateId: z.string().describe('UUID of the mandate whose dispute to submit evidence for'),
97
- evidenceType: z.enum(['screenshot', 'external_lookup', 'document', 'communication', 'other']).describe('Type of evidence being submitted'),
98
- payload: z.record(z.string(), z.unknown()).describe('Evidence payload object'),
99
- },
100
- annotations: {
101
- readOnlyHint: false,
102
- destructiveHint: false,
103
- idempotentHint: false,
104
- openWorldHint: true,
105
- },
106
- _meta: toolMeta('submit_dispute_evidence'),
107
- },
108
- async (args) => {
109
- try {
110
- const result = await client.disputes.submitEvidence(args.mandateId, {
111
- evidenceType: args.evidenceType,
112
- payload: args.payload,
113
- });
114
- return { content: [], structuredContent: toStructuredContent(result) };
115
- } catch (err) {
116
- return apiErrorResult(err);
117
- }
118
- },
119
- );
120
-
121
- }