Sanctions Changes
sanctions_changesGet recent changes to sanctions lists, including additions, removals, and modifications. Specify a timestamp to retrieve updates since that time.
Instructions
Get recent changes to sanctions lists since a given timestamp. Shows additions, removals, and modifications to sanctioned entities. Cost: $0.005 per query. Source: Consolidated sanctions lists.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| since | Yes | ISO 8601 timestamp to get changes since (e.g. 2026-03-01T00:00:00Z) | |
| limit | No | Maximum results (default 50) |
Implementation Reference
- src/tools/sanctions.ts:162-189 (handler)The async handler function for the 'sanctions_changes' tool. It calls the API endpoint /api/v1/sanctions/changes with 'since' and 'limit' parameters, processes the response, and returns results with a summary showing the count of changes found.
async ({ since, limit }) => { const res = await apiGet<SanctionsQueryResponse>( "/api/v1/sanctions/changes", { since, limit: limit ?? 50 }, ); if (!res.ok) { return { content: [ { type: "text" as const, text: `API error (${res.status}): ${JSON.stringify(res.data)}`, }, ], isError: true, }; } const { count, data } = res.data; const warn = stalenessWarning(res); const summary = `${warn}Found ${count} sanctions change(s) since ${since}.`; const json = JSON.stringify(data, null, 2); return { content: [{ type: "text" as const, text: `${summary}\n\n${json}` }], }; }, ); - src/tools/sanctions.ts:141-161 (schema)The registration call for 'sanctions_changes' including its metadata (title, description, cost) and input schema defining 'since' (ISO 8601 timestamp, required) and 'limit' (max results, optional, default 50) parameters.
server.registerTool( "sanctions_changes", { title: "Sanctions Changes", description: "Get recent changes to sanctions lists since a given timestamp. Shows additions, " + "removals, and modifications to sanctioned entities. " + "Cost: $0.005 per query. Source: Consolidated sanctions lists.", inputSchema: { since: z .string() .describe("ISO 8601 timestamp to get changes since (e.g. 2026-03-01T00:00:00Z)"), limit: z .number() .int() .min(1) .max(100) .optional() .describe("Maximum results (default 50)"), }, }, - src/index.ts:48-48 (registration)Registration of the sanctions tools module (registerSanctionsTools) into the MCP server, which includes the 'sanctions_changes' tool.
registerSanctionsTools(server); - src/client.ts:44-76 (helper)The apiGet helper used by the sanctions_changes handler to make HTTP GET requests to the Verilex API.
export async function apiGet<T = unknown>( path: string, params?: Record<string, string | number | undefined>, ): Promise<ApiResponse<T>> { const url = buildUrl(path, params); const headers: Record<string, string> = { Accept: "application/json", "User-Agent": "verilex-mcp-server/0.1.0", }; // Forward x402 payment token if present in env (for paid endpoints) const paymentToken = process.env.VERILEX_PAYMENT_TOKEN; if (paymentToken) { headers["X-Payment-Token"] = paymentToken; } const res = await fetch(url, { headers }); const data = (await res.json()) as T; const stale = res.headers.get("X-Data-Stale"); const lastUpdated = res.headers.get("X-Data-Last-Updated"); const ageSeconds = res.headers.get("X-Data-Age-Seconds"); return { ok: res.ok, status: res.status, data, stale: stale === "true", lastUpdated: lastUpdated ?? undefined, ageSeconds: ageSeconds ? Number(ageSeconds) : undefined, }; }