Search a geo.admin.ch layer by attribute value
find_layer_featuresSearch features in a single geo.admin.ch layer by attribute value, using substring or exact matching, and return matching records.
Instructions
Attribute search within one geo.admin.ch layer (MapServer/find): returns features whose field contains (or equals) the text. Examples: layer_id='ch.bfs.gebaeude_wohnungs_register', search_field='egid', search_text='1231641', contains=false; layer_id='ch.bafu.bundesinventare-bln', search_field='bln_name', search_text='Aletsch'. Use get_layer_info to see field names.
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": {
"layer_id": "<layer_id>",
"search_field": "<search_field>",
"search_text": "<search_text>"
},
"name": "find_layer_features"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Language for labels/attributes: de, fr, it, rm or en (default en) | en |
| limit | No | Max features (default 10) | |
| contains | No | true = substring match (default), false = exact match | |
| layer_id | Yes | geo.admin.ch layer id (BOD id), e.g. 'ch.bafu.laerm-strassenlaerm_tag', find ids with search_map_layers | |
| search_text | Yes | Value or substring to look for | |
| search_field | Yes | Attribute field to search (see get_layer_info 'fields') |