Skip to main content
Glama

Get Gazette Notice Full Text

gazette_notice
Read-onlyIdempotent

Fetch complete legal wording and linked data for a Gazette notice by its numeric ID. Ideal for due diligence after finding notice IDs via gazette_insolvency.

Instructions

Fetch the full legal wording of a Gazette notice by numeric notice ID.

Returns the complete JSON-LD linked-data record for the notice: parties, legal basis, court, and full text. Use gazette_insolvency first to find notice_numeric_id values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notice_idYesNumeric Gazette notice ID. Returned as notice_numeric_id by gazette_insolvency.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main tool handler for gazette_notice. Takes a numeric notice_id and returns the full JSON-LD linked-data record from The Gazette API.
    async def gazette_notice(
        notice_id: Annotated[str, Field(
            description="Numeric Gazette notice ID. Returned as notice_numeric_id by gazette_insolvency.",
            min_length=1, max_length=20,
        )],
    ) -> dict:
        """Fetch the full legal wording of a Gazette notice by numeric notice ID.
    
        Returns the complete JSON-LD linked-data record for the notice: parties,
        legal basis, court, and full text. Use gazette_insolvency first to find
        notice_numeric_id values.
        """
        return await _fetch_gazette_notice(notice_id)
  • Shared HTTP helper that fetches the Gazette notice data from the live API endpoint.
    async def _fetch_gazette_notice(notice_id: str) -> dict:
        url = f"https://www.thegazette.co.uk/notice/{notice_id.strip()}/data.json?view=linked-data"
        async with httpx.AsyncClient(timeout=15.0) as client:
            resp = await client.get(url, headers={"Accept": "application/json"})
            resp.raise_for_status()
            return resp.json()
  • gazette.py:152-161 (registration)
    Tool registration decorator binding the gazette_notice tool to the FastMCP server. Registered via gazette.register_tools(mcp) in server.py:162.
    @mcp.tool(
        name="gazette_notice",
        annotations={
            "title": "Get Gazette Notice Full Text",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": True,
        },
    )
  • Resource registration using the same _fetch_gazette_notice helper, exposed as a notice://{notice_id} resource.
    @mcp.resource(
        "notice://{notice_id}",
        name="gazette_notice",
        description=(
            "Full content of a Gazette notice by numeric notice ID. "
            "Use the notice_numeric_id returned by gazette_insolvency. "
            "Returns JSON-LD linked-data view of the notice."
        ),
        mime_type="application/json",
    )
    async def gazette_notice_resource(notice_id: str) -> str:
        import json
        data = await _fetch_gazette_notice(notice_id)
        return json.dumps(data)
  • Pydantic model defining the schema for a GazetteNotice, returned as part of GazetteInsolvencyResult.
    class GazetteNotice(BaseModel):
        """A single corporate insolvency notice from The Gazette."""
    
        model_config = BASE_CFG
    
        notice_id: str | None = Field(
            None, description="Gazette notice URI (e.g. 'https://www.thegazette.co.uk/id/notice/5122793')."
        )
        notice_numeric_id: str | None = Field(
            None,
            description=(
                "Numeric notice ID. Read full notice content via the "
                "notice://{notice_numeric_id} resource."
            ),
        )
        notice_code: str | None = Field(
            None,
            description=(
                "Gazette notice code (e.g. '2443' winding-up order, '2448' "
                "administration order)."
            ),
        )
        notice_type: str | None = Field(
            None,
            description="Human-readable notice type label (e.g. 'Winding-Up Order').",
        )
        severity: int = Field(
            0,
            description=(
                "Internal severity score 0-10. Higher = more serious (10 = "
                "Winding-Up Order, 9 = Administration Order / Receiver, 0 = "
                "unclassified)."
            ),
        )
        date: str | None = Field(
            None,
            description="Publication date (ISO YYYY-MM-DD).",
        )
        title: str | None = Field(None, description="Notice title.")
        content: str | None = Field(
            None,
            description=(
                "Brief notice excerpt from the search feed (HTML stripped). "
                "For full legal wording read notice://{notice_numeric_id}."
            ),
        )
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and no destructive hint. The description adds context about the return format (complete JSON-LD linked-data record with parties, legal basis, court, full text), going beyond what annotations provide. However, it doesn't disclose any potential side effects beyond the annotation hints, which are already clear.

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 sentences: first states the primary action, second enriches with return contents and prerequisite usage. No extraneous words. Front-loaded with the main verb-object relationship.

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?

For a simple retrieval tool with one parameter and an output schema, the description covers return format and usage order. No gaps remain given the tool's complexity.

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?

The single parameter notice_id is fully described in the schema (description, min/max length, type). The description adds no novel information beyond what is already in the schema's param description, so baseline score of 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 starts with a specific verb-resource pair ('Fetch the full legal wording of a Gazette notice') and distinguishes itself from sibling tool gazette_insolvency, which is used for finding notice IDs. The purpose is unambiguous.

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 states to use gazette_insolvency first to obtain the notice_numeric_id, providing clear when-to-use guidance and differentiation 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