Skip to main content
Glama

Search Sanctions

search_sanctions

Search across OFAC SDN, EU, UN, and UK sanctions lists by name, alias, address, country, or program. Returns relevance-ranked results at $0.009 per query.

Instructions

Full-text search across all sanctions entries. Search by name, alias, address, country, or program. Returns matching entries ranked by relevance. Cost: $0.009 per query. Source: OFAC SDN, EU, UN, UK lists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesSearch query (name, alias, address, country, etc.)
limitNoMaximum results (default 25)

Implementation Reference

  • The async handler function for the 'search_sanctions' tool. Makes an API GET to /api/v1/sanctions/search with query 'q' and optional 'limit', then returns formatted results or an error message.
    async ({ q, limit }) => {
      const res = await apiGet<SanctionsQueryResponse>(
        "/api/v1/sanctions/search",
        { q, limit: limit ?? 25 },
      );
    
      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 result(s).`;
      const json = JSON.stringify(data, null, 2);
    
      return {
        content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
      };
    },
  • Input schema for search_sanctions tool: 'q' (required string query) and 'limit' (optional integer 1-100, default 25).
    inputSchema: {
      q: z.string().describe("Search query (name, alias, address, country, etc.)"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(100)
        .optional()
        .describe("Maximum results (default 25)"),
    },
  • Registration of the 'search_sanctions' tool via server.registerTool() with its title, description, inputSchema, and handler.
    server.registerTool(
      "search_sanctions",
      {
        title: "Search Sanctions",
        description:
          "Full-text search across all sanctions entries. Search by name, alias, address, " +
          "country, or program. Returns matching entries ranked by relevance. " +
          "Cost: $0.009 per query. Source: OFAC SDN, EU, UN, UK lists.",
        inputSchema: {
          q: z.string().describe("Search query (name, alias, address, country, etc.)"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 25)"),
        },
      },
      async ({ q, limit }) => {
        const res = await apiGet<SanctionsQueryResponse>(
          "/api/v1/sanctions/search",
          { q, limit: limit ?? 25 },
        );
    
        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 result(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • src/index.ts:48-48 (registration)
    Top-level registration call: registerSanctionsTools(server) invoked from main index.ts, which registers all sanctions tools including search_sanctions.
    registerSanctionsTools(server);
  • The apiGet helper used by the handler to make the GET request to the Verilex API. Also the stalenessWarning helper used to format stale data warnings.
    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,
      };
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden. It discloses search scope, fields, ranking, cost, and data sources. Absent are details on pagination, rate limits, or idempotency, but the core behavior is adequately communicated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise: three short sentences covering purpose, searchable fields, cost, and sources. Front-loaded with key action 'Full-text search'. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with a simple schema and no output schema, the description is moderately complete. It explains input and sources but omits output format, ranking details, and ties to sibling tools. Could be improved by noting when 'screen_sanctions' might be preferred.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds examples of valid search inputs (name, alias, etc.), which is helpful but not extensive. While it clarifies the 'q' parameter's intent, it does not significantly extend beyond schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states full-text search over sanctions entries, specifying searchable fields and ranking. However, it does not explicitly differentiate from sibling tools like 'screen_sanctions' or 'sanctions_stats', so it loses a point for lack of distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs. alternatives, nor any conditions or limitations. The cost information is useful but does not replace usage direction. This is a significant gap given the many sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/carrierone/verilexdata-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server