gva_layer_info
Retrieve metadata for GVA GIS layers, including fields, geometry types, spatial references, and extents to understand data structure.
Instructions
Get metadata information about the GVA GIS layer (fields, geometry type, spatial reference, extent)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp4gva/server.py:141-161 (handler)Python handler for the gva_layer_info tool: fetches layer metadata from the GVA GIS ArcGIS FeatureServer using make_request, extracts key fields like name, type, geometryType, spatialReference, extent, and fields, formats into JSON, and returns as TextContent.if name == "gva_layer_info": # Get layer metadata url = f"{BASE_URL}/{LAYER_ID}" params = {'f': 'json'} data = make_request(url, params) # Format response result = { "name": data.get("name"), "type": data.get("type"), "geometryType": data.get("geometryType"), "spatialReference": data.get("spatialReference"), "extent": data.get("extent"), "fields": data.get("fields", []) } return [TextContent( type="text", text=json.dumps(result, indent=2, ensure_ascii=False) )]
- typescript/src/index.ts:188-212 (handler)TypeScript handler for the gva_layer_info tool: asynchronously fetches layer metadata from the GVA GIS ArcGIS FeatureServer using makeRequest, extracts and formats key properties, stringifies to JSON, and returns as structured content.case "gva_layer_info": { // Get layer metadata const url = `${BASE_URL}/${LAYER_ID}`; const params = { f: "json" }; const data = await makeRequest(url, params); // Format response const result = { name: data.name, type: data.type, geometryType: data.geometryType, spatialReference: data.spatialReference, extent: data.extent, fields: data.fields || [], }; return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- mcp4gva/server.py:49-57 (registration)Python registration of gva_layer_info tool in list_tools(), including empty input schema (no parameters required).Tool( name="gva_layer_info", description="Get metadata information about the GVA GIS layer (fields, geometry type, spatial reference, extent)", inputSchema={ "type": "object", "properties": {}, "required": [] } ),
- typescript/src/index.ts:95-102 (registration)TypeScript registration of gva_layer_info tool in listTools handler, including empty input schema.name: "gva_layer_info", description: "Get metadata information about the GVA GIS layer (fields, geometry type, spatial reference, extent)", inputSchema: { type: "object", properties: {}, required: [], }, },