Skip to main content
Glama
robobobby
by robobobby

no_search_subunits

Find branches, offices, and departments of Norwegian companies by parent organization number, name search, or municipality. Retrieve up to 50 results per query.

Instructions

Search sub-units (underenheter) - branches, offices, departments of Norwegian companies

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parent_org_numberNoParent company org number to find its sub-units
queryNoName search
municipalityNoMunicipality name
limitNoNumber of results (max 50)

Implementation Reference

  • The handler for the no_search_subunits tool, which queries the /underenheter API and formats the results.
      async ({ parent_org_number, query, municipality, limit }) => {
        const params = { size: Math.min(limit, 50) };
        if (parent_org_number) params["overordnetEnhet"] = parent_org_number.replace(/\s/g, "");
        if (query) params.navn = query;
        if (municipality) params["kommunenummer"] = municipality;
    
        const data = await apiFetch("/underenheter", params);
        const units = data._embedded?.underenheter || [];
    
        if (units.length === 0) {
          return { content: [{ type: "text", text: "No sub-units found." }] };
        }
    
        const total = data.page?.totalElements || units.length;
        const header = `Found ${total.toLocaleString()} sub-units (showing ${units.length}):\n`;
        const results = units.map((u, i) => {
          const lines = [
            `${i + 1}. **${u.navn}**`,
            `   Org.nr: ${u.organisasjonsnummer}`,
            `   Parent: ${u.overordnetEnhet || "N/A"}`,
          ];
          if (u.naeringskode1?.beskrivelse) lines.push(`   Industry: ${u.naeringskode1.beskrivelse}`);
          if (u.antallAnsatte != null) lines.push(`   Employees: ${u.antallAnsatte}`);
          lines.push(`   Address: ${formatAddress(u.beliggenhetsadresse)}`);
          return lines.join("\n");
        }).join("\n\n");
    
        return { content: [{ type: "text", text: header + "\n" + results }] };
      }
    );
  • Tool registration for no_search_subunits with Zod schema for input validation.
    server.tool(
      "no_search_subunits",
      "Search sub-units (underenheter) - branches, offices, departments of Norwegian companies",
      {
        parent_org_number: z.string().optional().describe("Parent company org number to find its sub-units"),
        query: z.string().optional().describe("Name search"),
        municipality: z.string().optional().describe("Municipality name"),
        limit: z.number().optional().default(10).describe("Number of results (max 50)"),
      },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions searching but doesn't disclose behavioral traits like whether this is a read-only operation, if it requires authentication, rate limits, pagination behavior, or what the output format looks like. For a search tool with no annotation coverage, this leaves significant gaps.

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 clearly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what results look like, how filtering works, or any constraints beyond the basic purpose. The context signals indicate significant complexity that isn't addressed in the description.

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 documents all four parameters well. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., it doesn't explain how 'query' interacts with 'parent_org_number' or format requirements). Baseline 3 is appropriate when schema does the heavy lifting.

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 searches for 'sub-units (underenheter) - branches, offices, departments of Norwegian companies', specifying the verb (search), resource (sub-units), and geographic scope (Norwegian). However, it doesn't explicitly differentiate from sibling tools like 'no_search_companies' or 'no_company_lookup', which likely search for different entity types.

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?

No guidance is provided on when to use this tool versus alternatives. The description mentions searching for sub-units of Norwegian companies, but doesn't specify prerequisites (e.g., needing a parent company identifier) or contrast it with sibling tools that might handle similar Norwegian business data.

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