Skip to main content
Glama

search_companies

Search the Swiss company registry (ZEFIX) by name, canton, or legal form to find business information. This tool helps identify companies using specific criteria without requiring API keys.

Instructions

Search Swiss company registry (ZEFIX) by name, canton, or legal form

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCompany name or partial name to search
cantonNoCanton abbreviation (e.g. ZH, BE, GE, ZG)
legal_formNoLegal form code (e.g. 0106=GmbH, 0101=AG)
limitNoMax results (default: 20)

Implementation Reference

  • The handler implementation for the 'search_companies' tool, which constructs and sends a POST request to the ZEFIX search endpoint.
    case "search_companies": {
      const body: Record<string, unknown> = {
        name: args.name as string,
        maxEntries: (args.limit as number) ?? 20,
        languageKey: "en",
      };
      if (args.canton) body.cantonAbbreviation = [args.canton as string];
      if (args.legal_form) body.legalFormCode = args.legal_form as string;
    
      const response = await fetch(`${BASE}/firm/search.json`, {
        method: "POST",
        headers: { "Content-Type": "application/json", "Accept": "application/json" },
        body: JSON.stringify(body),
      });
      if (response.status === 404) {
        return JSON.stringify({ companies: [], hasMoreResults: false }, null, 2);
      }
      if (!response.ok) throw new Error(`HTTP ${response.status}: ${response.statusText}`);
      const data = await response.json() as { list?: unknown[]; hasMoreResults?: boolean; error?: unknown };
      if (data.error) return JSON.stringify({ companies: [], hasMoreResults: false }, null, 2);
      return JSON.stringify({ companies: data.list ?? [], hasMoreResults: data.hasMoreResults ?? false }, null, 2);
    }
  • The input schema definition for 'search_companies', including name, canton, legal_form, and limit parameters.
    {
      name: "search_companies",
      description: "Search Swiss company registry (ZEFIX) by name, canton, or legal form",
      inputSchema: {
        type: "object",
        required: ["name"],
        properties: {
          name: { type: "string", description: "Company name or partial name to search" },
          canton: { type: "string", description: "Canton abbreviation (e.g. ZH, BE, GE, ZG)" },
          legal_form: { type: "string", description: "Legal form code (e.g. 0106=GmbH, 0101=AG)" },
          limit: { type: "number", description: "Max results (default: 20)" },
        },
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the data source (ZEFIX) but doesn't describe response format, pagination behavior, rate limits, authentication requirements, or error conditions. For a search tool with no structured safety hints, this leaves significant gaps.

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 a single, efficient sentence that communicates the essential information without waste. It's appropriately sized for a search tool and front-loads the key action and resource.

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

Completeness2/5

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

For a search tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the search returns, how results are structured, or any limitations. The agent must rely entirely on the input schema without understanding the tool's behavior or output.

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 documents all parameters thoroughly. The description adds minimal value by listing the searchable fields ('by name, canton, or legal form') but doesn't provide additional context beyond what's in the parameter descriptions.

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 action ('Search') and resource ('Swiss company registry (ZEFIX)'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from its sibling 'search_companies_by_address', which appears to be a related but distinct search method.

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?

The description provides no guidance on when to use this tool versus alternatives like 'search_companies_by_address' or 'get_company'. It mentions searchable fields but offers no context about typical use cases, prerequisites, or limitations.

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/vikramgorla/mcp-swiss'

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