Skip to main content
Glama

search_legal_entities

Search legal entities in Statistics Sweden's business register by municipality, county, industry, or employee-size class, or omit filters to read from the top.

Instructions

Search legal entities in Statistics Sweden's business register. Filter on one of kommun, lan, naringsgren, anstalldaklass, or leave the filters out to read from the top of the register.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_legal_entities"
  }
}

Input Schema

NameRequiredDescriptionDefault
lanNoCounty code, two digits, for example 04 for Södermanland.
fullNoReturn every available variable instead of the usual selection.
limitNoHow many legal entities to return. Paging is followed for you.
kommunNoMunicipality code, four digits, for example 0486 for Strängnäs.
naringsgrenNoIndustry code (SNI), for example 41200 for building construction.
anstalldaklassNoSize class code for the number of employees.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are present, so the description carries the full disclosure burden. It does add genuine behavioral context by revealing that unfiltered calls read from the top of the register (default ordering) and that paging is handled transparently, but it says nothing about permissions, rate limits, or what a result record contains.

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 filler, and the most decision-relevant information (what is searched, then how to filter) is front-loaded. Every clause earns its place.

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?

With six optional parameters, no annotations, and no output schema, the description should ideally say what a returned entity looks like and how the default projection differs from `full`. It covers the filtering decision adequately but leaves the return shape and sibling routing unaddressed.

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 coverage is 100%, so the parameters are already well documented and the baseline is 3. The phrase 'filter on one of' hints that the four filter codes are alternatives rather than combinable, which the schema never states — a useful semantic addition, though `limit` and `full` are left to the schema.

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?

States a specific verb and resource ('Search legal entities') plus the concrete data source ('Statistics Sweden's business register'), which is far more informative than a bare name restatement. It does not explicitly distinguish itself from siblings like count_legal_entities or get_legal_entity, so the agent must infer the search-vs-count-vs-fetch split from the verb alone.

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?

Provides a real usage rule — 'filter on one of ... or leave the filters out to read from the top of the register' — which tells the agent both the filtered path and the unfiltered fallback. However, it never says when to prefer count_legal_entities (to get totals without consuming the limit) or get_legal_entity (to fetch a single record), leaving the sibling routing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.