Skip to main content
Glama

registry-mcp — national company registries

Validate a company identifier (no network call)

validate_company_id
Read-onlyIdempotent

Check whether a national company identifier is well-formed — no network call.

country="NO" checksum-checks a Norwegian organisasjonsnummer (orgnr, org.nr) for Brønnøysundregistrene / Enhetsregisteret (brreg) — the cheap norway company lookup pre-check for the norwegian business registry. country="GB" shape-checks and normalises a UK company number (company registration number, CRN) for Companies House ('445790' → '00445790', 'oc303675' → 'OC303675'); a CRN has no check digit, so a GB valid: true means the shape is right and nothing more. country="SE" shape-checks and normalises a Swedish organisationsnummer for Bolagsverket ('556016-0680' and 'SE556016068001' both become '5560160680') and accepts a sole trader's twelve-digit personnummer; Sweden's check digit is not enforced here (registry://rules/SE says why), so an SE valid: true means the shape is right, reason may carry a caveat, and the register's own verdict arrives on the lookup. It is the cheapest way to tell a ten-digit Swedish organisationsnummer from a nine-digit Norwegian organisasjonsnummer.

Use it on user input or a spreadsheet column before spending a real lookup_company call, since it is instant and free.

Returns a ValidationResult and never raises for a malformed identifier: valid: false comes with reason and hint rather than a tool error — this tool answers a question, it does not fail on bad input (D-010). A valid identifier does not mean the entity exists; follow it with lookup_company if you need facts. The only error it raises is unsupported_country, in the usual {"error": {"code", "message", "hint"}} envelope — call list_countries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe company's national identifier, normalised for you — a Norwegian organisasjonsnummer (orgnr), a Companies House company number (CRN), or a Swedish organisationsnummer or personnummer. Spaces, dots, hyphens, a NO...MVA suffix and a short CRN are accepted; list_countries gives each country's exact shape.
countryNoISO-3166-1 alpha-2 — NO Norway, GB United Kingdom, SE Sweden. UK is not a country code here and is rejected. Call list_countries for the live set.NO

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintNoWhat to do next when `valid` is false — the same hint the invalid_id error carries. None when valid: the next call is simply lookup.
inputYesThe identifier exactly as the caller supplied it.
validYesTrue when the identifier passes this country's format and checksum.
reasonNoOne English sentence saying why it is valid, or what failed.
countryYesISO-3166-1 alpha-2, upper-case.
registryYesRegistry slug, e.g. 'brreg'.
formattedNoThe identifier as a local would write it, e.g. '923 609 016'. None when invalid.
id_schemeNoName of the identifier scheme, e.g. 'organisasjonsnummer'.
normalizedNoCanonical form to pass to lookup, e.g. '923609016'. None when invalid.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / country / description
      Previous value: -"ISO-3166-1 alpha-2 country code. 'NO' = Norway (Brønnøysundregistrene / Enhetsregisteret), 'GB' = United Kingdom (Companies House), 'SE' = Sweden (Bolagsverket). 'UK' is not a country code here and is rejected. Call list_countries for the current set rather than hard-coding one."New value: +"ISO-3166-1 alpha-2 — NO Norway, GB United Kingdom, SE Sweden. UK is not a country code here and is rejected. Call list_countries for the live set."
    • removedInput schema / properties / country / examples
      Removed value: -[
      -  "NO",
      -  "GB",
      -  "SE"
      -]
    • changedInput schema / properties / id / description
      Previous value: -"The company's national identifier. Norway (country='NO'): a nine-digit organisasjonsnummer (orgnr), e.g. '923609016'; spaces, dots and a 'NO...MVA' VAT suffix are accepted and normalised. United Kingdom (country='GB'): a Companies House company number (CRN), eight characters, e.g. '00445790' or 'OC303675'; a short number is zero-padded for you. Sweden (country='SE'): a ten-digit organisationsnummer, e.g. '5560160680', or a twelve-digit personnummer for a sole trader."New value: +"The company's national identifier, normalised for you — a Norwegian organisasjonsnummer (orgnr), a Companies House company number (CRN), or a Swedish organisationsnummer or personnummer. Spaces, dots, hyphens, a NO...MVA suffix and a short CRN are accepted; list_countries gives each country's exact shape."
  2. Changed3 schema fields changed
    • changedInput schema / properties / country / description
      Previous value: -"ISO-3166-1 alpha-2 country code. 'NO' = Norway (Brønnøysundregistrene / Enhetsregisteret), 'GB' = United Kingdom (Companies House). 'UK' is not a country code here and is rejected. Call list_countries for the current set rather than hard-coding one."New value: +"ISO-3166-1 alpha-2 country code. 'NO' = Norway (Brønnøysundregistrene / Enhetsregisteret), 'GB' = United Kingdom (Companies House), 'SE' = Sweden (Bolagsverket). 'UK' is not a country code here and is rejected. Call list_countries for the current set rather than hard-coding one."
    • changedInput schema / properties / country / examples
      Previous value: -[
      -  "NO",
      -  "GB"
      -]New value: +[
      +  "NO",
      +  "GB",
      +  "SE"
      +]
    • changedInput schema / properties / id / description
      Previous value: -"The company's national identifier. Norway (country='NO'): a nine-digit organisasjonsnummer (orgnr), e.g. '923609016'; spaces, dots and a 'NO...MVA' VAT suffix are accepted and normalised. United Kingdom (country='GB'): a Companies House company number (CRN), eight characters, e.g. '00445790' or 'OC303675'; a short number is zero-padded for you."New value: +"The company's national identifier. Norway (country='NO'): a nine-digit organisasjonsnummer (orgnr), e.g. '923609016'; spaces, dots and a 'NO...MVA' VAT suffix are accepted and normalised. United Kingdom (country='GB'): a Companies House company number (CRN), eight characters, e.g. '00445790' or 'OC303675'; a short number is zero-padded for you. Sweden (country='SE'): a ten-digit organisationsnummer, e.g. '5560160680', or a twelve-digit personnummer for a sole trader."
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, but the description adds substantial behavioral context beyond that: it never raises for malformed input (returns valid:false with reason/hint), raises only unsupported_country in the standard error envelope, and clarifies that GB 'valid:true' means shape only (no check digit) and SE does not enforce the check digit. This directly addresses what an agent would need to know about how the tool behaves.

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?

The description is long (several paragraphs) but it is front-loaded with the core purpose and usage guidance. Each country-specific paragraph earns its place by explaining distinct validation rules and caveats. It is structured (per-country sections, then error handling) which aids scanning. The length is justified by the multi-registry complexity, though a more compact summary could tighten it slightly.

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?

For a validation tool with multi-country rules and an output schema, the description is nearly exhaustive. It covers normalisation, checksum policies, error behavior, when to use, and follow-up actions. The existence of an output schema covers the return type, so the description doesn't need to explain that. Nothing an agent needs to call it correctly appears missing.

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 description coverage is 100%, so baseline is 3, but the description adds significant meaning: it gives concrete normalisation examples for GB ('445790' → '00445790', 'oc303675' → 'OC303675') and SE ('556016-0680' and 'SE556016068001' both become '5560160680'), explicitly rejects 'UK' as a country code, and clarifies that spaces, dots, hyphens, and NO...MVA suffix are accepted. This goes well beyond the schema's brief parameter descriptions.

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?

The description opens with a specific verb+resource ('Check whether a national company identifier is well-formed') and immediately scopes it ('no network call'). It differentiates itself from siblings like lookup_company (which provides actual entity facts) and list_countries (which lists supported countries) by framing itself as a cheap pre-check. The multi-country coverage is explicit, so an agent can tell it apart without opening any other tool.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: 'Use it on user input or a spreadsheet column before spending a real lookup_company call' and notes it's the cheapest way to tell a Swedish from a Norwegian identifier. It also advises following with lookup_company when facts are needed, effectively naming the alternative and the condition that selects it. No exclusions are left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.