Skip to main content
Glama

search_companies_by_address

Find Swiss companies registered at a specific address or locality using open data. Input an address to retrieve company registrations with optional result limits.

Instructions

Search Swiss companies registered at a specific address or locality

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesAddress or locality name
limitNoMax results (default: 20)

Implementation Reference

  • The handler function implementation for the "search_companies_by_address" tool in src/modules/companies.ts.
    case "search_companies_by_address": {
      const body = {
        name: args.address as string,
        maxEntries: (args.limit as number) ?? 20,
        languageKey: "en",
      };
      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 registration and schema definition for "search_companies_by_address".
      name: "search_companies_by_address",
      description: "Search Swiss companies registered at a specific address or locality",
      inputSchema: {
        type: "object",
        required: ["address"],
        properties: {
          address: { type: "string", description: "Address or locality name" },
          limit: { type: "number", description: "Max results (default: 20)" },
        },
      },
    },

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