Search laws
search_lawsFull-text search across law sections via Elasticsearch.
Returns matching law sections with highlighted snippets. Does NOT
return full text - use get_law_section to retrieve the complete
content of a specific section.
Args:
query: Search query text (supports Lucene syntax).
book_code: Optional filter by law book code, any case (e.g.
"BGB", "BranntwMonG"). An unknown code returns an error
with ``suggestions`` instead of an empty result.
limit: Maximum results (default 10, max 50). Values above 50 are
clamped; the response then includes ``limit_clamped: true``
and the original ``requested_limit``.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search_laws"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| book_code | No |