Skip to main content
Glama

get_municipality

Retrieve detailed information about Swiss municipalities by name, including location data and administrative details, using open Swiss geodata.

Instructions

Get information about a Swiss municipality by name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesMunicipality name

Implementation Reference

  • The handler implementation for get_municipality which fetches municipality data from the SearchServer API.
    case "get_municipality": {
      const url = buildUrl(`${BASE}/rest/services/api/SearchServer`, {
        searchText: args.name as string,
        type: "locations",
        sr: 4326,
        limit: 5,
      });
      const data = await fetchJSON<SearchResponse>(url);
      return JSON.stringify({
        count: data.results.length,
        results: data.results.map(slimSearchResult),
      });
    }
  • The tool definition/schema for get_municipality.
      name: "get_municipality",
      description: "Get information about a Swiss municipality by name",
      inputSchema: {
        type: "object",
        required: ["name"],
        properties: {
          name: { type: "string", description: "Municipality name" },
        },
      },
    },

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/vikramgorla/mcp-swiss'

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