Skip to main content
Glama

gva_count

Count geographic features in the Valencian Community using SQL WHERE clauses to filter land activity data from GVA GIS.

Instructions

Count features matching a WHERE clause

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
whereNoSQL WHERE clause (e.g., '1=1' for all)1=1

Implementation Reference

  • Handler implementation for the 'gva_count' tool in TypeScript. Queries the ArcGIS FeatureServer with returnCountOnly=true to get the count of features matching the WHERE clause.
    case "gva_count": { // Count features const countArgs = args as CountArguments; const url = `${BASE_URL}/${LAYER_ID}/query`; const params: RequestParams = { where: countArgs.where || "1=1", returnCountOnly: "true", f: "json", }; const data = await makeRequest(url, params); const count = data.count || 0; return { content: [ { type: "text", text: `Total features matching query: ${count}`, }, ], }; }
  • Handler implementation for the 'gva_count' tool in Python. Queries the ArcGIS FeatureServer with returnCountOnly=true to get the count of features matching the WHERE clause.
    elif name == "gva_count": # Count features url = f"{BASE_URL}/{LAYER_ID}/query" params = { 'where': arguments.get('where', '1=1'), 'returnCountOnly': 'true', 'f': 'json' } data = make_request(url, params) count = data.get('count', 0) return [TextContent( type="text", text=f"Total features matching query: {count}" )]
  • Input schema for the 'gva_count' tool in TypeScript version, defining the optional 'where' parameter.
    inputSchema: { type: "object", properties: { where: { type: "string", description: 'SQL WHERE clause (e.g., "1=1" for all)', default: "1=1", }, }, required: [], },
  • Input schema for the 'gva_count' tool in Python version, defining the optional 'where' parameter.
    "type": "object", "properties": { "where": { "type": "string", "description": "SQL WHERE clause (e.g., '1=1' for all)", "default": "1=1" } }, "required": [] }

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/pepo1275/mcp4gva'

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