Skip to main content
Glama

Get Charity Profile

charity_profile
Read-onlyIdempotent

Retrieve a complete Charity Commission profile for any UK charity by its registration number, including trustees, income, expenditure, insolvency flags, governing document, and operating countries.

Instructions

Fetch the full Charity Commission profile for a charity number.

Returns trustees, latest income/expenditure, insolvency flags, governing document type, classifications, and countries of operation. Use charity_search first to find the charity number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
charity_numberYesCharity Commission registration number (e.g. '1234567'). Returned by charity_search.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
charity_numberYesCharity registration number.
charity_nameNoRegistered charity name.
reg_statusNoRegistration status code ('R', 'RM').
reg_status_labelNoHuman-readable registration status.
charity_typeNoCharity type.
charity_co_reg_numberNoCompanies House number for charities also registered as companies (Charitable Incorporated Organisations, etc.).
date_of_registrationNoDate of first registration.
addressNoRegistered address of the charity (joined address lines).
latest_incomeNoLatest filed annual income in GBP.
latest_expenditureNoLatest filed annual expenditure in GBP.
insolventNoTrue if the charity is flagged as insolvent.
in_administrationNoTrue if the charity is in administration.
trustee_namesNoTrustees on record. Truncated to 30 entries.
trustee_names_truncatedNoTrue if the trustee list was truncated.
trustee_names_totalNoTotal trustees upstream before truncation.
who_what_whereNoWho/What/Where classification entries. The list may be truncated truncated to 50 entries.
who_what_where_truncatedNoTrue if the classification list was truncated.
who_what_where_totalNoTotal classification entries upstream before truncation.
countries_of_operationNoCountries the charity operates in (capped at 10 upstream).

Implementation Reference

  • Tool handler function for 'charity_profile'. Takes a charity_number and delegates to _fetch_charity_profile to retrieve the full charity record.
    )
    async def charity_profile(
        charity_number: Annotated[str, Field(description="Charity Commission registration number (e.g. '1234567'). Returned by charity_search.", min_length=1, max_length=20)],
    ) -> CharityProfile:
        """Fetch the full Charity Commission profile for a charity number.
    
        Returns trustees, latest income/expenditure, insolvency flags,
        governing document type, classifications, and countries of operation.
        Use charity_search first to find the charity number.
        """
        return await _fetch_charity_profile(charity_number)
  • Private helper that performs the actual API call to the Charity Commission /allcharitydetailsV2 endpoint and constructs a CharityProfile model with trustees, classifications, countries, financial data, and insolvency flags.
    async def _fetch_charity_profile(charity_number: str) -> CharityProfile:
        async with charity_client() as client:
            suffix = "0"
            lookup_number = charity_number
            if "-" in charity_number:
                parts = charity_number.split("-", 1)
                lookup_number = parts[0]
                suffix = parts[1]
            resp = await _request_with_retry(
                client, "GET",
                f"/allcharitydetailsV2/{lookup_number}/{suffix}",
            )
            data = resp.json()
    
        reg_num = str(data.get("reg_charity_number") or lookup_number)
        raw_status = data.get("reg_status")
    
        raw_trustees = data.get("trustee_names") or []
        trustees_total = len(raw_trustees)
        trustees = [
            CharityTrustee(trustee_name=t.get("trustee_name"))
            for t in raw_trustees[:30]
            if isinstance(t, dict)
        ]
    
        raw_www = data.get("who_what_where") or []
        www_total = len(raw_www)
        classifications = [
            CharityClassification(
                classification_type=w.get("classification_type"),
                classification_desc=w.get("classification_desc"),
            )
            for w in raw_www[:50]
            if isinstance(w, dict)
        ]
    
        countries_raw = data.get("CharityAoOCountryContinent") or []
        countries = [c.get("country") for c in countries_raw[:10] if isinstance(c, dict) and c.get("country")]
    
        return CharityProfile(
            charity_number=reg_num,
            charity_name=data.get("charity_name"),
            reg_status=raw_status,
            reg_status_label=_STATUS_LABELS.get(raw_status or "", raw_status),
            charity_type=data.get("charity_type"),
            charity_co_reg_number=data.get("charity_co_reg_number") or None,
            date_of_registration=(data.get("date_of_registration") or "")[:10] or None,
            address=_build_address(data),
            latest_income=_coerce_number(data.get("latest_income")),
            latest_expenditure=_coerce_number(data.get("latest_expenditure")),
            insolvent=bool(data.get("insolvent", False)),
            in_administration=bool(data.get("in_administration", False)),
            trustee_names=trustees,
            trustee_names_truncated=trustees_total > 30,
            trustee_names_total=trustees_total,
            who_what_where=classifications,
            who_what_where_truncated=www_total > 50,
            who_what_where_total=www_total,
            countries_of_operation=countries,
        )
  • charity.py:117-136 (registration)
    Tool registration via @mcp.tool(name='charity_profile', ...) decorator within the register_tools function. Also registered as a resource at charity://{charity_number}/profile.
    @mcp.tool(
        name="charity_profile",
        annotations={
            "title": "Get Charity Profile",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": True,
        },
    )
    async def charity_profile(
        charity_number: Annotated[str, Field(description="Charity Commission registration number (e.g. '1234567'). Returned by charity_search.", min_length=1, max_length=20)],
    ) -> CharityProfile:
        """Fetch the full Charity Commission profile for a charity number.
    
        Returns trustees, latest income/expenditure, insolvency flags,
        governing document type, classifications, and countries of operation.
        Use charity_search first to find the charity number.
        """
        return await _fetch_charity_profile(charity_number)
  • server.py:159-165 (registration)
    Server-level registration: charity.register_tools(mcp) is called to register all charity tools including charity_profile.
    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)
  • The CharityProfile Pydantic model returned by the charity_profile tool, defining all fields including charity_number, name, status, income/expenditure, insolvency flags, trustees, classifications, and countries of operation.
    class CharityProfile(BaseModel):
        """Full Charity Commission profile for a single charity."""
    
        model_config = BASE_CFG
    
        charity_number: str = Field(..., description="Charity registration number.")
        charity_name: str | None = Field(None, description="Registered charity name.")
        reg_status: str | None = Field(
            None, description="Registration status code ('R', 'RM')."
        )
        reg_status_label: str | None = Field(
            None, description="Human-readable registration status."
        )
        charity_type: str | None = Field(None, description="Charity type.")
        charity_co_reg_number: str | None = Field(
            None,
            description=(
                "Companies House number for charities also registered as companies "
                "(Charitable Incorporated Organisations, etc.)."
            ),
        )
        date_of_registration: str | None = Field(
            None, description="Date of first registration."
        )
        address: str | None = Field(
            None,
            description="Registered address of the charity (joined address lines).",
        )
        latest_income: float | None = Field(
            None, description="Latest filed annual income in GBP."
        )
        latest_expenditure: float | None = Field(
            None, description="Latest filed annual expenditure in GBP."
        )
        insolvent: bool = Field(
            False, description="True if the charity is flagged as insolvent."
        )
        in_administration: bool = Field(
            False, description="True if the charity is in administration."
        )
        trustee_names: list[CharityTrustee] = Field(
            default_factory=list,
            description=(
                "Trustees on record. Truncated to 30 entries."
            ),
        )
        trustee_names_truncated: bool = Field(
            False, description="True if the trustee list was truncated."
        )
        trustee_names_total: int = Field(
            0, description="Total trustees upstream before truncation."
        )
        who_what_where: list[CharityClassification] = Field(
            default_factory=list,
            description=(
                "Who/What/Where classification entries. The list may be truncated "
                "truncated to 50 entries."
            ),
        )
        who_what_where_truncated: bool = Field(
            False,
            description="True if the classification list was truncated.",
        )
        who_what_where_total: int = Field(
            0,
            description="Total classification entries upstream before truncation.",
        )
        countries_of_operation: list[str] = Field(
            default_factory=list,
            description="Countries the charity operates in (capped at 10 upstream).",
        )
Behavior4/5

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

Annotations already declare readOnlyHint, destructiveHint, idempotentHint, openWorldHint. The description adds behavioral context by listing specific returned data (trustees, income, insolvency flags, etc.), which is 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?

Two concise sentences: first states purpose, second lists key returned data and usage hint. No extraneous words.

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?

With an output schema present and a single required parameter, the description sufficiently covers usage and key data. No gaps given the tool's simplicity.

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 single parameter 'charity_number' is well-described in the schema. The description mentions 'charity number' but adds no new semantics 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 'Fetch the full Charity Commission profile' and specifies the input as 'charity number'. It lists returned data (trustees, income, etc.) and distinguishes from the sibling 'charity_search' which finds the number.

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 advises 'Use charity_search first to find the charity number.' This provides clear when-to-use guidance and differentiates from the sibling tool.

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