@cyanheads/sanctions-screening-mcp-server 0.1.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 (110) hide show
  1. package/AGENTS.md +452 -0
  2. package/CLAUDE.md +452 -0
  3. package/Dockerfile +126 -0
  4. package/LICENSE +201 -0
  5. package/README.md +354 -0
  6. package/changelog/0.1.x/0.1.0.md +26 -0
  7. package/changelog/template.md +127 -0
  8. package/dist/config/server-config.d.ts +37 -0
  9. package/dist/config/server-config.d.ts.map +1 -0
  10. package/dist/config/server-config.js +87 -0
  11. package/dist/config/server-config.js.map +1 -0
  12. package/dist/index.d.ts +11 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +70 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/mcp-server/prompts/definitions/index.d.ts +12 -0
  17. package/dist/mcp-server/prompts/definitions/index.d.ts.map +1 -0
  18. package/dist/mcp-server/prompts/definitions/index.js +9 -0
  19. package/dist/mcp-server/prompts/definitions/index.js.map +1 -0
  20. package/dist/mcp-server/prompts/definitions/vet-counterparty.prompt.d.ts +14 -0
  21. package/dist/mcp-server/prompts/definitions/vet-counterparty.prompt.d.ts.map +1 -0
  22. package/dist/mcp-server/prompts/definitions/vet-counterparty.prompt.js +42 -0
  23. package/dist/mcp-server/prompts/definitions/vet-counterparty.prompt.js.map +1 -0
  24. package/dist/mcp-server/resources/definitions/designation.resource.d.ts +25 -0
  25. package/dist/mcp-server/resources/definitions/designation.resource.d.ts.map +1 -0
  26. package/dist/mcp-server/resources/definitions/designation.resource.js +57 -0
  27. package/dist/mcp-server/resources/definitions/designation.resource.js.map +1 -0
  28. package/dist/mcp-server/resources/definitions/entity.resource.d.ts +17 -0
  29. package/dist/mcp-server/resources/definitions/entity.resource.d.ts.map +1 -0
  30. package/dist/mcp-server/resources/definitions/entity.resource.js +40 -0
  31. package/dist/mcp-server/resources/definitions/entity.resource.js.map +1 -0
  32. package/dist/mcp-server/resources/definitions/index.d.ts +32 -0
  33. package/dist/mcp-server/resources/definitions/index.d.ts.map +1 -0
  34. package/dist/mcp-server/resources/definitions/index.js +11 -0
  35. package/dist/mcp-server/resources/definitions/index.js.map +1 -0
  36. package/dist/mcp-server/resources/definitions/sources.resource.d.ts +9 -0
  37. package/dist/mcp-server/resources/definitions/sources.resource.d.ts.map +1 -0
  38. package/dist/mcp-server/resources/definitions/sources.resource.js +50 -0
  39. package/dist/mcp-server/resources/definitions/sources.resource.js.map +1 -0
  40. package/dist/mcp-server/tools/definitions/_shared.d.ts +13 -0
  41. package/dist/mcp-server/tools/definitions/_shared.d.ts.map +1 -0
  42. package/dist/mcp-server/tools/definitions/_shared.js +13 -0
  43. package/dist/mcp-server/tools/definitions/_shared.js.map +1 -0
  44. package/dist/mcp-server/tools/definitions/get-designation.tool.d.ts +78 -0
  45. package/dist/mcp-server/tools/definitions/get-designation.tool.d.ts.map +1 -0
  46. package/dist/mcp-server/tools/definitions/get-designation.tool.js +168 -0
  47. package/dist/mcp-server/tools/definitions/get-designation.tool.js.map +1 -0
  48. package/dist/mcp-server/tools/definitions/get-entity.tool.d.ts +55 -0
  49. package/dist/mcp-server/tools/definitions/get-entity.tool.d.ts.map +1 -0
  50. package/dist/mcp-server/tools/definitions/get-entity.tool.js +176 -0
  51. package/dist/mcp-server/tools/definitions/get-entity.tool.js.map +1 -0
  52. package/dist/mcp-server/tools/definitions/index.d.ts +306 -0
  53. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
  54. package/dist/mcp-server/tools/definitions/index.js +21 -0
  55. package/dist/mcp-server/tools/definitions/index.js.map +1 -0
  56. package/dist/mcp-server/tools/definitions/list-sources.tool.d.ts +23 -0
  57. package/dist/mcp-server/tools/definitions/list-sources.tool.d.ts.map +1 -0
  58. package/dist/mcp-server/tools/definitions/list-sources.tool.js +106 -0
  59. package/dist/mcp-server/tools/definitions/list-sources.tool.js.map +1 -0
  60. package/dist/mcp-server/tools/definitions/resolve-entity.tool.d.ts +51 -0
  61. package/dist/mcp-server/tools/definitions/resolve-entity.tool.d.ts.map +1 -0
  62. package/dist/mcp-server/tools/definitions/resolve-entity.tool.js +148 -0
  63. package/dist/mcp-server/tools/definitions/resolve-entity.tool.js.map +1 -0
  64. package/dist/mcp-server/tools/definitions/screen-name.tool.d.ts +82 -0
  65. package/dist/mcp-server/tools/definitions/screen-name.tool.d.ts.map +1 -0
  66. package/dist/mcp-server/tools/definitions/screen-name.tool.js +172 -0
  67. package/dist/mcp-server/tools/definitions/screen-name.tool.js.map +1 -0
  68. package/dist/mcp-server/tools/definitions/trace-ownership.tool.d.ts +74 -0
  69. package/dist/mcp-server/tools/definitions/trace-ownership.tool.d.ts.map +1 -0
  70. package/dist/mcp-server/tools/definitions/trace-ownership.tool.js +273 -0
  71. package/dist/mcp-server/tools/definitions/trace-ownership.tool.js.map +1 -0
  72. package/dist/services/screening/fixtures.d.ts +17 -0
  73. package/dist/services/screening/fixtures.d.ts.map +1 -0
  74. package/dist/services/screening/fixtures.js +162 -0
  75. package/dist/services/screening/fixtures.js.map +1 -0
  76. package/dist/services/screening/gleif-ingest.d.ts +68 -0
  77. package/dist/services/screening/gleif-ingest.d.ts.map +1 -0
  78. package/dist/services/screening/gleif-ingest.js +251 -0
  79. package/dist/services/screening/gleif-ingest.js.map +1 -0
  80. package/dist/services/screening/sanctions-ingest.d.ts +46 -0
  81. package/dist/services/screening/sanctions-ingest.d.ts.map +1 -0
  82. package/dist/services/screening/sanctions-ingest.js +688 -0
  83. package/dist/services/screening/sanctions-ingest.js.map +1 -0
  84. package/dist/services/screening/schema.d.ts +52 -0
  85. package/dist/services/screening/schema.d.ts.map +1 -0
  86. package/dist/services/screening/schema.js +125 -0
  87. package/dist/services/screening/schema.js.map +1 -0
  88. package/dist/services/screening/screening-service.d.ts +203 -0
  89. package/dist/services/screening/screening-service.d.ts.map +1 -0
  90. package/dist/services/screening/screening-service.js +702 -0
  91. package/dist/services/screening/screening-service.js.map +1 -0
  92. package/dist/services/screening/text-matching.d.ts +53 -0
  93. package/dist/services/screening/text-matching.d.ts.map +1 -0
  94. package/dist/services/screening/text-matching.js +514 -0
  95. package/dist/services/screening/text-matching.js.map +1 -0
  96. package/dist/services/screening/types.d.ts +154 -0
  97. package/dist/services/screening/types.d.ts.map +1 -0
  98. package/dist/services/screening/types.js +24 -0
  99. package/dist/services/screening/types.js.map +1 -0
  100. package/dist/services/screening/xml.d.ts +29 -0
  101. package/dist/services/screening/xml.d.ts.map +1 -0
  102. package/dist/services/screening/xml.js +46 -0
  103. package/dist/services/screening/xml.js.map +1 -0
  104. package/package.json +119 -0
  105. package/scripts/_mirror-context.ts +21 -0
  106. package/scripts/mirror-init.ts +66 -0
  107. package/scripts/mirror-refresh.ts +56 -0
  108. package/scripts/mirror-seed.ts +36 -0
  109. package/scripts/mirror-verify.ts +44 -0
  110. package/server.json +148 -0
@@ -0,0 +1,176 @@
1
+ /**
2
+ * @fileoverview `sanctions_get_entity` — the full GLEIF Level 1 record for one
3
+ * LEI, plus any sanctions hits screened against the same legal name. Combines
4
+ * the who-is-who reference data with a cross-reference screen so an agent sees
5
+ * both "who is this entity" and "is its name on a watchlist" in one call.
6
+ * @module mcp-server/tools/definitions/get-entity.tool
7
+ */
8
+ import { tool, z } from '@cyanheads/mcp-ts-core';
9
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
10
+ import { getScreeningService } from '../../../services/screening/screening-service.js';
11
+ import { SOURCE_CODES, SOURCE_LABELS } from '../../../services/screening/types.js';
12
+ import { SCREENING_CAVEAT } from './_shared.js';
13
+ const LEI_RE = /^[A-Z0-9]{18}[0-9]{2}$/;
14
+ export const getEntityTool = tool('sanctions_get_entity', {
15
+ title: 'sanctions-screening-mcp-server: get entity',
16
+ description: 'Fetch the full GLEIF Level 1 record for one LEI: legal name, other/trading names, legal and headquarters addresses, registration status, jurisdiction, registration authority and ID, and last-update date — plus any sanctions hits screened against the same legal name across all loaded watchlists. The screening cross-reference is a screening AID: a hit is a candidate to verify against the official source, and no hit is not a clearance. LEI must be a 20-character GLEIF identifier (18 alphanumerics + 2 check digits).',
17
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
18
+ input: z.object({
19
+ lei: z
20
+ .string()
21
+ .regex(LEI_RE, 'LEI must be 20 chars: 18 alphanumerics + 2 check digits (e.g. 5493001KJTIIGC8Y1R12).')
22
+ .describe('The 20-character GLEIF Legal Entity Identifier to look up.'),
23
+ }),
24
+ output: z.object({
25
+ lei: z.string().describe('The 20-character GLEIF Legal Entity Identifier.'),
26
+ legalName: z.string().describe('Registered legal name.'),
27
+ otherNames: z.array(z.string()).describe('Other / trading names published in the LEI record.'),
28
+ jurisdiction: z.string().optional().describe('Legal jurisdiction (ISO code), when published.'),
29
+ status: z.string().optional().describe('Registration status (e.g. ISSUED, LAPSED).'),
30
+ legalAddress: z.string().optional().describe('Single-line legal address, when published.'),
31
+ headquartersAddress: z
32
+ .string()
33
+ .optional()
34
+ .describe('Single-line headquarters address, when published.'),
35
+ registrationAuthorityId: z
36
+ .string()
37
+ .optional()
38
+ .describe('Registration authority (RA) code, when published.'),
39
+ registrationAuthorityEntityId: z
40
+ .string()
41
+ .optional()
42
+ .describe("The entity's ID at its registration authority, when published."),
43
+ lastUpdate: z
44
+ .string()
45
+ .optional()
46
+ .describe('ISO 8601 last-update timestamp from the LEI record.'),
47
+ sanctionsHits: z
48
+ .array(z
49
+ .object({
50
+ source: z
51
+ .enum(['ofac_sdn', 'ofac_consolidated', 'eu', 'uk', 'un'])
52
+ .describe('Watchlist the candidate is on.'),
53
+ sourceLabel: z.string().describe('Human-readable source list name.'),
54
+ sourceEntryId: z
55
+ .string()
56
+ .describe('Source entry ID — pass to sanctions_get_designation.'),
57
+ primaryName: z.string().describe('Primary published name of the designation.'),
58
+ matchedName: z
59
+ .string()
60
+ .describe("The name/alias that matched the entity's legal name."),
61
+ matchType: z
62
+ .enum(['exact', 'strong', 'approximate'])
63
+ .describe('exact / strong / approximate match classification.'),
64
+ score: z
65
+ .number()
66
+ .optional()
67
+ .describe('Raw Jaro-Winkler similarity (0–1) for approximate hits only.'),
68
+ })
69
+ .describe("A potential watchlist match on the entity's legal name — verify, do not assume."))
70
+ .describe("Sanctions screening cross-reference on the entity's legal name."),
71
+ caveat: z
72
+ .string()
73
+ .describe('Decision-support caveat — the screening cross-reference is an aid, not a determination.'),
74
+ }),
75
+ errors: [
76
+ {
77
+ reason: 'lei_not_found',
78
+ code: JsonRpcErrorCode.NotFound,
79
+ when: 'No GLEIF entity exists for the given LEI in the mirror.',
80
+ recovery: 'Resolve the entity name with sanctions_resolve_entity to obtain a valid LEI first.',
81
+ },
82
+ {
83
+ reason: 'mirror_not_ready',
84
+ code: JsonRpcErrorCode.ServiceUnavailable,
85
+ when: 'The GLEIF (LEI) mirror has never completed an initial sync.',
86
+ retryable: true,
87
+ recovery: 'Run the mirror:init lifecycle script to load the GLEIF golden copy, then retry.',
88
+ },
89
+ ],
90
+ async handler(input, ctx) {
91
+ const svc = getScreeningService();
92
+ if (!(await svc.leiReady())) {
93
+ throw ctx.fail('mirror_not_ready', 'The local GLEIF (LEI) mirror is not yet populated.', {
94
+ ...ctx.recoveryFor('mirror_not_ready'),
95
+ });
96
+ }
97
+ const entity = await svc.getLeiEntity(input.lei);
98
+ if (!entity) {
99
+ throw ctx.fail('lei_not_found', `No GLEIF entity with LEI "${input.lei}".`, {
100
+ ...ctx.recoveryFor('lei_not_found'),
101
+ });
102
+ }
103
+ // Cross-reference screen on the legal name — only when the sanctions mirror is ready.
104
+ let sanctionsHits = [];
105
+ if (await svc.sanctionsReady()) {
106
+ const screen = await svc.screenName({
107
+ query: entity.legalName,
108
+ entityType: 'any',
109
+ matchMode: 'strict',
110
+ // Cross-reference screen: strict only. Auto-fuzzy on a generic legal
111
+ // name floods the result with single-common-token false positives.
112
+ autoFallback: false,
113
+ sources: [...SOURCE_CODES],
114
+ limit: 25,
115
+ }, ctx);
116
+ sanctionsHits = screen.hits;
117
+ }
118
+ return {
119
+ lei: entity.lei,
120
+ legalName: entity.legalName,
121
+ otherNames: entity.otherNames,
122
+ ...(entity.jurisdiction ? { jurisdiction: entity.jurisdiction } : {}),
123
+ ...(entity.status ? { status: entity.status } : {}),
124
+ ...(entity.legalAddress ? { legalAddress: entity.legalAddress } : {}),
125
+ ...(entity.headquartersAddress ? { headquartersAddress: entity.headquartersAddress } : {}),
126
+ ...(entity.registrationAuthorityId
127
+ ? { registrationAuthorityId: entity.registrationAuthorityId }
128
+ : {}),
129
+ ...(entity.registrationAuthorityEntityId
130
+ ? { registrationAuthorityEntityId: entity.registrationAuthorityEntityId }
131
+ : {}),
132
+ ...(entity.lastUpdate ? { lastUpdate: entity.lastUpdate } : {}),
133
+ sanctionsHits: sanctionsHits.map((h) => ({
134
+ source: h.source,
135
+ sourceLabel: SOURCE_LABELS[h.source],
136
+ sourceEntryId: h.sourceEntryId,
137
+ primaryName: h.primaryName,
138
+ matchedName: h.matchedName,
139
+ matchType: h.matchType,
140
+ ...(h.score !== undefined ? { score: h.score } : {}),
141
+ })),
142
+ caveat: SCREENING_CAVEAT,
143
+ };
144
+ },
145
+ format: (r) => {
146
+ const lines = [`# ${r.legalName}`, '', `**LEI:** \`${r.lei}\``];
147
+ if (r.otherNames.length > 0)
148
+ lines.push(`**Other names:** ${r.otherNames.join('; ')}`);
149
+ if (r.jurisdiction)
150
+ lines.push(`**Jurisdiction:** ${r.jurisdiction}`);
151
+ if (r.status)
152
+ lines.push(`**Registration status:** ${r.status}`);
153
+ if (r.legalAddress)
154
+ lines.push(`**Legal address:** ${r.legalAddress}`);
155
+ if (r.headquartersAddress)
156
+ lines.push(`**HQ address:** ${r.headquartersAddress}`);
157
+ if (r.registrationAuthorityId) {
158
+ lines.push(`**Registration authority:** ${r.registrationAuthorityId}${r.registrationAuthorityEntityId ? ` (entity ${r.registrationAuthorityEntityId})` : ''}`);
159
+ }
160
+ if (r.lastUpdate)
161
+ lines.push(`**Last update:** ${r.lastUpdate}`);
162
+ lines.push('\n## Sanctions screening cross-reference');
163
+ if (r.sanctionsHits.length === 0) {
164
+ lines.push('No potential watchlist matches on the legal name (NOT a clearance).');
165
+ }
166
+ else {
167
+ for (const h of r.sanctionsHits) {
168
+ const scoreStr = h.score !== undefined ? ` · score ${h.score.toFixed(3)}` : '';
169
+ lines.push(`- **${h.primaryName}** — ${h.sourceLabel} (\`${h.source}\`, entry ${h.sourceEntryId}), ${h.matchType}${scoreStr}, matched "${h.matchedName}"`);
170
+ }
171
+ }
172
+ lines.push(`\n> ${r.caveat}`);
173
+ return [{ type: 'text', text: lines.join('\n') }];
174
+ },
175
+ });
176
+ //# sourceMappingURL=get-entity.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-entity.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-entity.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,MAAM,GAAG,wBAAwB,CAAC;AAExC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,sBAAsB,EAAE;IACxD,KAAK,EAAE,4CAA4C;IACnD,WAAW,EACT,ugBAAugB;IACzgB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;IAC/E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,GAAG,EAAE,CAAC;aACH,MAAM,EAAE;aACR,KAAK,CACJ,MAAM,EACN,sFAAsF,CACvF;aACA,QAAQ,CAAC,4DAA4D,C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AAM,QAAQ,GAAG,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC/E,KAAK,CAAC,IAAI,CACR,OAAO,CAAC,CAAC,WAAW,QAAQ,CAAC,CAAC,WAAW,OAAO,CAAC,CAAC,MAAM,aAAa,CAAC,CAAC,aAAa,MAAM,CAAC,CAAC,SAAS,GAAG,QAAQ,cAAc,CAAC,CAAC,WAAW,GAAG,CAC/I,CAAC;YACJ,CAAC;QACH,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9B,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,306 @@
1
+ /**
2
+ * @fileoverview Barrel collecting all tool definitions into `allToolDefinitions`
3
+ * for `createApp()`.
4
+ * @module mcp-server/tools/definitions/index
5
+ */
6
+ import { getDesignationTool } from './get-designation.tool.js';
7
+ import { getEntityTool } from './get-entity.tool.js';
8
+ import { listSourcesTool } from './list-sources.tool.js';
9
+ import { resolveEntityTool } from './resolve-entity.tool.js';
10
+ import { screenNameTool } from './screen-name.tool.js';
11
+ import { traceOwnershipTool } from './trace-ownership.tool.js';
12
+ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
13
+ source: import("zod").ZodEnum<{
14
+ ofac_sdn: "ofac_sdn";
15
+ ofac_consolidated: "ofac_consolidated";
16
+ eu: "eu";
17
+ uk: "uk";
18
+ un: "un";
19
+ }>;
20
+ entryId: import("zod").ZodString;
21
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
22
+ source: import("zod").ZodEnum<{
23
+ ofac_sdn: "ofac_sdn";
24
+ ofac_consolidated: "ofac_consolidated";
25
+ eu: "eu";
26
+ uk: "uk";
27
+ un: "un";
28
+ }>;
29
+ sourceLabel: import("zod").ZodString;
30
+ sourceEntryId: import("zod").ZodString;
31
+ entityType: import("zod").ZodEnum<{
32
+ unknown: "unknown";
33
+ person: "person";
34
+ organization: "organization";
35
+ vessel: "vessel";
36
+ aircraft: "aircraft";
37
+ }>;
38
+ primaryName: import("zod").ZodString;
39
+ program: import("zod").ZodOptional<import("zod").ZodString>;
40
+ legalBasis: import("zod").ZodOptional<import("zod").ZodString>;
41
+ designationDate: import("zod").ZodOptional<import("zod").ZodString>;
42
+ aliases: import("zod").ZodArray<import("zod").ZodObject<{
43
+ name: import("zod").ZodString;
44
+ nameType: import("zod").ZodEnum<{
45
+ primary: "primary";
46
+ aka: "aka";
47
+ fka: "fka";
48
+ "low-quality-aka": "low-quality-aka";
49
+ }>;
50
+ }, import("zod/v4/core").$strip>>;
51
+ identifiers: import("zod").ZodArray<import("zod").ZodObject<{
52
+ type: import("zod").ZodString;
53
+ value: import("zod").ZodString;
54
+ country: import("zod").ZodOptional<import("zod").ZodString>;
55
+ }, import("zod/v4/core").$strip>>;
56
+ addresses: import("zod").ZodArray<import("zod").ZodObject<{
57
+ full: import("zod").ZodString;
58
+ country: import("zod").ZodOptional<import("zod").ZodString>;
59
+ }, import("zod/v4/core").$strip>>;
60
+ datesOfBirth: import("zod").ZodArray<import("zod").ZodObject<{
61
+ date: import("zod").ZodOptional<import("zod").ZodString>;
62
+ place: import("zod").ZodOptional<import("zod").ZodString>;
63
+ }, import("zod/v4/core").$strip>>;
64
+ nationalities: import("zod").ZodArray<import("zod").ZodString>;
65
+ remarks: import("zod").ZodOptional<import("zod").ZodString>;
66
+ caveat: import("zod").ZodString;
67
+ }, import("zod/v4/core").$strip>, readonly [{
68
+ readonly reason: "designation_not_found";
69
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
70
+ readonly when: "No designation exists for the given source + entry ID in the mirror.";
71
+ readonly recovery: "Verify the source and entryId via sanctions_screen_name, which returns the exact sourceEntryId for each hit.";
72
+ }, {
73
+ readonly reason: "mirror_not_ready";
74
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
75
+ readonly when: "The sanctions mirror has never completed an initial sync.";
76
+ readonly retryable: true;
77
+ readonly recovery: "Run the mirror:init lifecycle script to load the sanctions lists, then retry.";
78
+ }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
79
+ lei: import("zod").ZodString;
80
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
81
+ lei: import("zod").ZodString;
82
+ legalName: import("zod").ZodString;
83
+ otherNames: import("zod").ZodArray<import("zod").ZodString>;
84
+ jurisdiction: import("zod").ZodOptional<import("zod").ZodString>;
85
+ status: import("zod").ZodOptional<import("zod").ZodString>;
86
+ legalAddress: import("zod").ZodOptional<import("zod").ZodString>;
87
+ headquartersAddress: import("zod").ZodOptional<import("zod").ZodString>;
88
+ registrationAuthorityId: import("zod").ZodOptional<import("zod").ZodString>;
89
+ registrationAuthorityEntityId: import("zod").ZodOptional<import("zod").ZodString>;
90
+ lastUpdate: import("zod").ZodOptional<import("zod").ZodString>;
91
+ sanctionsHits: import("zod").ZodArray<import("zod").ZodObject<{
92
+ source: import("zod").ZodEnum<{
93
+ ofac_sdn: "ofac_sdn";
94
+ ofac_consolidated: "ofac_consolidated";
95
+ eu: "eu";
96
+ uk: "uk";
97
+ un: "un";
98
+ }>;
99
+ sourceLabel: import("zod").ZodString;
100
+ sourceEntryId: import("zod").ZodString;
101
+ primaryName: import("zod").ZodString;
102
+ matchedName: import("zod").ZodString;
103
+ matchType: import("zod").ZodEnum<{
104
+ exact: "exact";
105
+ strong: "strong";
106
+ approximate: "approximate";
107
+ }>;
108
+ score: import("zod").ZodOptional<import("zod").ZodNumber>;
109
+ }, import("zod/v4/core").$strip>>;
110
+ caveat: import("zod").ZodString;
111
+ }, import("zod/v4/core").$strip>, readonly [{
112
+ readonly reason: "lei_not_found";
113
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
114
+ readonly when: "No GLEIF entity exists for the given LEI in the mirror.";
115
+ readonly recovery: "Resolve the entity name with sanctions_resolve_entity to obtain a valid LEI first.";
116
+ }, {
117
+ readonly reason: "mirror_not_ready";
118
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
119
+ readonly when: "The GLEIF (LEI) mirror has never completed an initial sync.";
120
+ readonly retryable: true;
121
+ readonly recovery: "Run the mirror:init lifecycle script to load the GLEIF golden copy, then retry.";
122
+ }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
123
+ sanctionsReady: import("zod").ZodBoolean;
124
+ sanctionsAsOf: import("zod").ZodOptional<import("zod").ZodString>;
125
+ leiReady: import("zod").ZodBoolean;
126
+ leiAsOf: import("zod").ZodOptional<import("zod").ZodString>;
127
+ sources: import("zod").ZodArray<import("zod").ZodObject<{
128
+ code: import("zod").ZodString;
129
+ label: import("zod").ZodString;
130
+ recordCount: import("zod").ZodNumber;
131
+ url: import("zod").ZodString;
132
+ license: import("zod").ZodString;
133
+ }, import("zod/v4/core").$strip>>;
134
+ }, import("zod/v4/core").$strip>, undefined, undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
135
+ name: import("zod").ZodString;
136
+ jurisdiction: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
137
+ matchMode: import("zod").ZodDefault<import("zod").ZodEnum<{
138
+ strict: "strict";
139
+ fuzzy: "fuzzy";
140
+ }>>;
141
+ status: import("zod").ZodDefault<import("zod").ZodEnum<{
142
+ any: "any";
143
+ issued: "issued";
144
+ lapsed: "lapsed";
145
+ }>>;
146
+ minScore: import("zod").ZodOptional<import("zod").ZodNumber>;
147
+ limit: import("zod").ZodDefault<import("zod").ZodNumber>;
148
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
149
+ matches: import("zod").ZodArray<import("zod").ZodObject<{
150
+ lei: import("zod").ZodString;
151
+ legalName: import("zod").ZodString;
152
+ matchedName: import("zod").ZodString;
153
+ matchType: import("zod").ZodEnum<{
154
+ exact: "exact";
155
+ strong: "strong";
156
+ approximate: "approximate";
157
+ }>;
158
+ score: import("zod").ZodOptional<import("zod").ZodNumber>;
159
+ jurisdiction: import("zod").ZodOptional<import("zod").ZodString>;
160
+ status: import("zod").ZodOptional<import("zod").ZodString>;
161
+ }, import("zod/v4/core").$strip>>;
162
+ }, import("zod/v4/core").$strip>, readonly [{
163
+ readonly reason: "mirror_not_ready";
164
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
165
+ readonly when: "The GLEIF (LEI) mirror has never completed an initial sync.";
166
+ readonly retryable: true;
167
+ readonly recovery: "Run the mirror:init lifecycle script to load the GLEIF golden copy, then retry; check sanctions_list_sources for readiness.";
168
+ }], {
169
+ readonly normalizedQuery: import("zod").ZodString;
170
+ readonly matchModeUsed: import("zod").ZodString;
171
+ readonly totalCount: import("zod").ZodNumber;
172
+ readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
173
+ }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
174
+ name: import("zod").ZodString;
175
+ entityType: import("zod").ZodDefault<import("zod").ZodEnum<{
176
+ any: "any";
177
+ person: "person";
178
+ organization: "organization";
179
+ vessel: "vessel";
180
+ aircraft: "aircraft";
181
+ }>>;
182
+ matchMode: import("zod").ZodDefault<import("zod").ZodEnum<{
183
+ strict: "strict";
184
+ fuzzy: "fuzzy";
185
+ }>>;
186
+ minScore: import("zod").ZodOptional<import("zod").ZodNumber>;
187
+ sources: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
188
+ ofac_sdn: "ofac_sdn";
189
+ ofac_consolidated: "ofac_consolidated";
190
+ eu: "eu";
191
+ uk: "uk";
192
+ un: "un";
193
+ }>>>;
194
+ limit: import("zod").ZodDefault<import("zod").ZodNumber>;
195
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
196
+ hits: import("zod").ZodArray<import("zod").ZodObject<{
197
+ source: import("zod").ZodEnum<{
198
+ ofac_sdn: "ofac_sdn";
199
+ ofac_consolidated: "ofac_consolidated";
200
+ eu: "eu";
201
+ uk: "uk";
202
+ un: "un";
203
+ }>;
204
+ sourceLabel: import("zod").ZodString;
205
+ sourceEntryId: import("zod").ZodString;
206
+ entityType: import("zod").ZodEnum<{
207
+ unknown: "unknown";
208
+ person: "person";
209
+ organization: "organization";
210
+ vessel: "vessel";
211
+ aircraft: "aircraft";
212
+ }>;
213
+ primaryName: import("zod").ZodString;
214
+ matchedName: import("zod").ZodString;
215
+ matchedNameType: import("zod").ZodEnum<{
216
+ primary: "primary";
217
+ aka: "aka";
218
+ fka: "fka";
219
+ "low-quality-aka": "low-quality-aka";
220
+ }>;
221
+ matchType: import("zod").ZodEnum<{
222
+ exact: "exact";
223
+ strong: "strong";
224
+ approximate: "approximate";
225
+ }>;
226
+ score: import("zod").ZodOptional<import("zod").ZodNumber>;
227
+ program: import("zod").ZodOptional<import("zod").ZodString>;
228
+ designationDate: import("zod").ZodOptional<import("zod").ZodString>;
229
+ }, import("zod/v4/core").$strip>>;
230
+ caveat: import("zod").ZodString;
231
+ }, import("zod/v4/core").$strip>, readonly [{
232
+ readonly reason: "mirror_not_ready";
233
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
234
+ readonly when: "The sanctions mirror has never completed an initial sync.";
235
+ readonly retryable: true;
236
+ readonly recovery: "Run the mirror:init lifecycle script to load the sanctions lists, then retry; check sanctions_list_sources for readiness.";
237
+ }], {
238
+ readonly normalizedQuery: import("zod").ZodString;
239
+ readonly matchModeUsed: import("zod").ZodString;
240
+ readonly totalCount: import("zod").ZodNumber;
241
+ readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
242
+ }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
243
+ lei: import("zod").ZodString;
244
+ direction: import("zod").ZodDefault<import("zod").ZodEnum<{
245
+ parents: "parents";
246
+ children: "children";
247
+ both: "both";
248
+ }>>;
249
+ depth: import("zod").ZodDefault<import("zod").ZodNumber>;
250
+ screenNodes: import("zod").ZodDefault<import("zod").ZodBoolean>;
251
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
252
+ rootLei: import("zod").ZodString;
253
+ nodes: import("zod").ZodArray<import("zod").ZodObject<{
254
+ lei: import("zod").ZodString;
255
+ legalName: import("zod").ZodString;
256
+ jurisdiction: import("zod").ZodOptional<import("zod").ZodString>;
257
+ status: import("zod").ZodOptional<import("zod").ZodString>;
258
+ depth: import("zod").ZodNumber;
259
+ role: import("zod").ZodEnum<{
260
+ root: "root";
261
+ parent: "parent";
262
+ child: "child";
263
+ }>;
264
+ sanctionsHits: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
265
+ source: import("zod").ZodEnum<{
266
+ ofac_sdn: "ofac_sdn";
267
+ ofac_consolidated: "ofac_consolidated";
268
+ eu: "eu";
269
+ uk: "uk";
270
+ un: "un";
271
+ }>;
272
+ sourceLabel: import("zod").ZodString;
273
+ sourceEntryId: import("zod").ZodString;
274
+ primaryName: import("zod").ZodString;
275
+ matchedName: import("zod").ZodString;
276
+ matchType: import("zod").ZodEnum<{
277
+ exact: "exact";
278
+ strong: "strong";
279
+ approximate: "approximate";
280
+ }>;
281
+ score: import("zod").ZodOptional<import("zod").ZodNumber>;
282
+ }, import("zod/v4/core").$strip>>>;
283
+ }, import("zod/v4/core").$strip>>;
284
+ edges: import("zod").ZodArray<import("zod").ZodObject<{
285
+ childLei: import("zod").ZodString;
286
+ parentLei: import("zod").ZodString;
287
+ relationshipType: import("zod").ZodString;
288
+ relationshipStatus: import("zod").ZodOptional<import("zod").ZodString>;
289
+ }, import("zod/v4/core").$strip>>;
290
+ screenedNodeCount: import("zod").ZodNumber;
291
+ flaggedNodeCount: import("zod").ZodNumber;
292
+ caveat: import("zod").ZodString;
293
+ }, import("zod/v4/core").$strip>, readonly [{
294
+ readonly reason: "lei_not_found";
295
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
296
+ readonly when: "No GLEIF entity exists for the root LEI in the mirror.";
297
+ readonly recovery: "Resolve the entity name with sanctions_resolve_entity to obtain a valid root LEI first.";
298
+ }, {
299
+ readonly reason: "mirror_not_ready";
300
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
301
+ readonly when: "The GLEIF (LEI) mirror has never completed an initial sync.";
302
+ readonly retryable: true;
303
+ readonly recovery: "Run the mirror:init lifecycle script to load the GLEIF golden copy + relationships, then retry.";
304
+ }], undefined>)[];
305
+ export { getDesignationTool, getEntityTool, listSourcesTool, resolveEntityTool, screenNameTool, traceOwnershipTool, };
306
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAO9B,CAAC;AAEF,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,kBAAkB,GACnB,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @fileoverview Barrel collecting all tool definitions into `allToolDefinitions`
3
+ * for `createApp()`.
4
+ * @module mcp-server/tools/definitions/index
5
+ */
6
+ import { getDesignationTool } from './get-designation.tool.js';
7
+ import { getEntityTool } from './get-entity.tool.js';
8
+ import { listSourcesTool } from './list-sources.tool.js';
9
+ import { resolveEntityTool } from './resolve-entity.tool.js';
10
+ import { screenNameTool } from './screen-name.tool.js';
11
+ import { traceOwnershipTool } from './trace-ownership.tool.js';
12
+ export const allToolDefinitions = [
13
+ screenNameTool,
14
+ getDesignationTool,
15
+ listSourcesTool,
16
+ resolveEntityTool,
17
+ getEntityTool,
18
+ traceOwnershipTool,
19
+ ];
20
+ export { getDesignationTool, getEntityTool, listSourcesTool, resolveEntityTool, screenNameTool, traceOwnershipTool, };
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,cAAc;IACd,kBAAkB;IAClB,eAAe;IACf,iBAAiB;IACjB,aAAa;IACb,kBAAkB;CACnB,CAAC;AAEF,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,kBAAkB,GACnB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @fileoverview `sanctions_list_sources` — provenance and freshness for any
3
+ * result. Lists the sanctions watchlists and GLEIF datasets currently loaded in
4
+ * the local mirror, each with its record count, source URL, license, and the
5
+ * mirror's readiness + as-of timestamp. Lets an agent judge staleness before
6
+ * trusting (or distrusting) a screen.
7
+ * @module mcp-server/tools/definitions/list-sources.tool
8
+ */
9
+ import { z } from '@cyanheads/mcp-ts-core';
10
+ export declare const listSourcesTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
11
+ sanctionsReady: z.ZodBoolean;
12
+ sanctionsAsOf: z.ZodOptional<z.ZodString>;
13
+ leiReady: z.ZodBoolean;
14
+ leiAsOf: z.ZodOptional<z.ZodString>;
15
+ sources: z.ZodArray<z.ZodObject<{
16
+ code: z.ZodString;
17
+ label: z.ZodString;
18
+ recordCount: z.ZodNumber;
19
+ url: z.ZodString;
20
+ license: z.ZodString;
21
+ }, z.core.$strip>>;
22
+ }, z.core.$strip>, undefined, undefined>;
23
+ //# sourceMappingURL=list-sources.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-sources.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-sources.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAgBjD,eAAO,MAAM,eAAe;;;;;;;;;;;;wCAgG1B,CAAC"}