Skip to main content
Glama
ENTIA-IA

ENTIA Entity Verification

Official

borme_lookup

Look up Spanish corporate acts and entity details from BORME, including founding dates and officers, by company name or CIF.

Instructions

Spanish mercantile acts from BORME (40M+ acts, 2009-2026).

Use when: user asks "who founded X?", "when was X incorporated?", "directors of Santander", "corporate history of Inditex". Returns: Acts count, key officers, founding date, corporate events.

Examples: borme_lookup("Telefonica") → 17,320 acts borme_lookup("A28015865") → Telefonica by CIF borme_lookup("Santander") → 50,722 acts

Args: query: Company name or Spanish CIF (without ES prefix, e.g. A28015865)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for borme_lookup. Calls the ENTIA REST API /v1/profile/{query} with country=ES, extracts the 'borme' section from the response, and returns a structured dict with found, entity, borme, acts count, officers, founding date, and trust score.
    @mcp.tool()
    def borme_lookup(query: str) -> dict[str, Any]:
        """Spanish mercantile acts from BORME (40M+ acts, 2009-2026).
    
        Use when: user asks "who founded X?", "when was X incorporated?",
                  "directors of Santander", "corporate history of Inditex".
        Returns: Acts count, key officers, founding date, corporate events.
    
        Examples:
          borme_lookup("Telefonica")   → 17,320 acts
          borme_lookup("A28015865")    → Telefonica by CIF
          borme_lookup("Santander")    → 50,722 acts
    
        Args:
            query: Company name or Spanish CIF (without ES prefix, e.g. A28015865)
        """
        result = _get(f"/v1/profile/{query}", {"country": "ES"})
        borme = result.get("borme", {})
        return {
            "found": result.get("found", False),
            "entity": result.get("entity", {}),
            "borme": borme,
            "borme_acts_count": borme.get("acts_count", 0),
            "officers": borme.get("officers", []),
            "founding_date": borme.get("founding_date"),
            "trust_score": result.get("trust_score", {}),
        }
  • The borme_lookup function is registered as an MCP tool via the @mcp.tool() decorator on the FastMCP instance named 'mcp'.
    @mcp.tool()
    def borme_lookup(query: str) -> dict[str, Any]:
        """Spanish mercantile acts from BORME (40M+ acts, 2009-2026).
    
        Use when: user asks "who founded X?", "when was X incorporated?",
                  "directors of Santander", "corporate history of Inditex".
        Returns: Acts count, key officers, founding date, corporate events.
    
        Examples:
          borme_lookup("Telefonica")   → 17,320 acts
          borme_lookup("A28015865")    → Telefonica by CIF
          borme_lookup("Santander")    → 50,722 acts
    
        Args:
            query: Company name or Spanish CIF (without ES prefix, e.g. A28015865)
        """
        result = _get(f"/v1/profile/{query}", {"country": "ES"})
        borme = result.get("borme", {})
        return {
            "found": result.get("found", False),
            "entity": result.get("entity", {}),
            "borme": borme,
            "borme_acts_count": borme.get("acts_count", 0),
            "officers": borme.get("officers", []),
            "founding_date": borme.get("founding_date"),
            "trust_score": result.get("trust_score", {}),
        }
  • Helper function that builds HTTP headers including the API key for calls to the ENTIA REST API.
    def _headers() -> dict[str, str]:
        h: dict[str, str] = {
            "Accept": "application/json",
            "User-Agent": "entia-mcp-server/3.2.4",
        }
        if API_KEY:
            h["X-ENTIA-Key"] = API_KEY
        return h
    
    
    def _get(path: str, params: Optional[dict[str, Any]] = None) -> dict[str, Any]:
  • Helper function used by borme_lookup to make GET requests to the ENTIA REST API with error handling.
    def _get(path: str, params: Optional[dict[str, Any]] = None) -> dict[str, Any]:
        """GET request to ENTIA REST API."""
        url = f"{BASE_URL}{path}"
        try:
            with httpx.Client(timeout=TIMEOUT) as client:
                r = client.get(url, headers=_headers(), params=params or {})
            r.raise_for_status()
            return r.json()
        except httpx.HTTPStatusError as exc:
            return {"error": str(exc), "status_code": exc.response.status_code}
        except Exception as exc:  # noqa: BLE001
            return {"error": str(exc)}
Behavior4/5

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

Without annotations, the description reveals key behavioral details: it covers 40M+ acts from 2009-2026, returns act count, key officers, founding date, and events. It also specifies the query format (CIF without ES prefix). This is transparent, though it could mention rate limits or data freshness.

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

Conciseness5/5

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

The description is concise, well-structured with line breaks for examples, and uses front-loaded purpose. Every sentence adds value; 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?

Given the output schema exists (context signals), the description adequately covers input format, output summary (acts count, officers, events), and scope. It is complete for this simple tool with one parameter.

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?

The sole parameter 'query' has no schema description (0% coverage), but the description compensates fully by explaining it can be a company name or Spanish CIF without the ES prefix, with an example. This adds critical meaning beyond the schema.

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 clearly states that the tool looks up Spanish mercantile acts from BORME, providing specific use cases like 'who founded X?' and examples. It effectively distinguishes itself from sibling tools (e.g., entity_lookup, verify_vat) by focusing on BORME records.

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?

The description includes explicit usage triggers (e.g., 'when user asks...') and example queries, which is clear guidance. However, it lacks explicit when-not-to-use or alternative tools, so it is not a perfect 5.

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/ENTIA-IA/entia-mcp-server'

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