Skip to main content
Glama
robobobby
by robobobby

dk_energy_mix

Retrieve real-time Danish electricity production data including wind, solar, conventional sources, and cross-border exchange. Updated every 5 minutes for DK1, DK2, or specific regions.

Instructions

Get the real-time Danish electricity production mix: wind (offshore/onshore), solar, conventional, and cross-border exchange. Updated every 5 minutes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
areaNoPrice area: DK1 or DK2, or a city/region name. Default: both areas.

Implementation Reference

  • The implementation of the `dk_energy_mix` MCP tool, which fetches real-time Danish electricity production mix data from the Energi Data Service API.
    server.tool(
      "dk_energy_mix",
      "Get the real-time Danish electricity production mix: wind (offshore/onshore), solar, conventional, and cross-border exchange. Updated every 5 minutes.",
      {
        area: z.string().optional().describe("Price area: DK1 or DK2, or a city/region name. Default: both areas."),
      },
      async ({ area }) => {
        const priceArea = area ? resolvePriceArea(area) : null;
        const filter = priceArea ? JSON.stringify({ PriceArea: priceArea }) : undefined;
    
        const data = await fetchDataset("ElectricityProdex5MinRealtime", {
          limit: priceArea ? 1 : 2,
          sort: "Minutes5DK desc",
          filter,
        });
    
        if (!data.records?.length) {
          return { content: [{ type: "text", text: "No production data available." }] };
        }
    
        let output = "# Danish Electricity Production Mix\n\n";
    
        for (const r of data.records) {
          const offshore = r.OffshoreWindPower || 0;
          const onshore = r.OnshoreWindPower || 0;
          const solar = r.SolarPower || 0;
          const smallPlants = r.ProductionLt100MW || 0;
          const largePlants = r.ProductionGe100MW || 0;
          const totalProduction = smallPlants + largePlants;
          const totalRenewable = offshore + onshore + solar;
          const renewableShare = totalProduction > 0 ? (totalRenewable / totalProduction * 100) : 0;
    
          output += `## ${r.PriceArea} β€” ${PRICE_AREAS[r.PriceArea] || r.PriceArea}\n`;
          output += `*${r.Minutes5DK?.replace("T", " ").slice(0, 16)}*\n\n`;
    
          output += `### Production\n`;
          output += `| Source | MW |\n|---|---|\n`;
          output += `| ⚑ Offshore wind | ${offshore.toFixed(1)} |\n`;
          output += `| 🌬️ Onshore wind | ${onshore.toFixed(1)} |\n`;
          output += `| β˜€οΈ Solar | ${solar.toFixed(1)} |\n`;
          output += `| 🏭 Large plants (β‰₯100MW) | ${largePlants.toFixed(1)} |\n`;
          output += `| πŸ”§ Small plants (<100MW) | ${smallPlants.toFixed(1)} |\n`;
          output += `| **Total** | **${totalProduction.toFixed(1)}** |\n`;
          output += `| **Renewable share** | **${renewableShare.toFixed(1)}%** |\n\n`;
    
          // Cross-border exchanges (positive = import, negative = export)
          const exchanges = [
            ["πŸ‡©πŸ‡ͺ Germany", r.ExchangeGermany],
            ["πŸ‡³πŸ‡± Netherlands", r.ExchangeNetherlands],
            ["πŸ‡¬πŸ‡§ Great Britain", r.ExchangeGreatBritain],
            ["πŸ‡³πŸ‡΄ Norway", r.ExchangeNorway],
            ["πŸ‡ΈπŸ‡ͺ Sweden", r.ExchangeSweden],
            ["πŸŒ‰ Great Belt", r.ExchangeGreatBelt],
          ].filter(([, v]) => v != null);
    
          if (exchanges.length) {
            output += `### Cross-border Exchange (MW)\n`;
            output += `| Connection | MW | Direction |\n|---|---|---|\n`;
            for (const [name, mw] of exchanges) {
              const dir = mw > 0 ? "β†’ Import" : mw < 0 ? "← Export" : "β€”";
              output += `| ${name} | ${Math.abs(mw).toFixed(1)} | ${dir} |\n`;
            }
            output += "\n";
          }
        }
    
        output += "*Source: Energi Data Service (Energinet). Real-time 5-minute resolution.*\n";
        return { content: [{ type: "text", text: output }] };
      }
    );
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 of behavioral disclosure. It effectively describes the tool's function and update cadence, but does not cover other behavioral aspects such as rate limits, authentication requirements, error conditions, or response format. The description does not contradict any annotations (since none exist).

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 a single, well-structured sentence that efficiently conveys the tool's purpose, scope, and update frequency without any redundant information. It is front-loaded with the core functionality and every element (components listed, update cadence) adds clear value.

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 moderate complexity (real-time data retrieval with one optional parameter), no annotations, and no output schema, the description provides a solid foundation by explaining what data is returned and how often it's updated. However, it lacks details on the response structure (e.g., units, format) and potential limitations (e.g., data sources, historical availability), which would enhance completeness for an agent.

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?

The input schema has 100% description coverage, with the single parameter 'area' well-documented in the schema. The description does not add any parameter-specific information beyond what the schema provides, but with only one optional parameter and high schema coverage, the baseline is appropriately high. No compensation is needed for missing parameter details.

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 specific action ('Get') and resource ('real-time Danish electricity production mix'), listing the exact components (wind, solar, conventional, cross-border exchange) and update frequency. It distinguishes itself from siblings like dk_electricity_prices (which focuses on prices rather than production mix) and dk_co2_emissions (which focuses on emissions).

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 by specifying the data domain (Danish electricity production) and update frequency (every 5 minutes), which helps determine when to use this tool. However, it does not explicitly state when not to use it or name specific alternatives among siblings (e.g., dk_electricity_prices for price data instead of production mix).

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/robobobby/mcp-nordic'

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