entity_lookup
Verify a company’s identity by name or identifier; obtain trust score, jurisdiction, and legal acts across 34 countries.
Instructions
Verify the identity of any business across 34 countries.
Use when: user asks "is this company legit?", "check CIF B80988678", "verify Telefonica". Returns: Trust Score 0-100, BORME acts count, LEI, Wikidata QID, jurisdiction.
Example: entity_lookup("Telefonica")
Args: query: Company name (Telefonica), CIF (A28015865), EU VAT (ESA28015865), or LEI (20 chars)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- entia_mcp/server.py:158-170 (handler)The actual implementation of the entity_lookup tool. It is decorated with @mcp.tool(), accepts a query string, and calls the REST API GET /v1/profile/{query} via the _get() helper.
@mcp.tool() def entity_lookup(query: str) -> dict[str, Any]: """Verify the identity of any business across 34 countries. Use when: user asks "is this company legit?", "check CIF B80988678", "verify Telefonica". Returns: Trust Score 0-100, BORME acts count, LEI, Wikidata QID, jurisdiction. Example: entity_lookup("Telefonica") Args: query: Company name (Telefonica), CIF (A28015865), EU VAT (ESA28015865), or LEI (20 chars) """ return _get(f"/v1/profile/{query}") - entia_mcp/server.py:158-159 (registration)Tool registration via the @mcp.tool() decorator on the FastMCP instance, binding the function as an MCP tool named 'entity_lookup'.
@mcp.tool() def entity_lookup(query: str) -> dict[str, Any]: - entia_mcp/server.py:79-90 (helper)The _get() helper function used by entity_lookup to make authenticated GET requests to the ENTIA REST API.
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)}