Skip to main content
Glama

reverse_geocode

Convert geographic coordinates into Swiss addresses using swisstopo data. Provide latitude and longitude to retrieve location information.

Instructions

Convert coordinates to a Swiss address (swisstopo)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latYesLatitude (WGS84)
lngYesLongitude (WGS84)

Implementation Reference

  • The handler implementation for the 'reverse_geocode' tool, which fetches data from the swisstopo SearchServer.
    case "reverse_geocode": {
      const lat = args.lat as number;
      const lng = args.lng as number;
      const url = buildUrl(`${BASE}/rest/services/api/SearchServer`, {
        searchText: `${lat},${lng}`,
        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 input schema definition for the 'reverse_geocode' tool.
    {
      name: "reverse_geocode",
      description: "Convert coordinates to a Swiss address (swisstopo)",
      inputSchema: {
        type: "object",
        required: ["lat", "lng"],
        properties: {
          lat: { type: "number", description: "Latitude (WGS84)" },
          lng: { type: "number", description: "Longitude (WGS84)" },
        },
      },
    },

Tool Definition Quality

Score is being calculated. Check back soon.

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

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