Skip to main content
Glama
robobobby
by robobobby

dk_municipality_lookup

Find Danish municipalities by code or name to retrieve official details including region, geographic boundaries, and administrative codes for data verification and location analysis.

Instructions

Look up a Danish municipality (kommune) by code or search by name. Returns name, code, region, and geographic bounds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNo4-digit municipality code (e.g. '0101' for Copenhagen)
nameNoMunicipality name to search (e.g. 'Solrød')

Implementation Reference

  • The 'dk_municipality_lookup' tool registration and handler implementation. It uses a helper function 'dawaFetch' to query the municipal API and formats the result as markdown.
    // Tool 4: Municipality info
    server.tool(
      "dk_municipality_lookup",
      "Look up a Danish municipality (kommune) by code or search by name. Returns name, code, region, and geographic bounds.",
      {
        code: z.string().optional().describe("4-digit municipality code (e.g. '0101' for Copenhagen)"),
        name: z.string().optional().describe("Municipality name to search (e.g. 'Solrød')"),
      },
      async ({ code, name }) => {
        try {
          let data;
          if (code) {
            data = [await dawaFetch(`/kommuner/${code}`)];
          } else if (name) {
            data = await dawaFetch("/kommuner", { q: name });
          } else {
            return { content: [{ type: "text", text: "Provide either code or name." }], isError: true };
          }
          if (!data.length) return { content: [{ type: "text", text: "No municipality found." }] };
          const lines = data.map(k => {
            const parts = [`## ${k.navn} (${k.kode})`];
            if (k.regionskode) parts.push(`**Region code:** ${k.regionskode}`);
            if (k.bbox) parts.push(`**Bounds:** ${k.bbox[1].toFixed(4)}°N to ${k.bbox[3].toFixed(4)}°N`);
            if (k.href) parts.push(`**API:** ${k.href}`);
            return parts.join("\n");
          });
          return { content: [{ type: "text", text: lines.join("\n\n") }] };
        } catch (err) {
          return { content: [{ type: "text", text: `Error: ${err.message}` }], isError: true };
        }
      }
    );
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the lookup/search behavior and return data structure, but doesn't mention rate limits, authentication needs, error conditions, or whether this is a read-only operation. The description doesn't contradict any annotations since none exist.

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 perfectly concise - a single sentence that efficiently communicates the tool's functionality, query methods, and return values with zero wasted words. It's front-loaded with the core purpose.

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 lookup tool with no annotations and no output schema, the description provides adequate basic information about what the tool does and what it returns. However, it lacks details about behavioral aspects like whether both parameters can be used simultaneously, how name matching works, or what happens when no results are found.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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 both parameters well. The description adds value by clarifying these are alternative ways to query (code OR name search) and providing context about what 'municipality' means in the Danish context ('kommune'), but doesn't add significant semantic details beyond the schema.

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 verbs ('look up', 'search') and resources ('Danish municipality'), and distinguishes it from siblings by focusing on municipality data rather than addresses, weather, or companies. It explicitly mentions what information is returned (name, code, region, geographic bounds).

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

Usage Guidelines3/5

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

The description implies usage by stating two ways to query (by code or name), but doesn't provide explicit guidance on when to use this tool versus alternatives like 'dk_postal_code_lookup' or 'no_municipality_addresses'. No exclusions or prerequisites are mentioned.

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