Skip to main content
Glama
robobobby
by robobobby

dk_current_weather

Retrieve current weather conditions for locations in Denmark using DMI HARMONIE high-resolution model. Accepts city names, coordinates, or postal codes.

Instructions

Get current weather conditions for a location in Denmark. Uses DMI HARMONIE high-resolution model (2km). Accepts city names, coordinates, or postal codes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationYesDanish city name (e.g. 'Copenhagen', 'Aarhus', 'Gilleleje'), postal code, or lat,lon coordinates

Implementation Reference

  • The handler function that executes the dk_current_weather tool logic using Open-Meteo data.
    async ({ location }) => {
      try {
        const loc = await getLocation(location);
        const data = await openMeteoFetch({
          latitude: loc.lat,
          longitude: loc.lon,
          current: "temperature_2m,relative_humidity_2m,apparent_temperature,precipitation,weather_code,wind_speed_10m,wind_direction_10m,wind_gusts_10m,surface_pressure,cloud_cover",
        });
        const c = data.current;
        const weather = WMO_CODES[c.weather_code] || `Code ${c.weather_code}`;
        const lines = [
          `## ${loc.name} — Current Weather`,
          `**Conditions:** ${weather}`,
          `**Temperature:** ${c.temperature_2m}°C (feels like ${c.apparent_temperature}°C)`,
          `**Humidity:** ${c.relative_humidity_2m}%`,
          `**Wind:** ${c.wind_speed_10m} km/h from ${c.wind_direction_10m}° (gusts ${c.wind_gusts_10m} km/h)`,
          `**Pressure:** ${c.surface_pressure} hPa`,
          `**Cloud cover:** ${c.cloud_cover}%`,
          `**Precipitation:** ${c.precipitation} mm`,
          `\n*DMI HARMONIE model, ${data.current_units?.time || ""} ${c.time}*`,
        ];
        return { content: [{ type: "text", text: lines.join("\n") }] };
      } catch (err) {
        return { content: [{ type: "text", text: `Error: ${err.message}` }], isError: true };
      }
    }
  • Registration of the dk_current_weather tool with the server.
    server.tool(
      "dk_current_weather",
      "Get current weather conditions for a location in Denmark. Uses DMI HARMONIE high-resolution model (2km). Accepts city names, coordinates, or postal codes.",
      {
        location: z.string().describe("Danish city name (e.g. 'Copenhagen', 'Aarhus', 'Gilleleje'), postal code, or lat,lon coordinates"),
      },
      async ({ location }) => {
        try {
          const loc = await getLocation(location);
          const data = await openMeteoFetch({
            latitude: loc.lat,
            longitude: loc.lon,
            current: "temperature_2m,relative_humidity_2m,apparent_temperature,precipitation,weather_code,wind_speed_10m,wind_direction_10m,wind_gusts_10m,surface_pressure,cloud_cover",
          });
          const c = data.current;
          const weather = WMO_CODES[c.weather_code] || `Code ${c.weather_code}`;
          const lines = [
            `## ${loc.name} — Current Weather`,
            `**Conditions:** ${weather}`,
            `**Temperature:** ${c.temperature_2m}°C (feels like ${c.apparent_temperature}°C)`,
            `**Humidity:** ${c.relative_humidity_2m}%`,
            `**Wind:** ${c.wind_speed_10m} km/h from ${c.wind_direction_10m}° (gusts ${c.wind_gusts_10m} km/h)`,
            `**Pressure:** ${c.surface_pressure} hPa`,
            `**Cloud cover:** ${c.cloud_cover}%`,
            `**Precipitation:** ${c.precipitation} mm`,
            `\n*DMI HARMONIE model, ${data.current_units?.time || ""} ${c.time}*`,
          ];
          return { content: [{ type: "text", text: lines.join("\n") }] };
        } catch (err) {
          return { content: [{ type: "text", text: `Error: ${err.message}` }], isError: true };
        }
      }
    );
  • Input schema definition for the dk_current_weather tool.
    {
      location: z.string().describe("Danish city name (e.g. 'Copenhagen', 'Aarhus', 'Gilleleje'), postal code, or lat,lon coordinates"),
    },
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the data source ('DMI HARMONIE high-resolution model (2km)') and acceptable input types ('city names, coordinates, or postal codes'), which adds useful context. However, it does not mention behavioral traits like rate limits, error handling, or response format, leaving gaps for a tool with no annotations.

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 appropriately sized and front-loaded, with two sentences that efficiently convey purpose, data source, and input requirements. Every sentence earns its place without redundancy or unnecessary details.

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

Completeness3/5

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

Given no annotations and no output schema, the description is moderately complete. It covers purpose, data source, and input semantics adequately, but lacks details on behavioral traits (e.g., rate limits, errors) and output format. For a tool with no structured support, it should do more to compensate.

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 'location' parameter. The description adds value by specifying acceptable input types ('city names, coordinates, or postal codes') and examples ('e.g. 'Copenhagen', 'Aarhus', 'Gilleleje''), which enhances understanding beyond the schema. With 0 parameters beyond the schema, this exceeds the baseline of 3.

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 current weather conditions'), target resource ('for a location in Denmark'), and distinguishes it from siblings like 'dk_weather_forecast' and 'dk_compare_weather' by specifying 'current' conditions. It also mentions the data source ('DMI HARMONIE high-resolution model'), which further differentiates it.

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 ('Get current weather conditions for a location in Denmark'), but does not explicitly state when not to use it or name alternatives. It implies usage for current conditions versus forecast tools, but lacks explicit exclusions or comparisons.

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