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
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | SR number (e.g. “235.1”) or AS reference “year/number” (e.g. “2022/491”) |
article | string | no | Article number, e.g. “6”, “66a”, “7bis” |
lang | string | no | Text language (default de) |
max_chars | number | no | Cap 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
| Field | Type | Description |
|---|---|---|
found | boolean | |
id | string | null | |
lang | string | null | |
source | string | null | |
data_as_of | string | null | |
eli | string | null | |
title | string | null | |
short_title | string | null | |
sr_number | string | null | |
as_reference | string | null | |
adopted | string | null | |
in_force_from | string | null | |
status | string | null | |
url | string | null | |
citation | string | null | |
version_applicable_from | string | null | |
version_applicable_until | string | null | |
article | string | null | |
article_heading | string | null | |
text | string | null | |
empty_reason | string | null | |
contents | array | null | |
hint | string | null | |
matches | array | null | |
article_count | number | null | |
total_chars | number | null | |
truncated | boolean | 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.