Skip to main content
Glama

get_water_level

Retrieve current water level and temperature data for Swiss rivers and lakes using hydrological station IDs.

Instructions

Get current river or lake water level and temperature at a Swiss hydrological station

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stationYesHydro station ID (e.g. 2135 for Aare/Bern, 2243 for Rhine/Basel)

Implementation Reference

  • The handler implementation for the get_water_level tool, which fetches latest hydrological data from the API and formats the response.
    case "get_water_level": {
      const url = buildUrl(`${BASE}/hydro/latest`, {
        locations: args.station as string,
        app: "mcp-swiss",
        version: "0.1.0",
      });
      const data = await fetchJSON<ApiResponse>(url);
      const payload = data?.payload;
      if (Array.isArray(payload)) {
        const readings = extractReadings(payload);
        return JSON.stringify({ station: args.station, readings });
      }
      return JSON.stringify(data, null, 2);
    }
  • The tool registration and schema definition for get_water_level within the weatherTools list.
    {
      name: "get_water_level",
      description: "Get current river or lake water level and temperature at a Swiss hydrological station",
      inputSchema: {
        type: "object",
        required: ["station"],
        properties: {
          station: { type: "string", description: "Hydro station ID (e.g. 2135 for Aare/Bern, 2243 for Rhine/Basel)" },
        },
      },
    },

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