Skip to main content
Glama
vdmeu

RegistrumMCP

Search for companies

search_company

Find UK companies by name to retrieve company numbers, status, type, and registered addresses for business verification and research.

Instructions

Search for UK companies by name. Returns a list of matching companies with their company number, status, type, and registered address. Use this first when you only have a company name and need its company number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesCompany name or keywords to search for
limitNoMaximum number of results to return (default 10)

Implementation Reference

  • The handler function for search_company tool. Takes query and optional limit parameters, constructs URL search params, calls the API endpoint /search, and returns the results as text or error.
    async ({ query, limit }) => {
      try {
        const params = new URLSearchParams({ q: query });
        if (limit) params.set("limit", String(limit));
        const data = await api(`/search?${params}`);
        return text(data);
      } catch (e) {
        return err(String(e));
      }
    }
  • Input schema for search_company tool using Zod. Defines 'query' as a required string (min 1 char) and 'limit' as an optional integer (1-20) with descriptions.
    inputSchema: {
      query: z.string().min(1).describe("Company name or keywords to search for"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(20)
        .optional()
        .describe("Maximum number of results to return (default 10)"),
    },
  • src/server.ts:58-87 (registration)
    Complete registration of search_company tool with McpServer. Includes title, description, inputSchema, and handler function.
    server.registerTool(
      "search_company",
      {
        title: "Search for companies",
        description:
          "Search for UK companies by name. Returns a list of matching companies with " +
          "their company number, status, type, and registered address. Use this first " +
          "when you only have a company name and need its company number.",
        inputSchema: {
          query: z.string().min(1).describe("Company name or keywords to search for"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(20)
            .optional()
            .describe("Maximum number of results to return (default 10)"),
        },
      },
      async ({ query, limit }) => {
        try {
          const params = new URLSearchParams({ q: query });
          if (limit) params.set("limit", String(limit));
          const data = await api(`/search?${params}`);
          return text(data);
        } catch (e) {
          return err(String(e));
        }
      }
    );
  • The callApi helper function used by all tools to make authenticated API requests to the registrum.co.uk API with X-API-Key header.
    export async function callApi(
      path: string,
      apiKey: string,
      baseUrl: string = API_BASE
    ): Promise<unknown> {
      if (!apiKey) {
        throw new Error(
          "REGISTRUM_API_KEY is not set. Get a free key at https://registrum.co.uk and set it in your MCP client config."
        );
      }
      const res = await fetch(`${baseUrl}${path}`, {
        headers: { "X-API-Key": apiKey },
      });
      if (!res.ok) {
        const body = await res.text();
        throw new Error(`API error ${res.status}: ${body}`);
      }
      return res.json();
    }
  • Helper functions text() and err() used by tool handlers to format successful responses and error responses in MCP format.
    function text(content: unknown) {
      return {
        content: [{ type: "text" as const, text: JSON.stringify(content, null, 2) }],
      };
    }
    
    function err(message: string) {
      return {
        isError: true as const,
        content: [{ type: "text" as const, text: message }],
      };
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes what the tool returns ('list of matching companies with their company number, status, type, and registered address') and geographical scope ('UK companies'), but doesn't mention rate limits, authentication requirements, error conditions, or pagination behavior. It adequately covers the basic operation but lacks deeper behavioral context.

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 perfectly concise with two sentences that each earn their place. The first sentence states the purpose and scope, while the second provides usage guidance. There's zero wasted text, and the most important information (what the tool does) is 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 the tool's moderate complexity (search operation with 2 parameters), no annotations, and no output schema, the description does a good job covering the essentials. It explains what the tool does, when to use it, what it returns, and geographical scope. However, without an output schema, it could benefit from more detail about the return format structure.

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 description coverage is 100%, so the schema already fully documents both parameters. The description adds no additional parameter semantics beyond what's in the schema descriptions. The baseline score of 3 is appropriate when the schema does all the parameter documentation work.

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 specific action ('Search for UK companies by name'), resource ('companies'), and scope ('UK companies'). It distinguishes this tool from siblings by specifying it's for searching by name rather than retrieving specific company details (get_company), directors (get_directors), financials (get_financials), or network (get_network).

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 provides explicit guidance on when to use this tool ('Use this first when you only have a company name and need its company number'). It also implies when not to use it (when you already have a company number or need other types of data, suggesting the sibling tools as alternatives).

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/vdmeu/registrum-mcp'

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