Skip to main content
Glama

Search Gazette Corporate Insolvency Notices

gazette_insolvency
Read-onlyIdempotent

Search The Gazette's official insolvency notices for UK companies or individuals. Results sorted by severity include winding-up orders, administration orders, and more. Access full legal wording via notice ID.

Instructions

Search The Gazette's insolvency notice index by entity name.

Searches the Gazette's insolvency endpoint which covers corporate notice codes: winding-up orders (2443), administration orders (2448), liquidator appointments (2452), striking-off notices (2460), and more. Results are sorted by severity — winding-up orders and administration orders appear first.

Each result includes a notice_numeric_id. Read the full legal wording via the notice://{notice_numeric_id} resource.

The Gazette is the official UK public record. A notice here means the event has been formally published and is legally effective.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_nameYesCompany or individual name to search for in Gazette insolvency notices
notice_typeNoFilter by notice code (e.g. '2441' winding-up petition, '2443' winding-up order, '2448' administration order, '2460' striking-off). Omit to search all.
start_dateNoFilter notices from this date (YYYY-MM-DD)
end_dateNoFilter notices up to this date (YYYY-MM-DD)
max_noticesNoCap on notices returned, applied after severity/date sort. Default 20. The Gazette insolvency feed returns up to 100 results per search — raise to 100 to see the full set.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_nameYesEntity name that was searched.
notice_type_filterNoNotice code filter applied, or null if all codes searched.
start_dateNoLower bound of the date range filter, if any.
end_dateNoUpper bound of the date range filter, if any.
total_noticesYesTotal notices returned after deduplication, sorting, and cap.
max_notices_capYesThe max_notices cap applied. Upstream may have more matching notices.
noticesNoMatching notices, sorted by severity (desc) then date (desc).

Implementation Reference

  • The gazette_insolvency async handler function. Searches The Gazette's /insolvency/notice/data.json endpoint by entity name, parses and filters the feed entries, sorts by severity/date, caps the results, and returns a GazetteInsolvencyResult Pydantic model.
    async def gazette_insolvency(
        entity_name: Annotated[str, Field(description="Company or individual name to search for in Gazette insolvency notices", min_length=2, max_length=200)],
        notice_type: Annotated[str | None, Field(description="Filter by notice code (e.g. '2441' winding-up petition, '2443' winding-up order, '2448' administration order, '2460' striking-off). Omit to search all.")] = None,
        start_date: Annotated[str | None, Field(description="Filter notices from this date (YYYY-MM-DD)")] = None,
        end_date: Annotated[str | None, Field(description="Filter notices up to this date (YYYY-MM-DD)")] = None,
        max_notices: Annotated[int, Field(description="Cap on notices returned, applied after severity/date sort. Default 20. The Gazette insolvency feed returns up to 100 results per search — raise to 100 to see the full set.", ge=1, le=100)] = 20,
    ) -> GazetteInsolvencyResult:
        """Search The Gazette's insolvency notice index by entity name.
    
        Searches the Gazette's insolvency endpoint which covers corporate
        notice codes: winding-up orders (2443), administration orders (2448),
        liquidator appointments (2452), striking-off notices (2460), and more.
        Results are sorted by severity — winding-up orders and administration
        orders appear first.
    
        Each result includes a notice_numeric_id. Read the full legal wording
        via the notice://{notice_numeric_id} resource.
    
        The Gazette is the official UK public record. A notice here means
        the event has been formally published and is legally effective.
        """
        qs: dict[str, Any] = {
            "text": entity_name,
            "results-page-size": 100,
        }
        if start_date:
            qs["start-publish-date"] = start_date
        if end_date:
            qs["end-publish-date"] = end_date
    
        all_notices: list[dict[str, Any]] = []
    
        async with gazette_client() as client:
            try:
                resp = await _request_with_retry(
                    client, "GET", "/insolvency/notice/data.json", params=qs
                )
                raw = resp.json()
                entries = raw.get("entry", []) if isinstance(raw, dict) else []
                if isinstance(entries, dict):
                    entries = [entries]
                all_notices = _extract_notices(entries)
            except Exception:
                pass
    
        # Filter by specific notice type if requested
        if notice_type:
            all_notices = [n for n in all_notices if n["notice_code"] == notice_type]
    
        # Apply global cap (already sorted by _extract_notices)
        all_notices = all_notices[:max_notices]
    
        notice_models: list[GazetteNotice] = []
        for n in all_notices:
            code = n.get("notice_code")
            notice_models.append(
                GazetteNotice(
                    notice_id=n.get("notice_id"),
                    notice_numeric_id=n.get("notice_numeric_id"),
                    notice_code=code,
                    notice_type=n.get("notice_type"),
                    severity=SEVERITY.get(code or "", 0),
                    date=n.get("date"),
                    title=n.get("title"),
                    content=n.get("content"),
                )
            )
    
        return GazetteInsolvencyResult(
            entity_name=entity_name,
            notice_type_filter=notice_type,
            start_date=start_date,
            end_date=end_date,
            total_notices=len(notice_models),
            max_notices_cap=max_notices,
            notices=notice_models,
        )
  • gazette.py:176-178 (registration)
    The @mcp.tool decorator registering 'gazette_insolvency' as a FastMCP tool, called via gazette.register_tools(mcp) in server.py line 162.
    @mcp.tool(
        name="gazette_insolvency",
        annotations={
  • Helper function that extracts structured insolvency notice records from the Gazette feed entry array, filters by corporate insolvency codes, and sorts by severity descending then date descending.
    def _extract_notices(entries: list[dict[str, Any]]) -> list[dict[str, Any]]:
        """Pull structured insolvency notice records from the Gazette feed entry array."""
        notices = []
        for entry in entries:
            code = str(entry.get("f:notice-code", ""))
            if code not in ALL_CORPORATE_INSOLVENCY_CODES:
                continue
            notice_uri = entry.get("id", "")
            raw_content = entry.get("content", "")
            notices.append(
                {
                    "notice_id": notice_uri,
                    "notice_numeric_id": _notice_numeric_id(notice_uri) if notice_uri else None,
                    "notice_code": code,
                    "notice_type": NOTICE_LABELS.get(code, "Corporate Notice"),
                    "date": (entry.get("published") or "")[:10] or None,
                    "title": entry.get("title") or None,
                    "content": _strip_html(raw_content) if raw_content else None,
                }
            )
        # Sort by severity descending, then date descending
        notices.sort(
            key=lambda n: (SEVERITY.get(n["notice_code"], 0), n["date"] or ""),
            reverse=True,
        )
        return notices
  • Pydantic output model for gazette_insolvency — returns entity_name, filters, total_notices, max_notices_cap, and a list of GazetteNotice items.
    class GazetteInsolvencyResult(BaseModel):
        """Aggregated Gazette insolvency notice search result."""
    
        model_config = BASE_CFG
    
        entity_name: str = Field(..., description="Entity name that was searched.")
        notice_type_filter: str | None = Field(
            None,
            description="Notice code filter applied, or null if all codes searched.",
        )
        start_date: str | None = Field(
            None, description="Lower bound of the date range filter, if any."
        )
        end_date: str | None = Field(
            None, description="Upper bound of the date range filter, if any."
        )
        total_notices: int = Field(
            ..., description="Total notices returned after deduplication, sorting, and cap."
        )
        max_notices_cap: int = Field(
            ..., description="The max_notices cap applied. Upstream may have more matching notices."
        )
        notices: list[GazetteNotice] = Field(
            default_factory=list,
            description=(
                "Matching notices, sorted by severity (desc) then date (desc)."
            ),
        )
  • Taxonomy of corporate insolvency notice codes and their human-readable labels, used by the gazette_insolvency handler to filter/classify notices.
    ALL_CORPORATE_INSOLVENCY_CODES = {
        "2431", "2432", "2433",  # older corporate winding-up / liquidator codes
        "2441", "2442", "2443", "2444", "2445", "2446",
        "2447", "2448", "2449", "2450", "2452", "2455", "2456", "2460",
    }
    
    NOTICE_LABELS: dict[str, str] = {
        "2431": "Resolutions for Winding-Up",
        "2432": "Appointment of Liquidators",
        "2433": "Notice to Creditors / Contributories",
        "2441": "Winding-Up Petition",
        "2442": "Dismissal of Winding-Up Petition",
        "2443": "Winding-Up Order",
        "2444": "Stay of Winding-Up Order",
        "2445": "Appointment of Provisional Liquidator",
        "2446": "Notice to Creditors",
        "2447": "Notice to Contributories",
        "2448": "Administration Order",
        "2449": "Appointment of Administrative Receiver",
        "2450": "Moratorium",
        "2452": "Appointment of Liquidator",
        "2455": "Notice of Voluntary Winding-Up Resolution",
        "2456": "Creditors' Voluntary Liquidation",
        "2460": "Striking-Off Notice",
    }
Behavior4/5

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

Annotations declare readOnlyHint, destructiveHint, idempotentHint. Description adds behavioral context: severity sorting of results, use of notice_numeric_id for full texts, and official/legal significance of notices. No contradictions.

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?

Five sentences that are front-loaded with main purpose; each sentence adds value (codes, sorting, resource linking, official status). No wasted 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?

Given the tool's complexity (filtered search, sorting, output schema exists), the description covers search scope, result ordering, how to access full notices, and the legal context. Complete for effective use.

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% with descriptions for all 5 parameters. Description adds minor context about severity sorting and cap logic but doesn't enhance parameter semantics beyond schema. Baseline 3 due to high coverage.

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?

Description clearly states the tool searches The Gazette's insolvency notice index by entity name, lists specific notice codes, explains severity sorting, and distinguishes from sibling 'gazette_notice' by mentioning the notice_numeric_id for reading full legal wording.

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?

Describes when to use (search for insolvency notices) and provides guidance on result sorting and cap (default 20, max 100). Lacks explicit exclusion or alternative tools, but context makes it clear.

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