Skip to main content
Glama

Search Disqualified Directors

disqualified_search
Read-onlyIdempotent

Check whether an individual is disqualified from being a UK company director. Enter a person's name to retrieve disqualification records and dates of birth.

Instructions

Check whether a named individual is banned from acting as a UK company director.

Use this tool when asked to check disqualified, banned, or barred directors. Query must be an individual's name (e.g. "Richard Howson") — NOT a company name, which always returns zero results.

Returns names, dates of birth, disqualification period snippets, and officer IDs that can be used with disqualified_profile for full details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesName of the person to search for
items_per_pageNoResults per page (max 100). Default 20.
start_indexNoPagination offset (0-based). Default 0.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query applied.
total_resultsYesTotal matching records upstream at Companies House.
start_indexYesPagination offset for this page.
items_per_pageYesPage size requested.
returnedYesItems actually returned on this page.
has_moreYesTrue if more items may exist beyond this page. Re-call with start_index=start_index+items_per_page to continue.
itemsNoMatching disqualified officer records.

Implementation Reference

  • The handler function for the disqualified_search tool. Calls Companies House /search/disqualified-officers API with the query name, pagination params, and returns a DisqualifiedSearchResult.
    async def disqualified_search(
        query: Annotated[str, Field(description="Name of the person to search for", min_length=2, max_length=200)],
        items_per_page: Annotated[int, Field(description="Results per page (max 100). Default 20.", ge=1, le=100)] = 20,
        start_index: Annotated[int, Field(description="Pagination offset (0-based). Default 0.", ge=0, le=10000)] = 0,
    ) -> DisqualifiedSearchResult:
        """Check whether a named individual is banned from acting as a UK company director.
    
        Use this tool when asked to check disqualified, banned, or barred directors.
        Query must be an individual's name (e.g. "Richard Howson") — NOT a company
        name, which always returns zero results.
    
        Returns names, dates of birth, disqualification period snippets, and
        officer IDs that can be used with disqualified_profile for full details.
        """
        try:
            async with companies_house_client() as client:
                resp = await _request_with_retry(
                    client, "GET", "/search/disqualified-officers",
                    params={
                        "q": query.strip(),
                        "items_per_page": items_per_page,
                        "start_index": start_index,
                    },
                )
                data = resp.json()
        except Exception:
            data = {}
    
        raw_items = data.get("items", []) or []
        total_results = int(data.get("total_results", 0) or 0)
    
        items = [
            DisqualifiedSearchItem(
                officer_id=_extract_officer_id(raw.get("links") or {}),
                title=raw.get("title"),
                date_of_birth=raw.get("date_of_birth"),
                snippet=raw.get("snippet"),
                address=raw.get("address") or {},
                links=raw.get("links") or {},
            )
            for raw in raw_items
        ]
    
        has_more = (start_index + len(items)) < total_results
    
        return DisqualifiedSearchResult(
            query=query,
            total_results=total_results,
            start_index=start_index,
            items_per_page=items_per_page,
            returned=len(items),
            has_more=has_more,
            items=items,
        )
  • DisqualifiedSearchItem Pydantic model representing a single hit in disqualified officers search results (officer_id, title, date_of_birth, snippet, address, links).
    class DisqualifiedSearchItem(BaseModel):
        """A single hit in a disqualified officers search."""
    
        model_config = BASE_CFG
    
        officer_id: str | None = Field(
            None,
            description=(
                "Companies House officer ID extracted from the self link. Pass to "
                "disqualified_profile for the full disqualification record."
            ),
        )
        title: str | None = Field(
            None, description="Display title (typically the officer's name)."
        )
        date_of_birth: str | None = Field(
            None, description="Date of birth as returned by the search API."
        )
        snippet: str | None = Field(
            None, description="Upstream match snippet highlighting query terms."
        )
        address: dict[str, Any] = Field(
            default_factory=dict,
            description="Last known address of the disqualified officer.",
        )
        links: dict[str, Any] = Field(
            default_factory=dict,
            description="Upstream relational links (self, etc.).",
        )
  • DisqualifiedSearchResult Pydantic model representing the paginated search result (query, total_results, start_index, items_per_page, returned, has_more, items).
    class DisqualifiedSearchResult(BaseModel):
        """Paginated disqualified officers search result."""
    
        model_config = BASE_CFG
    
        query: str = Field(..., description="Search query applied.")
        total_results: int = Field(
            ..., description="Total matching records upstream at Companies House."
        )
        start_index: int = Field(..., description="Pagination offset for this page.")
        items_per_page: int = Field(..., description="Page size requested.")
        returned: int = Field(..., description="Items actually returned on this page.")
        has_more: bool = Field(
            ...,
            description=(
                "True if more items may exist beyond this page. Re-call with "
                "start_index=start_index+items_per_page to continue."
            ),
        )
        items: list[DisqualifiedSearchItem] = Field(
            default_factory=list,
            description="Matching disqualified officer records.",
        )
  • disqualified.py:40-54 (registration)
    Registration of the disqualified_search tool via @mcp.tool(name="disqualified_search", ...) inside register_tools(), called from server.py line 160.
    def register_tools(mcp: FastMCP) -> None:
    
        # ------------------------------------------------------------------ #
        # 1. disqualified_search
        # ------------------------------------------------------------------ #
        @mcp.tool(
            name="disqualified_search",
            annotations={
                "title": "Search Disqualified Directors",
                "readOnlyHint": True,
                "destructiveHint": False,
                "idempotentHint": True,
                "openWorldHint": True,
            },
        )
  • Helper _extract_officer_id() that parses the officer ID from the 'self' link in the API response.
    def _extract_officer_id(links: dict[str, Any]) -> str | None:
        self_link = (links or {}).get("self", "") if isinstance(links, dict) else ""
        if not self_link:
            return None
        tail = self_link.rstrip("/").rsplit("/", 1)[-1]
        return tail or None
Behavior5/5

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

Annotations already declare readOnlyHint, destructiveHint, idempotentHint, and openWorldHint as true/false, so the safety profile is clear. The description adds value by disclosing the return format: 'Returns names, dates of birth, disqualification period snippets, and officer IDs that can be used with disqualified_profile for full details.' This goes beyond annotations to inform the agent about output content and next steps.

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?

The description is five sentences long, front-loaded with the main purpose, and each sentence adds value: purpose, usage guideline, exclusion, return format, and connection to sibling tool. There is no redundancy or 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 complexity of a search tool, the presence of an output schema (not shown but indicated), and the schema descriptions, the description is complete. It covers purpose, when to use, constraints on input, summary of return data, and linkage to a related tool for deeper detail. No gaps are apparent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all three parameters. The description adds no new parameter details beyond the schema, but it reinforces the critical constraint that 'query' must be a person's name, not a company name. This contextual emphasis on the query parameter's semantics justifies a score of 4.

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's purpose: 'Check whether a named individual is banned from acting as a UK company director.' It uses a specific verb ('check') and resource ('banned/ disqualified directors'), effectively distinguishing it from sibling tools like disqualified_profile (which provides full details) and search (general search).

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?

The description explicitly states when to use the tool: 'Use this tool when asked to check disqualified, banned, or barred directors.' It also provides a clear exclusion: 'Query must be an individual's name — NOT a company name, which always returns zero results.' This gives the agent precise guidance on when and how to invoke it.

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