Skip to main content
Glama
robobobby
by robobobby

dk_postal_code_lookup

Find the city, area, municipalities, and geographic boundaries for any 4-digit Danish postal code using Nordic regional data tools.

Instructions

Look up a Danish postal code to get the city/area name, bounding box, and associated municipalities.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
postal_codeYes4-digit Danish postal code, e.g. '2200'

Implementation Reference

  • The handler for the 'dk_postal_code_lookup' tool, which fetches postal code data from the DAWA API and formats it into a text response.
    server.tool(
      "dk_postal_code_lookup",
      "Look up a Danish postal code to get the city/area name, bounding box, and associated municipalities.",
      {
        postal_code: z.string().regex(/^\d{4}$/).describe("4-digit Danish postal code, e.g. '2200'"),
      },
      async ({ postal_code }) => {
        try {
          const data = await dawaFetch(`/postnumre/${postal_code}`);
          const lines = [];
          lines.push(`## ${data.nr} ${data.navn}`);
          if (data.bbox) {
            lines.push(`**Bounding box:** ${data.bbox[1].toFixed(4)}°N to ${data.bbox[3].toFixed(4)}°N, ${data.bbox[0].toFixed(4)}°E to ${data.bbox[2].toFixed(4)}°E`);
          }
          if (data.kommuner && data.kommuner.length) {
            lines.push(`**Municipalities:** ${data.kommuner.map(k => `${k.navn} (${k.kode})`).join(", ")}`);
          }
          return { content: [{ type: "text", text: lines.join("\n") }] };
        } catch (err) {
          return { content: [{ type: "text", text: `Error: ${err.message}` }], isError: true };
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the output fields (city/area name, bounding box, municipalities) but lacks details on permissions, rate limits, error handling, or response format. For a lookup tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 front-loads the core purpose and output details without any wasted words. It's appropriately sized for a simple lookup tool with one parameter.

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 tool's low complexity (one parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and output fields but lacks behavioral context and usage guidelines. Without an output schema, it should ideally describe the return format more explicitly, but it's not critically incomplete.

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?

The description adds no parameter-specific information beyond what the input schema provides. Since schema description coverage is 100% (the 'postal_code' parameter is well-documented with type, pattern, and an example), the baseline score of 3 is appropriate. The description doesn't compensate but doesn't need to given the schema's completeness.

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's purpose: 'Look up a Danish postal code to get the city/area name, bounding box, and associated municipalities.' It specifies the verb ('look up'), resource ('Danish postal code'), and output details. However, it doesn't explicitly differentiate from sibling tools like 'no_postal_code_lookup' or 'dk_address_search', which might offer overlapping functionality.

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. It doesn't mention siblings like 'dk_address_search' or 'dk_municipality_lookup' that might serve similar purposes, nor does it specify prerequisites or exclusions. Usage is implied but not explicitly defined.

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