ch_law_get

Pack: switzerland-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/ch_law_get for the schema, then POST the same URL with its arguments for the data.

Fetch one Swiss federal act: its record and consolidated text. id is an SR number from ch_law_search (e.g. “235.1” for the Federal Act on Data Protection) or an Official Compilation reference like “2022/491”. Returns title, short title, SR number, AS reference, adoption and entry-into-force dates, in-force status, the date of the consolidated version returned (the version applicable today) and the text. Pass article (e.g. “6”, “66a”) for one article only; without it the text is capped at max_chars with a list of chapters. lang picks the language (de, fr, it, en when available). The consolidated text is informative as published; the legal force lies with the Official Compilation.

Parameters

NameTypeRequiredDescription
idstringyesSR number (e.g. “235.1”) or AS reference “year/number” (e.g. “2022/491”)
articlestringnoArticle number, e.g. “6”, “66a”, “7bis”
langstringnoText language (default de)
max_charsnumbernoCap on returned text when no article is given (default 20000, max 100000)

Example call

Arguments

{
  "id": "235.1",
  "article": "6",
  "lang": "de"
}

curl

curl -X POST https://gateway.pipeworx.io/switzerland-law/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"ch_law_get","arguments":{"id":"235.1","article":"6","lang":"de"}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('ch_law_get', {
  "id": "235.1",
  "article": "6",
  "lang": "de"
});

Response shape

FieldTypeDescription
foundboolean
idstring | null
langstring | null
sourcestring | null
data_as_ofstring | null
elistring | null
titlestring | null
short_titlestring | null
sr_numberstring | null
as_referencestring | null
adoptedstring | null
in_force_fromstring | null
statusstring | null
urlstring | null
citationstring | null
version_applicable_fromstring | null
version_applicable_untilstring | null
articlestring | null
article_headingstring | null
textstring | null
empty_reasonstring | null
contentsarray | null
hintstring | null
matchesarray | null
article_countnumber | null
total_charsnumber | null
truncatedboolean | null
Full JSON Schema
{
  "type": "object",
  "properties": {
    "found": {
      "type": "boolean"
    },
    "id": {
      "type": [
        "string",
        "null"
      ]
    },
    "lang": {
      "type": [
        "string",
        "null"
      ]
    },
    "source": {
      "type": [
        "string",
        "null"
      ]
    },
    "data_as_of": {
      "type": [
        "string",
        "null"
      ]
    },
    "eli": {
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "short_title": {
      "type": [
        "string",
        "null"
      ]
    },
    "sr_number": {
      "type": [
        "string",
        "null"
      ]
    },
    "as_reference": {
      "type": [
        "string",
        "null"
      ]
    },
    "adopted": {
      "type": [
        "string",
        "null"
      ]
    },
    "in_force_from": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": [
        "string",
        "null"
      ]
    },
    "url": {
      "type": [
        "string",
        "null"
      ]
    },
    "citation": {
      "type": [
        "string",
        "null"
      ]
    },
    "version_applicable_from": {
      "type": [
        "string",
        "null"
      ]
    },
    "version_applicable_until": {
      "type": [
        "string",
        "null"
      ]
    },
    "article": {
      "type": [
        "string",
        "null"
      ]
    },
    "article_heading": {
      "type": [
        "string",
        "null"
      ]
    },
    "text": {
      "type": [
        "string",
        "null"
      ]
    },
    "empty_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "contents": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "hint": {
      "type": [
        "string",
        "null"
      ]
    },
    "matches": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "article_count": {
      "type": [
        "number",
        "null"
      ]
    },
    "total_chars": {
      "type": [
        "number",
        "null"
      ]
    },
    "truncated": {
      "type": [
        "boolean",
        "null"
      ]
    }
  },
  "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 switzerland-law pack
{
  "mcpServers": {
    "switzerland-law": {
      "url": "https://gateway.pipeworx.io/switzerland-law/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build November 15, 2026