Skip to main content
Glama

get_dam_details

Retrieve comprehensive technical specifications for Swiss dams including type, dimensions, reservoir data, purpose, and operational history from official Swiss Federal Office of Energy sources.

Instructions

Get full technical details of a specific Swiss dam by name. Returns all available fields: dam type, height, crest length, crest level, reservoir name, impoundment volume, storage level, purpose, operation dates, federal supervision start, and canton. Data source: Swiss Federal Office of Energy (SFOE) via swisstopo BGDI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDam name (e.g. 'Grande Dixence', 'Spitallamm', 'Mattmark', 'Verzasca'). Use search_dams first if you are unsure of the exact name.

Implementation Reference

  • The handler implementation for get_dam_details, which searches for a dam by name and retrieves detailed technical information.
    case "get_dam_details": {
      const damName = args.name as string;
      if (!damName?.trim()) {
        throw new Error("name is required");
      }
    
      // Search by damname first
      let results = await findDams(damName, "damname", true);
    
      // If multiple found, try to find exact match
      let dam: DamFindResult | undefined;
      if (results.length === 1) {
        dam = results[0];
      } else if (results.length > 1) {
        // Prefer exact case-insensitive match
        dam = results.find(
          (r) => r.attributes.damname.toLowerCase() === damName.toLowerCase()
        ) ?? results[0];
      } else {
        // Try facilityname as fallback
        results = await findDams(damName, "facilityname", true);
        if (results.length) {
          dam = results.find(
            (r) => r.attributes.damname.toLowerCase() === damName.toLowerCase()
          ) ?? results[0];
        }
      }
    
      if (!dam) {
        return JSON.stringify({
          found: false,
          name: damName,
          message: `No dam found with name "${damName}". Use search_dams to find the exact name.`,
          source: `${BASE}/find?layer=${DAMS_LAYER}`,
        }, null, 2);
      }
    
      // Resolve canton from coordinates
      let canton: string | null = null;
      if (dam.geometry?.x != null && dam.geometry?.y != null) {
        canton = await fetchCantonForCoords(dam.geometry.x, dam.geometry.y).catch(() => null);
      }
    
      const detail = formatDamDetail(dam, canton);
      const response = {
        found: true,
        ...detail,
        source: `${BASE}/${DAMS_LAYER}/${dam.featureId}`,
      };
    
      const json = JSON.stringify(response, null, 2);
      if (json.length > 49000) {
        // Shouldn't happen for a single dam, but safety net
        return json.slice(0, 49000) + "\n... [truncated]";
      }
      return json;
    }
  • The tool definition and input schema for get_dam_details.
    {
      name: "get_dam_details",
      description:
        "Get full technical details of a specific Swiss dam by name. Returns all available fields: dam type, height, crest length, crest level, reservoir name, impoundment volume, storage level, purpose, operation dates, federal supervision start, and canton. Data source: Swiss Federal Office of Energy (SFOE) via swisstopo BGDI.",
      inputSchema: {
        type: "object",
        required: ["name"],
        properties: {
          name: {
            type: "string",
            description:
              "Dam name (e.g. 'Grande Dixence', 'Spitallamm', 'Mattmark', 'Verzasca'). Use search_dams first if you are unsure of the exact 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