Skip to main content
Glama

Lecture d’objets WFS

gpf_wfs_get_features
Read-onlyIdempotent

Queries a WFS type to retrieve structured geographic features with attribute filters, spatial operators, and property selection. Returns data ready for mapping.

Instructions

Interroge un type WFS et renvoie des résultats structurés sans demander au modèle d'écrire du CQL ou du WFS. Utiliser select pour choisir les propriétés, where pour filtrer, order_by pour trier et spatial_operator avec ses paramètres dédiés pour le spatial. Avec result_type="request", la géométrie est automatiquement ajoutée aux propriétés sélectionnées pour garantir une requête cartographiable. Exemple attributaire : where=[{ property: "code_insee", operator: "eq", value: "75056" }]. Exemple bbox : spatial_operator="bbox" avec bbox_west, bbox_south, bbox_east, bbox_north en lon/lat. Exemple point dans géométrie : spatial_operator="intersects_point" avec intersects_lon et intersects_lat. Exemple distance : spatial_operator="dwithin_point" avec dwithin_lon, dwithin_lat, dwithin_distance_m. Exemple réutilisation : spatial_operator="intersects_feature" avec intersects_feature_typename et intersects_feature_id issus d'une feature_ref. ⚠️ Quand typename et intersects_feature_typename sont identiques, utiliser gpf_wfs_get_feature_by_id pour récupérer exactement l'objet ciblé. OBLIGATOIRE : toujours appeler gpf_wfs_describe_type avant ce tool, sauf si gpf_wfs_describe_type a déjà été appelé pour ce même typename dans la conversation en cours. Les noms de propriétés ne peuvent pas être devinés : ils sont spécifiques à chaque typename et diffèrent systématiquement des conventions habituelles (ex : pas de nom_officiel, navigabilite sans accent, etc.). Toute tentative sans appel préalable à gpf_wfs_describe_type provoquera une erreur.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typenameYesNom exact du type WFS à interroger, par exemple `BDTOPO_V3:batiment`. Utiliser `gpf_wfs_search_types` pour trouver un `typename` valide.
limitNoNombre maximum d'objets à renvoyer. Valeur par défaut : 100. Maximum : 5000.
result_typeNo`results` renvoie une FeatureCollection avec les propriétés attributaires uniquement — **les géométries ne sont pas incluses**, ce mode ne peut donc pas être utilisé directement pour cartographier. `hits` renvoie uniquement le nombre total d'objets correspondant à la requête. `request` renvoie l'URL WFS compilée (`get_url`) à destination de `create_map` via `geojson_url`, ou pour déboguer la requête générée. **La géométrie est automatiquement ajoutée aux propriétés du `select`** pour garantir l'affichage cartographique.results
selectNoListe des propriétés non géométriques à renvoyer pour chaque objet. Utiliser `gpf_wfs_describe_type` pour connaître les noms exacts disponibles. Exemple : `["code_insee", "nom_officiel"]`.
order_byNoListe ordonnée des critères de tri.
whereNoClauses de filtre attributaire, combinées avec `AND`.
spatial_operatorNoType optionnel de filtre spatial.
bbox_westNoLongitude ouest en WGS84 `lon/lat`, utilisée avec `spatial_operator = "bbox"`.
bbox_southNoLatitude sud en WGS84 `lon/lat`, utilisée avec `spatial_operator = "bbox"`.
bbox_eastNoLongitude est en WGS84 `lon/lat`, utilisée avec `spatial_operator = "bbox"`.
bbox_northNoLatitude nord en WGS84 `lon/lat`, utilisée avec `spatial_operator = "bbox"`.
intersects_lonNoLongitude du point en WGS84 `lon/lat`, utilisée avec `spatial_operator = "intersects_point"`.
intersects_latNoLatitude du point en WGS84 `lon/lat`, utilisée avec `spatial_operator = "intersects_point"`.
dwithin_lonNoLongitude du point en WGS84 `lon/lat`, utilisée avec `spatial_operator = "dwithin_point"`.
dwithin_latNoLatitude du point en WGS84 `lon/lat`, utilisée avec `spatial_operator = "dwithin_point"`.
dwithin_distance_mNoDistance en mètres, utilisée avec `spatial_operator = "dwithin_point"`.
intersects_feature_typenameNoType WFS du feature de référence, utilisé avec `spatial_operator = "intersects_feature"`.
intersects_feature_idNoIdentifiant du feature de référence, utilisé avec `spatial_operator = "intersects_feature"`.
Behavior5/5

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

Annotations already indicate read-only and idempotent, but the description adds critical behaviors: geometry auto-added for request mode, error on missing describe_type, and result_type differences.

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?

Description is long but well-structured with examples and warnings. Each sentence adds value; however, it could be slightly more concise.

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

Completeness5/5

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

Given the tool's complexity (18 parameters, spatial operators), the description is comprehensive: covers mandatory prerequisite, error conditions, result formats, and parameter usage. No output schema, but result_type explanations suffice.

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 has 100% coverage, so baseline is 3. The description adds value by grouping spatial operators with their parameters, providing examples, and explaining the purpose of each parameter beyond the schema.

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?

The description clearly states the tool queries a WFS type and returns structured results without requiring the model to write CQL or WFS. It distinguishes from sibling tools like gpf_wfs_get_feature_by_id.

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

Usage Guidelines5/5

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

Explicitly states when to use (after calling gpf_wfs_describe_type) and when not to (use get_feature_by_id for the same typename). Provides examples and mandatory prerequisites.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ignfab/geocontext'

If you have feedback or need assistance with the MCP directory API, please join our Discord server