Skip to main content
Glama
Gonzih

mcp-opencorporates

by Gonzih

search_companies

Find companies by name in the OpenCorporates database. Returns name, number, jurisdiction, status, incorporation date, and address.

Instructions

Search companies by name in the OpenCorporates database. Returns matching companies with name, number, jurisdiction, status, incorporation date, and registered address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesCompany name or search query
jurisdiction_codeNoJurisdiction code to filter results (e.g. 'us_de' for Delaware, 'gb' for UK, 'de' for Germany)
pageNoPage number for pagination (default 1)

Implementation Reference

  • The handler that executes the search_companies tool logic. It extracts 'q', 'jurisdiction_code', and 'page' from args, calls the OpenCorporates API at /companies/search, maps the results to a clean JSON output, and returns it as text.
    case "search_companies": {
      const { q, jurisdiction_code, page } = args as unknown as SearchCompaniesArgs;
      if (!q) throw new Error("Parameter 'q' is required");
    
      const data = (await apiFetch("/companies/search", {
        q,
        jurisdiction_code,
        page,
      })) as { results: { companies: Array<{ company: Record<string, unknown> }> } };
    
      const companies = data.results?.companies ?? [];
      if (companies.length === 0) return textResult("No companies found matching that query.");
    
      const out = companies.map(({ company: c }) => ({
        name: c["name"],
        company_number: c["company_number"],
        jurisdiction_code: c["jurisdiction_code"],
        status: c["current_status"],
        incorporation_date: c["incorporation_date"],
        registered_address: formatAddress(c["registered_address"]),
        opencorporates_url: c["opencorporates_url"],
      }));
      return textResult(JSON.stringify(out, null, 2));
    }
  • src/index.ts:96-112 (registration)
    Registration of the 'search_companies' tool in the ListTools handler, including its name, description, and JSON input schema.
      name: "search_companies",
      description:
        "Search companies by name in the OpenCorporates database. Returns matching companies with name, number, jurisdiction, status, incorporation date, and registered address.",
      inputSchema: {
        type: "object",
        properties: {
          q: { type: "string", description: "Company name or search query" },
          jurisdiction_code: {
            type: "string",
            description:
              "Jurisdiction code to filter results (e.g. 'us_de' for Delaware, 'gb' for UK, 'de' for Germany)",
          },
          page: { type: "number", description: "Page number for pagination (default 1)" },
        },
        required: ["q"],
      },
    },
  • TypeScript interface SearchCompaniesArgs defining the input shape: 'q' (required string), 'jurisdiction_code' (optional string), 'page' (optional number).
    interface SearchCompaniesArgs {
      q: string;
      jurisdiction_code?: string;
      page?: number;
    }
Behavior2/5

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

With no annotations, the description must fully convey behavioral traits. It only mentions that matching companies are returned, omitting details on pagination, data freshness, rate limits, or side effects. The list of return fields adds some value but insufficient transparency.

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 concise and front-loaded, with two sentences that efficiently convey the primary action and return fields. No fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of an output schema, the description adequately lists return fields. However, it misses details on pagination behavior (the 'page' parameter is present but not explained) and does not address error handling or empty results. It is minimally adequate but not thorough.

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?

All three parameters are described in the input schema (100% coverage). The description adds marginal context by linking the search action to the 'q' parameter, but does not provide additional semantics beyond what the schema already offers. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches for companies by name and lists the fields returned. However, it does not explicitly differentiate itself from sibling tools like get_company or search_officers, leaving the agent to infer distinctions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, nor any prerequisites or exclusions. The description only states the search action and filter options without context for decision-making.

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/Gonzih/mcp-opencorporates'

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