Skip to main content
Glama

Get Company Profile

company_profile
Read-onlyIdempotent

Fetch a complete Companies House profile for any company number. Check status, registered address, SIC codes, filing compliance, and outstanding charges.

Instructions

Fetch the full Companies House profile for a company number.

Returns status, registered address, SIC codes, filing compliance (overdue accounts and confirmation statement flags), and whether the company has outstanding charges. Use company_search first to find the company number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
company_numberYesCompanies House company number (8 digits, e.g. '03782379'). Returned by company_search.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
company_numberYesCompanies House company number.
company_nameNoRegistered company name.
company_statusNoCurrent status (active, dissolved, in liquidation, etc.).
company_typeNoCompanies House company type code.
date_of_creationNoIncorporation date (ISO YYYY-MM-DD).
sic_codesNoStandard Industrial Classification codes.
registered_office_addressNoRegistered office address as returned by Companies House.
has_chargesNoTrue if the company has outstanding registered charges (secured debt), derived from the /charges endpoint. A due diligence signal.
accountsNoAccounts filing status and due dates.
confirmation_statementNoConfirmation statement filing status and next due date.

Implementation Reference

  • The company_profile tool handler function that fetches a full Companies House profile for a company number. Calls _fetch_company_profile with the normalised company number and returns a CompanyProfile object.
    async def company_profile(
        company_number: Annotated[str, Field(description="Companies House company number (8 digits, e.g. '03782379'). Returned by company_search.", min_length=1, max_length=10)],
    ) -> CompanyProfile:
        """Fetch the full Companies House profile for a company number.
    
        Returns status, registered address, SIC codes, filing compliance
        (overdue accounts and confirmation statement flags), and whether
        the company has outstanding charges. Use company_search first to
        find the company number.
        """
        return await _fetch_company_profile(_normalise_company_number(company_number))
  • Shared fetch helper that calls the Companies House API for company profile and charges data, constructing and returning a CompanyProfile Pydantic model.
    async def _fetch_company_profile(company_number: str) -> CompanyProfile:
        async with companies_house_client() as client:
            resp = await _request_with_retry(client, "GET", f"/company/{company_number}")
            data = resp.json()
    
            has_charges = False
            try:
                charges_resp = await _request_with_retry(
                    client, "GET", f"/company/{company_number}/charges",
                    params={"items_per_page": 1},
                )
                charges_data = charges_resp.json()
                charges_items = charges_data.get("items") or []
                has_charges = any(
                    item.get("status") == "outstanding" for item in charges_items
                ) or (
                    charges_data.get("total_count", 0) > 0
                    and not charges_items
                )
            except Exception:
                pass
    
        accs_raw = data.get("accounts") or {}
        conf_raw = data.get("confirmation_statement") or {}
    
        return CompanyProfile(
            company_number=str(data.get("company_number") or company_number),
            company_name=data.get("company_name"),
            company_status=data.get("company_status"),
            company_type=data.get("company_type"),
            date_of_creation=data.get("date_of_creation"),
            sic_codes=list(data.get("sic_codes") or []),
            registered_office_address=data.get("registered_office_address") or {},
            has_charges=has_charges,
            accounts=CompanyAccountsSummary(
                overdue=bool(accs_raw.get("overdue", False)),
                last_accounts_made_up_to=(accs_raw.get("last_accounts") or {}).get("made_up_to"),
                next_due=accs_raw.get("next_due"),
            ),
            confirmation_statement=CompanyConfirmationStatementSummary(
                overdue=bool(conf_raw.get("overdue", False)),
                next_due=conf_raw.get("next_due"),
            ),
        )
  • CompanyProfile Pydantic model defining the output schema for the company_profile tool, including company_number, company_name, status, type, SIC codes, address, charges flag, accounts, and confirmation statement summaries.
    class CompanyProfile(BaseModel):
        """Full Companies House profile for a single company number."""
    
        model_config = BASE_CFG
    
        company_number: str = Field(..., description="Companies House company number.")
        company_name: str | None = Field(None, description="Registered company name.")
        company_status: str | None = Field(
            None, description="Current status (active, dissolved, in liquidation, etc.)."
        )
        company_type: str | None = Field(
            None, description="Companies House company type code."
        )
        date_of_creation: str | None = Field(
            None, description="Incorporation date (ISO YYYY-MM-DD)."
        )
        sic_codes: list[str] = Field(
            default_factory=list,
            description="Standard Industrial Classification codes.",
        )
        registered_office_address: dict[str, Any] = Field(
            default_factory=dict,
            description="Registered office address as returned by Companies House.",
        )
        has_charges: bool = Field(
            False,
            description=(
                "True if the company has outstanding registered charges (secured debt), "
                "derived from the /charges endpoint. A due diligence signal."
            ),
        )
        accounts: CompanyAccountsSummary = Field(
            default_factory=CompanyAccountsSummary,
            description="Accounts filing status and due dates.",
        )
        confirmation_statement: CompanyConfirmationStatementSummary = Field(
            default_factory=CompanyConfirmationStatementSummary,
            description="Confirmation statement filing status and next due date.",
        )
  • MCP tool registration for company_profile using @mcp.tool decorator with name='company_profile' and annotations (readOnlyHint, etc.). Registered inside register_tools(mcp).
    # ------------------------------------------------------------------ #
    # 2. company_profile
    # ------------------------------------------------------------------ #
    @mcp.tool(
        name="company_profile",
        annotations={
            "title": "Get Company Profile",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": True,
        },
    )
  • server.py:158-164 (registration)
    Top-level server registration: companies_house.register_tools(mcp) is called in server.py's main() setup, which registers the company_profile tool along with other Companies House tools.
    companies_house.register_tools(mcp)
    charity.register_tools(mcp)
    disqualified.register_tools(mcp)
    land_registry.register_tools(mcp)
    gazette.register_tools(mcp)
    hmrc_vat.register_tools(mcp)
    search_fetch.register_tools(mcp)
Behavior4/5

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

Annotations already indicate read-only, non-destructive, idempotent behavior. The description adds valuable detail on what data is returned (status, address, SIC codes, filing compliance, charges), providing behavioral context beyond annotations.

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?

Three tightly written sentences. First states action, second lists returns, third gives prerequisite. No wasted words, front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists (not shown but indicated true), the description adequately covers key return fields and prerequisite step. Minor omission of error cases or additional context, but sufficient for most agents.

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 coverage is 100% and the description does not add meaning beyond what the input schema provides (the parameter description already mentions 8-digit format and usage). Baseline 3 is appropriate.

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 the tool fetches the full Companies House profile for a company number, listing specific fields returned. It distinguishes from sibling tool 'company_search' which is used to find the company number first.

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 instructs to use 'company_search first to find the company number', giving clear prerequisite and context for when to use this tool. No ambiguity about its role.

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/paulieb89/uk-due-diligence-mcp'

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