Skip to main content
Glama

Decode Elf Code

decode_elf_code
Read-onlyIdempotent

Decode an ISO 20275 Entity Legal Form (ELF) code to its registered name, language, country and jurisdiction. This is the 4-character code GLEIF publishes as legal_form on every LEI record (get_lei, search_lei results)"XJHM" decodes to Sweden's "Aktiebolag", for example. Two sentinel codes carry no country or jurisdiction: "8888" (no specific legal form recorded, used where the concept does not apply, e.g. some government entities) and "9999" (legal form not yet classified by the registering LOU); both are flagged via is_sentinel rather than answered as a plain lookup miss. get_lei already decodes this field inline as legal_form_decoded, call this tool directly only when you have a bare code from elsewhere.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "8888"
    },
    "name": "decode_elf_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes4-character ISO 20275 ELF code, e.g. "XJHM" (Sweden, Aktiebolag) or the sentinel "8888"/"9999". Read it off an LEI record's legal_form field, do not guess one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / code / description
      Previous value: -"4-character ISO 20275 ELF code, e.g. \"XJHM\" (Sweden, Aktiebolag) or the sentinel \"8888\"/\"9999\". Read it off an LEI record's legal_form field — do not guess one."New value: +"4-character ISO 20275 ELF code, e.g. \"XJHM\" (Sweden, Aktiebolag) or the sentinel \"8888\"/\"9999\". Read it off an LEI record's legal_form field, do not guess one."
  2. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, openWorld), and the description adds real behavioral context beyond them: the two sentinel codes '8888' and '9999' are not lookup misses but flagged results via `is_sentinel`, with the meaning of each sentinel spelled out. It stops short of describing error behavior for genuinely invalid codes, which keeps it at 4 rather than 5.

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?

Front-loaded with the core purpose, then source field, then sentinel edge cases, then the routing rule — a logical progression with no filler sentences. It is a single dense block rather than being broken up, but every clause carries information an agent needs.

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?

There is no output schema, so the description must describe returns, and it does: name, language, country, jurisdiction, plus the `is_sentinel` flag. Combined with the explicit when-not-to-use rule and the sentinel edge cases, an agent has everything needed to call this correctly.

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

Parameters4/5

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

Schema coverage is 100% and the schema already shows the sentinel examples, so the baseline is 3. The description goes beyond it by explaining what each sentinel means semantically (no specific legal form recorded vs. not yet classified by the registering LOU) and by warning not to guess a code, which adds genuine meaning about valid input values.

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?

States a specific verb and resource ('Decode an ISO 20275 Entity Legal Form (ELF) code') and enumerates exactly what is returned: registered name, language, country, jurisdiction. It ties the input to a concrete source field ('the 4-character code GLEIF publishes as `legal_form`') and gives a worked example, so an agent can immediately tell this apart from get_lei and search_lei.

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?

Explicitly states when NOT to use it: 'get_lei already decodes this field inline as legal_form_decoded, call this tool directly only when you have a bare code from elsewhere.' That is a precise routing rule with the alternative named and the selecting condition given, leaving nothing 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.