Skip to main content
Glama
robobobby
by robobobby

no_municipality_addresses

Find addresses in Norwegian municipalities by specifying a location and optional street filter. Retrieve structured address data for planning, verification, or analysis purposes.

Instructions

List addresses in a Norwegian municipality. Can filter by street name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
municipalityYesMunicipality name (e.g. 'OSLO', 'BERGEN', 'TRONDHEIM', 'STAVANGER', 'TROMSØ')
streetNoOptional street name filter
limitNoMax results (default 10)

Implementation Reference

  • The "no_municipality_addresses" tool definition and its handler implementation, which queries the Kartverket Adresser API.
    server.tool(
      "no_municipality_addresses",
      "List addresses in a Norwegian municipality. Can filter by street name.",
      {
        municipality: z.string().describe("Municipality name (e.g. 'OSLO', 'BERGEN', 'TRONDHEIM', 'STAVANGER', 'TROMSØ')"),
        street: z.string().optional().describe("Optional street name filter"),
        limit: z.number().min(1).max(50).optional().describe("Max results (default 10)"),
      },
      async ({ municipality, street, limit }) => {
        try {
          const params = {
            kommunenavn: municipality,
            treffPerSide: limit || 10,
          };
          if (street) params.adressenavn = street;
    
          const data = await apiFetch("/sok", params);
          const total = data.metadata?.totaltAntallTreff || 0;
    
          if (!data.adresser?.length) {
            return { content: [{ type: "text", text: `No addresses found in municipality "${municipality}".` }] };
          }
    
          const lines = [`## Addresses in ${municipality} (${total} total)\n`];
          for (const a of data.adresser) {
            lines.push(formatAddress(a));
            lines.push("");
          }
          lines.push(`*Kartverket Adresser API — showing ${data.adresser.length} of ${total}*`);
          return { content: [{ type: "text", text: lines.join("\n") }] };
        } catch (err) {
          return { content: [{ type: "text", text: `Error: ${err.message}` }], isError: true };
        }
      }
    );

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/robobobby/mcp-nordic'

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