Skip to main content
Glama

Verify a BIC (structural + optional directory lookup)

verify_bic_online
Read-onlyIdempotent

Verifies a BIC structure using ISO 9362 rules and optionally enriches the result with bank name, city, and country from a configured directory endpoint.

Instructions

Verify a BIC structurally, optionally enriched by a directory lookup.

Two-stage verification. First an OFFLINE ISO 9362 structural check (via the
pacs008 library): confirms the 8- or 11-character shape and that the
country code (chars 5-6) is a valid ISO 3166-1 alpha-2 code. A malformed
BIC returns ``{"bic": ..., "is_structurally_valid": False, "error": ...}``
and stops there.

Then, only if a directory endpoint is configured (the ``directory_url``
argument or the ``PACS008_BIC_DIRECTORY_URL`` environment variable), the
tool performs a read-only HTTP GET against that endpoint and folds whatever
institution ``name``/``city``/``country``/``status`` it returns into a
``directory`` sub-dict. There is no free authoritative SWIFT BIC directory,
so with NO endpoint configured the tool returns the structural result plus
a ``note`` and ``directory: null`` -- it never fabricates a bank name.

Online lookups require the optional ``online`` extra (``pip install
'pacs008-mcp[online]'``, which pulls in ``httpx``); without it the tool
still returns the structural result plus an ``error`` explaining the
missing extra. Endpoint 4xx/5xx responses and transport failures are
likewise reported as a graceful ``error`` alongside the structural result.

Returns a dict with ``bic``, ``is_structurally_valid``, ``bank_code``,
``country_code``, ``location_code``, ``branch_code``, ``length`` and either
``directory`` (a dict of institution details, or ``null``) plus, when
applicable, ``note`` / ``error``.

Args:
    bic: The BIC / SWIFT code to verify.
    directory_url: Optional directory endpoint for online enrichment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bicYesA BIC / SWIFT code to verify (ISO 9362), 8 or 11 characters, e.g. 'DEUTDEFF' or 'DEUTDEFF500'. Spaces and hyphens are stripped and the value is upper-cased before checking.
directory_urlNoOptional base URL of a BIC directory / reference-data endpoint to enrich the result with institution details. The tool issues a read-only HTTP GET with a '?bic=<BIC>' query parameter and parses the JSON object it returns (name/city/country/status). If omitted, the PACS008_BIC_DIRECTORY_URL environment variable is used; if neither is set, only the offline structural result is returned and NO institution name is inferred. No default/public directory ships with this server.
Behavior5/5

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

Adds extensive behavioral context beyond annotations: two-stage process, offline check details, directory lookup being read-only HTTP GET, no free authoritative directory, never fabricates bank name, graceful error handling, and pip install requirement.

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

Conciseness4/5

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

Description is longer but well-structured with clear sections. Front-loaded with purpose. Each sentence adds necessary detail; no redundancy.

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

Completeness5/5

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

Covers all operational aspects: malformed input, offline-only mode, missing online extra, endpoint errors, return value structure. No output schema needed given the detailed description.

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

Parameters5/5

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

Schema coverage is 100% but description adds significant value: bic stripping/uppercasing, directory_url usage with query parameter and env var fallback, and clear note about no default/public directory.

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

Purpose5/5

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

Title and first sentence clearly state it verifies a BIC structurally and optionally with directory lookup. Distinct from sibling tools (no other BIC verification tool).

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

Usage Guidelines4/5

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

Describes two-stage verification, conditions for online lookup, dependency on optional extra and environment variable, and fallback behavior. Lacks explicit exclusion statements or named alternatives, but context is clear.

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/sebastienrousseau/pacs008-mcp'

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