Skip to main content
Glama
robobobby
by robobobby

no_postal_code_lookup

Find addresses in Norwegian postal code areas. Use this tool to explore locations within specific postal districts by entering a 4-digit postal code.

Instructions

List addresses in a Norwegian postal code area. Useful for exploring what's in a given postal district.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
postal_codeYesNorwegian postal code (4 digits, e.g. '0154', '5003', '7010')
streetNoOptional street name filter within the postal code area
limitNoMax results (default 10)

Implementation Reference

  • The handler function that executes the logic for the "no_postal_code_lookup" tool, calling the address API.
    async ({ postal_code, street, limit }) => {
      try {
        const params = {
          postnummer: postal_code,
          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 for postal code ${postal_code}.` }] };
        }
    
        const poststed = data.adresser[0]?.poststed || "";
        const lines = [`## Postal Code ${postal_code} ${poststed} (${total} addresses 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 };
      }
    }
  • The registration of the "no_postal_code_lookup" tool, including its schema/parameter definitions.
    server.tool(
      "no_postal_code_lookup",
      "List addresses in a Norwegian postal code area. Useful for exploring what's in a given postal district.",
      {
        postal_code: z.string().describe("Norwegian postal code (4 digits, e.g. '0154', '5003', '7010')"),
        street: z.string().optional().describe("Optional street name filter within the postal code area"),
        limit: z.number().min(1).max(50).optional().describe("Max results (default 10)"),
      },
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it 'lists' addresses without disclosing behavioral traits like whether this is a read-only operation, potential rate limits, authentication needs, error conditions, or what the output format looks like. It adds minimal behavioral context beyond the basic action.

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?

Two sentences, zero waste. First sentence states the core functionality, second provides usage context. Perfectly front-loaded and appropriately sized for this tool.

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?

For a read operation with no annotations and no output schema, the description adequately covers the basic purpose but lacks important context about what the output looks like (address format, fields returned) and behavioral constraints. Given the 3 parameters with full schema coverage, it's minimally viable but has clear gaps in behavioral transparency.

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 all three parameters. The description doesn't add any parameter semantics beyond what's in the schema (e.g., doesn't explain Norwegian postal code format beyond what the schema says, doesn't clarify street filtering behavior). Baseline 3 is appropriate when schema does all the 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 tool's purpose with specific verb ('List') and resource ('addresses in a Norwegian postal code area'), and distinguishes it from siblings by specifying Norwegian postal codes (unlike the 'dk_postal_code_lookup' sibling for Denmark).

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

Usage Guidelines4/5

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

The description provides clear context ('Useful for exploring what's in a given postal district') but doesn't explicitly state when not to use it or name specific alternatives among the many sibling tools (e.g., no_address_search, no_municipality_addresses).

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

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