se_law_search

Pack: sweden-law · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/se_law_search for the schema, then POST the same URL with its arguments for the data.

Search Swedish national legislation (Svensk forfattningssamling, SFS: laws, ordinances and balkar) by word, in Swedish, e.g. “dataskydd” or “arbetsmiljo”. Matches the whole text of each statute, ranked by relevance, so a word in the title ranks first. By default only statutes not marked repealed; set include_repealed=true to see repealed ones. Optional year_from / year_to narrow by year of issue. Returns up to 10 matches with id (“2018:218” = year:number, the SFS number), title, issue date, issuing ministry, repealed flag, how far it is amended and link. Pair with se_law_get for the text.

Parameters

NameTypeRequiredDescription
querystringyesSwedish word(s), e.g. “dataskydd”; a word from the title ranks best
include_repealedbooleannoAlso return statutes marked repealed (default false)
year_fromnumbernoEarliest year of issue, e.g. 2000
year_tonumbernoLatest year of issue, e.g. 2020

Example call

Arguments

{
  "query": "dataskydd"
}

curl

curl -X POST https://gateway.pipeworx.io/sweden-law/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"se_law_search","arguments":{"query":"dataskydd"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('se_law_search', {
  "query": "dataskydd"
});

Response shape

Always returns: query, count, results

FieldTypeDescription
querystring
include_repealedboolean
countnumber
resultsarray
total_matchesnumber
more_possibleboolean
notestring
sourcestring
data_as_ofstring
hintstring
empty_reasonstring
Full JSON Schema
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "include_repealed": {
      "type": "boolean"
    },
    "count": {
      "type": "number"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "issued": {
            "type": [
              "string",
              "null"
            ]
          },
          "ministry": {
            "type": [
              "string",
              "null"
            ]
          },
          "repealed": {
            "type": "boolean"
          },
          "amended_through": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      }
    },
    "total_matches": {
      "type": "number"
    },
    "more_possible": {
      "type": "boolean"
    },
    "note": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "data_as_of": {
      "type": "string"
    },
    "hint": {
      "type": "string"
    },
    "empty_reason": {
      "type": "string"
    }
  },
  "required": [
    "query",
    "count",
    "results"
  ],
  "additionalProperties": true
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the sweden-law pack
{
  "mcpServers": {
    "sweden-law": {
      "url": "https://gateway.pipeworx.io/sweden-law/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build November 15, 2026