Skip to main content
Glama

Find a company by NIF

company_by_nif
Read-onlyIdempotent

Look up a Spanish company by its NIF/CIF tax ID to retrieve its registry slug, current name, and status. Use the returned slug to query the company's BORME history.

Instructions

Look up a Spanish company by its NIF/CIF tax ID. Use it when the user gives a tax ID (with a name use search_companies); on a hit, call company_history with the company_slug.

Returns JSON {found, company_slug, company_name, current_name, status, province, nif_source, nif_caveat, ...}; use current_name. BORME has no dedicated tax-ID field: there are more than 580,000 NIF mappings from public sources and the text of BORME notices, covering a minority of companies, so a miss (reason nif_unmapped) means "not matched yet", not "does not exist". invalid_input true: not a NIF/CIF. reason nif_check_character_failed: wrong check character; relay tell_the_user and the did_you_mean candidates. reason not_registry_entity: explain entity_type as the note does. ambiguous true: ask which candidate. nif_caveat present: say the link is not settled.

Read-only; one request per call. Needs the basic plan or higher: send your API key in the X-API-Key header (https://bormeapi.com/account).

Input Schema

NameRequiredDescriptionDefault
nifYesSpanish NIF/CIF, normally 9 characters, e.g. B12345674. Spaces, hyphens, dots and the ES VAT prefix (ESB12345674) are accepted; other country prefixes are not.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.1
    • changedInput schema / properties / nif / description
      Previous value: -"NIF/CIF, e.g. B12345674. Spaces, hyphens, dots and the ES VAT prefix (ESB12345674) are accepted; other country prefixes are not."New value: +"Spanish NIF/CIF, normally 9 characters, e.g. B12345674. Spaces, hyphens, dots and the ES VAT prefix (ESB12345674) are accepted; other country prefixes are not."
  2. Changed2 schema fields changedv1.1.1
    • addedInput schema / properties / nif / description
      Added value: +"NIF/CIF, e.g. B12345674. Spaces, hyphens, dots and the ES VAT prefix (ESB12345674) are accepted; other country prefixes are not."
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "company_by_nifOutput",
      -  "type": "object"
      -}New value: +null
  3. Addedv1.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent, and the description adds genuinely non-inferable context: one request per call, X-API-Key header plus plan requirement, and a coverage caveat (>580,000 mappings, minority of companies) with the crucial semantics that a miss means 'not matched yet', not 'does not exist'. It also decodes each failure reason (invalid_input, nif_check_character_failed, not_registry_entity, ambiguous, nif_caveat) and how to relay it.

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 purpose, then alternative, then return handling, then failure modes. It is dense rather than wasteful, though the single paragraph packs many clauses (reason codes, caveats, auth) that could be more cleanly separated.

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, so the description must explain returns — and it does, listing the JSON fields, which field to prefer (current_name), and the meaning of each status/reason. For a single-param read tool, nothing an agent needs to call or interpret it correctly is missing.

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 description coverage is 100% and already documents the NIF format, length, and accepted separators/prefixes, so the schema carries parameter semantics. The description adds no syntax detail beyond it; its value is in output interpretation, not the input parameter, so baseline 3 is right.

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 ('Look up a Spanish company by its NIF/CIF tax ID') and immediately distinguishes it from the sibling search_companies by input type. An agent can tell it apart without opening any 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?

Explicit routing: use this when the user gives a tax ID, use search_companies when a name is given, and on a hit chain into company_history with the returned company_slug. Both the use case and the alternative are named.

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