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.

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.

No schema history has been recorded yet.

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, open-world behavior, so the description's added value is the sentinel handling: 8888 and 9999 are returned with is_sentinel set rather than as lookup misses. That is genuinely useful non-obvious behavior. It stops short of saying what happens for a malformed or unknown 4-character code, which is the one remaining behavioral gap.

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-loads the decode summary, then handles sentinels, then the sibling routing rule — a sensible order. Dense but every sentence carries information; the example and sentinel clause could be tightened slightly but nothing is filler.

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?

No output schema exists, yet the description names the returned fields (name, language, country, jurisdiction) and the is_sentinel flag, covers the edge cases, and directs the agent away from unnecessary calls. Complete for a single-parameter lookup.

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%, so baseline is 3, but the description earns above that by explaining the code's real-world origin (GLEIF's legal_form field), giving a concrete decode example (XJHM → Aktiebolag), and documenting the two sentinel values' distinct meanings.

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 (decode) and resource (ISO 20275 ELF code) plus exactly what is returned: name, language, country, jurisdiction. It also explicitly distinguishes itself from get_lei, which decodes the same field inline, so the agent can route without opening either schema.

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?

Gives an explicit when-to-use rule: call directly only when you have a bare code from elsewhere, because get_lei already returns legal_form_decoded. It also names the source field to read the code from and warns not to guess.

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.