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.",
          },
        },
      },
    },
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that it returns 'all available fields' and lists them, which adds useful context about output richness. However, it doesn't mention behavioral traits like error handling (e.g., if the dam name isn't found), rate limits, or data freshness, leaving gaps for a read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in the first sentence, followed by details on returned fields and data source. Every sentence adds value without redundancy, making it efficient and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one parameter, no output schema, no annotations), the description is mostly complete. It explains what the tool does, what it returns, and the data source. However, without an output schema, it could benefit from more detail on return format or error cases, but the listed fields provide good coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the single parameter 'name' with examples. The description adds value by emphasizing it's for a 'specific Swiss dam by name', reinforcing the parameter's purpose, but doesn't provide additional semantics beyond what the schema offers. With only one parameter, a baseline of 4 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get full technical details') and resource ('specific Swiss dam by name'), and distinguishes it from sibling tools like 'search_dams' and 'get_dams_by_canton' by specifying it returns comprehensive details for a single dam. It explicitly mentions the data source, adding specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool (to get full technical details of a specific dam by name), and the input schema suggests using 'search_dams' first if unsure of the exact name, offering an alternative. However, it doesn't explicitly state when not to use it or compare it to all relevant siblings like 'get_dams_by_canton'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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