Skip to main content
Glama

wing_vlm_analysis

Analyze wing aerodynamics using Vortex Lattice Method or lifting line theory to calculate lift, drag, and performance based on wing configuration and flight conditions.

Instructions

Analyze wing aerodynamics using Vortex Lattice Method or simplified lifting line theory.

Args: wing_config: Wing configuration (span_m, chord_m, sweep_deg, etc.) flight_conditions: Flight conditions (airspeed_ms, altitude_m, alpha_deg) analysis_options: Optional analysis settings

Returns: Formatted string with aerodynamic analysis results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wing_configYes
flight_conditionsYes
analysis_optionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler function registered as the MCP tool 'wing_vlm_analysis'. It calls the core analysis logic and formats the output into a readable string with key metrics and full JSON data.
    def wing_vlm_analysis(
        wing_config: dict, flight_conditions: dict, analysis_options: dict | None = None
    ) -> str:
        """Analyze wing aerodynamics using Vortex Lattice Method or simplified lifting line theory.
    
        Args:
            wing_config: Wing configuration (span_m, chord_m, sweep_deg, etc.)
            flight_conditions: Flight conditions (airspeed_ms, altitude_m, alpha_deg)
            analysis_options: Optional analysis settings
    
        Returns:
            Formatted string with aerodynamic analysis results
        """
        try:
            from ..integrations.aero import wing_vlm_analysis as _wing_analysis
    
            result = _wing_analysis(wing_config, flight_conditions, analysis_options)
    
            # Format response
            result_lines = ["Wing Aerodynamic Analysis (VLM)", "=" * 50]
    
            # Wing configuration
            result_lines.extend(
                [
                    "Configuration:",
                    f"  Span: {wing_config.get('span_m', 0):.1f} m",
                    f"  Chord: {wing_config.get('chord_m', 0):.1f} m",
                    f"  Aspect Ratio: {result.get('aspect_ratio', 0):.1f}",
                    f"  Sweep: {wing_config.get('sweep_deg', 0):.1f}°",
                    "",
                ]
            )
    
            # Flight conditions
            result_lines.extend(
                [
                    "Flight Conditions:",
                    f"  Airspeed: {flight_conditions.get('airspeed_ms', 0):.1f} m/s",
                    f"  Altitude: {flight_conditions.get('altitude_m', 0):.0f} m",
                    f"  Angle of Attack: {flight_conditions.get('alpha_deg', 0):.1f}°",
                    "",
                ]
            )
    
            # Results
            result_lines.extend(
                [
                    "Aerodynamic Results:",
                    f"  Lift Coefficient: {result.get('cl', 0):.3f}",
                    f"  Drag Coefficient: {result.get('cd', 0):.4f}",
                    f"  L/D Ratio: {result.get('cl_cd_ratio', 0):.1f}",
                    f"  Lift (N): {result.get('lift_n', 0):.0f}",
                    f"  Drag (N): {result.get('drag_n', 0):.0f}",
                    "",
                ]
            )
    
            # Add JSON data
            json_data = json.dumps(result, indent=2)
            result_lines.extend(["JSON Data:", json_data])
    
            return "\n".join(result_lines)
    
        except ImportError:
            return "Wing analysis not available - install aerodynamics packages"
        except Exception as e:
            logger.error(f"Wing analysis error: {str(e)}", exc_info=True)
            return f"Wing analysis error: {str(e)}"
  • Registration of the wing_vlm_analysis tool with the FastMCP server instance.
    mcp.tool(wing_vlm_analysis)
  • Pydantic model defining the input WingGeometry schema used by the analysis functions.
    """Wing planform geometry definition."""
    
    span_m: float = Field(..., gt=0, description="Wing span in meters")
    chord_root_m: float = Field(..., gt=0, description="Root chord in meters")
    chord_tip_m: float = Field(..., gt=0, description="Tip chord in meters")
    sweep_deg: float = Field(
        0.0, ge=-45, le=45, description="Quarter-chord sweep in degrees"
    )
    dihedral_deg: float = Field(
        0.0, ge=-15, le=15, description="Dihedral angle in degrees"
    )
    twist_deg: float = Field(
        0.0, ge=-10, le=10, description="Geometric twist (tip relative to root)"
    )
    airfoil_root: str = Field("NACA2412", description="Root airfoil name")
    airfoil_tip: str = Field("NACA2412", description="Tip airfoil name")
  • Pydantic model for output WingAnalysisPoint, representing results at each angle of attack.
    class WingAnalysisPoint(BaseModel):
        """Wing analysis results at a single condition."""
    
        alpha_deg: float = Field(..., description="Wing angle of attack")
        CL: float = Field(..., description="Wing lift coefficient")
        CD: float = Field(..., description="Wing drag coefficient")
        CM: float = Field(..., description="Wing pitching moment coefficient")
        L_D_ratio: float = Field(..., description="Lift to drag ratio")
        span_efficiency: float | None = Field(None, description="Span efficiency factor")
  • Core helper function implementing the wing VLM analysis logic, dispatching to AeroSandbox VLM or simplified lifting-line method.
    def wing_vlm_analysis(
        geometry: WingGeometry,
        alpha_deg_list: list[float],
        mach: float = 0.2,
        reynolds: float | None = None,
    ) -> list[WingAnalysisPoint]:
        """
        Vortex Lattice Method wing analysis.
    
        Args:
            geometry: Wing planform geometry
            alpha_deg_list: List of angles of attack to analyze (degrees)
            mach: Mach number
            reynolds: Reynolds number (optional, used for airfoil data if available)
    
        Returns:
            List of WingAnalysisPoint objects with CL, CD, CM data
        """
        if AEROSANDBOX_AVAILABLE:
            try:
                # Use AeroSandbox VLM
                return _aerosandbox_wing_analysis(geometry, alpha_deg_list, mach, reynolds)
            except Exception:
                # Fall back to simple method
                pass
    
        # Use simple lifting line approximation
        return _simple_wing_analysis(geometry, alpha_deg_list, mach)
Behavior2/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 mentions the analysis methods but doesn't describe computational requirements, accuracy limitations, runtime expectations, or error conditions. For a complex aerodynamic analysis tool with nested parameters, this leaves significant behavioral aspects undocumented.

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 appropriately concise with clear sections: purpose statement, Args section, and Returns section. The structure is logical and front-loaded with the core functionality. However, the Args section could be more informative given the lack of schema documentation.

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 (aerodynamic analysis with nested parameters), lack of annotations, and 0% schema coverage, the description is incomplete. While an output schema exists (mentioned in context signals), the description doesn't compensate for the missing parameter documentation or behavioral context needed for proper tool invocation.

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

Parameters2/5

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

Schema description coverage is 0%, so the schema provides no parameter documentation. The description lists parameter names (wing_config, flight_conditions, analysis_options) and gives brief examples in parentheses, but doesn't explain what specific properties these objects should contain, their units, valid ranges, or required vs optional fields. This is insufficient for 3 parameters with nested objects.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Analyze wing aerodynamics using Vortex Lattice Method or simplified lifting line theory.' This specifies the action (analyze), resource (wing aerodynamics), and methods (VLM/lifting line theory). However, it doesn't explicitly differentiate from sibling tools like 'get_aircraft_performance' or 'airfoil_polar_analysis', which might also analyze aerodynamic properties.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer VLM vs lifting line theory, nor does it contrast with sibling tools like 'airfoil_polar_analysis' (which focuses on airfoils rather than wings) or 'get_aircraft_performance' (which might be more comprehensive). The user must infer usage from the tool name and description alone.

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