Skip to main content
Glama

Search a geo.admin.ch layer by attribute value

find_layer_features
Read-only

Search 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

NameRequiredDescriptionDefault
langNoLanguage for labels/attributes: de, fr, it, rm or en (default en)en
limitNoMax features (default 10)
containsNotrue = substring match (default), false = exact match
layer_idYesgeo.admin.ch layer id (BOD id), e.g. 'ch.bafu.laerm-strassenlaerm_tag', find ids with search_map_layers
search_textYesValue or substring to look for
search_fieldYesAttribute field to search (see get_layer_info 'fields')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds the matching semantics (contains vs equals) and the dependency on get_layer_info, but says nothing about what the returned feature objects look like, which matters because there is no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the operation and its scope, followed by compact examples that earn their place by illustrating parameter interplay. Slightly dense with two full examples, but no filler sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter read tool with no output schema, the definition covers inputs well but leaves the return shape as a vague 'returns features'. An agent knows how to call it, but not what fields come back or whether an empty result versus an invalid field name can be distinguished.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description earns an extra point by showing the three required parameters combined in realistic examples (egid/1231641 with contains=false, bln_name/Aletsch) and by naming the field-lookup workflow for search_field. It still does not explain limit or lang beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: an attribute search restricted to a single geo.admin.ch layer, backed by the MapServer/find endpoint. It immediately distinguishes itself from layer-discovery siblings like search_map_layers and from per-feature siblings like get_layer_feature or query_layer_at_point.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Guidance is concrete: two worked examples, an explicit pointer that get_layer_info reveals valid field names, and an example of contains=false for exact matching. What is missing is an explicit exclusion such as when to prefer query_layer_at_point or get_layer_feature over an attribute search.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools