Skip to main content
Glama

wind_model_simple

Calculate wind speeds at different altitudes using logarithmic or power law models for flight planning and aviation operations.

Instructions

Calculate wind speeds at different altitudes using logarithmic or power law models.

Args: altitudes_m: List of altitudes in meters surface_wind_speed_ms: Wind speed at 10m reference height in m/s surface_wind_direction_deg: Wind direction at surface in degrees (0=North, 90=East) model_type: Wind model type ('logarithmic' or 'power_law') roughness_length_m: Surface roughness length in meters

Returns: Formatted string with wind profile data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
altitudes_mYes
surface_wind_speed_msNo
surface_wind_direction_degNo
model_typeNologarithmic
roughness_length_mNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler for wind_model_simple. Imports core logic from integrations.atmosphere, computes wind profile, formats as table with JSON, handles errors.
    def wind_model_simple(
        altitudes_m: list[float],
        surface_wind_speed_ms: float = 5.0,
        surface_wind_direction_deg: float = 270.0,
        model_type: Literal["logarithmic", "power_law"] = "logarithmic",
        roughness_length_m: float = 0.03,
    ) -> str:
        """Calculate wind speeds at different altitudes using logarithmic or power law models.
    
        Args:
            altitudes_m: List of altitudes in meters
            surface_wind_speed_ms: Wind speed at 10m reference height in m/s
            surface_wind_direction_deg: Wind direction at surface in degrees (0=North, 90=East)
            model_type: Wind model type ('logarithmic' or 'power_law')
            roughness_length_m: Surface roughness length in meters
    
        Returns:
            Formatted string with wind profile data
        """
        try:
            from ..integrations.atmosphere import wind_model_simple as _wind_model
    
            wind_profile = _wind_model(
                altitudes_m,
                surface_wind_speed_ms,
                surface_wind_direction_deg,
                model_type,
                roughness_length_m,
            )
    
            # Format response
            result_lines = [f"Wind Profile ({model_type} model)", "=" * 50]
            result_lines.extend(
                [
                    f"Surface Reference: {surface_wind_speed_ms:.1f} m/s @ {surface_wind_direction_deg:.0f}° (10m height)",
                    f"Roughness Length: {roughness_length_m:.3f} m",
                    "",
                    f"{'Alt (m)':>8} {'Speed (m/s)':>12} {'Dir (deg)':>10} {'Gust Factor':>12}",
                ]
            )
            result_lines.append("-" * 50)
    
            for point in wind_profile:
                result_lines.append(
                    f"{point.altitude_m:8.0f} {point.wind_speed_ms:12.1f} {point.wind_direction_deg:10.0f} "
                    f"{point.gust_factor:12.2f}"
                )
    
            # Add JSON data
            json_data = json.dumps([p.model_dump() for p in wind_profile], indent=2)
            result_lines.extend(["", "JSON Data:", json_data])
    
            return "\n".join(result_lines)
    
        except ImportError:
            return "Wind modeling not available - atmospheric integration required"
        except Exception as e:
            logger.error(f"Wind model error: {str(e)}", exc_info=True)
            return f"Wind model error: {str(e)}"
  • Registers wind_model_simple as an MCP tool.
    mcp.tool(wind_model_simple)
  • Core wind profile computation using logarithmic or power-law models, produces list of WindPoint dataclass instances.
    def wind_model_simple(
        altitudes_m: list[float],
        surface_wind_mps: float,
        surface_altitude_m: float = 0.0,
        model: str = "logarithmic",
        roughness_length_m: float = 0.1,
        reference_height_m: float = 10.0,
    ) -> list[WindPoint]:
        """
        Simple wind profile models for low-altitude studies.
    
        Args:
            altitudes_m: Altitude points for wind calculation
            surface_wind_mps: Wind speed at reference height
            surface_altitude_m: Surface elevation
            model: "logarithmic" or "power" law
            roughness_length_m: Surface roughness length (for logarithmic)
            reference_height_m: Height of surface wind measurement
    
        Returns:
            List of WindPoint objects with wind speeds
        """
        if model not in ["logarithmic", "power"]:
            raise ValueError(f"Unknown wind model: {model}. Use 'logarithmic' or 'power'")
    
        results = []
    
        for altitude in altitudes_m:
            height_agl = altitude - surface_altitude_m
    
            if height_agl < 0:
                wind_speed = 0.0  # Below ground
            elif height_agl < reference_height_m:
                # Linear interpolation below reference height
                wind_speed = surface_wind_mps * (height_agl / reference_height_m)
            else:
                if model == "logarithmic":
                    # Logarithmic wind profile
                    if roughness_length_m <= 0:
                        raise ValueError("Roughness length must be positive")
    
                    wind_speed = surface_wind_mps * (
                        math.log(height_agl / roughness_length_m)
                        / math.log(reference_height_m / roughness_length_m)
                    )
                else:  # power law
                    # Power law with typical exponent
                    alpha = 0.143  # Typical for open terrain
                    wind_speed = (
                        surface_wind_mps * (height_agl / reference_height_m) ** alpha
                    )
    
            results.append(
                WindPoint(
                    altitude_m=altitude,
                    wind_speed_mps=max(0.0, wind_speed),  # Ensure non-negative
                )
            )
    
        return results
  • Pydantic BaseModel defining the structure of wind profile points returned by the core wind_model_simple function.
    class WindPoint(BaseModel):
        """Single wind profile point."""
    
        altitude_m: float = Field(..., description="Altitude in meters")
        wind_speed_mps: float = Field(..., description="Wind speed in m/s")
        wind_direction_deg: float | None = Field(
            None, description="Wind direction in degrees"
        )
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool does but doesn't mention computational characteristics (speed, accuracy), error conditions, limitations of the models, or what happens with invalid inputs. The description lacks behavioral context beyond the basic function.

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

Conciseness4/5

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

The description is well-structured with clear sections (purpose, Args, Returns). Each sentence earns its place by providing essential information. The front-loaded purpose statement is clear, though the formatting could be slightly more compact.

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 the complexity of a scientific calculation tool with 5 parameters and no annotations, the description covers the basics but lacks depth. While it explains parameters and mentions the return format, it doesn't address model limitations, accuracy, or typical use cases in the aerospace context where sibling tools operate.

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?

With 0% schema description coverage, the description compensates well by explaining all 5 parameters in the Args section. It provides units (meters, m/s, degrees), reference heights (10m), orientation conventions (0=North, 90=East), and model options. This adds significant meaning beyond the bare schema.

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 ('Calculate wind speeds at different altitudes') and specifies the methods ('using logarithmic or power law models'). It distinguishes itself from sibling tools by focusing on wind modeling rather than orbital mechanics, aerodynamics, or other aerospace topics.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. While the description mentions two model types, it doesn't explain when to choose logarithmic vs. power law, nor does it reference any sibling tools that might serve similar purposes in the aerospace context.

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/cheesejaguar/aerospace-mcp'

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