Skip to main content
Glama

optimize_launch_angle

Calculate optimal rocket launch angles to achieve maximum altitude or specific target ranges using aerospace engineering parameters.

Instructions

Optimize rocket launch angle for maximum altitude or range.

Args: rocket_geometry: Rocket geometry parameters target_range_m: Optional target range in meters optimize_for: Optimization objective ('altitude' or 'range') angle_bounds_deg: Launch angle bounds in degrees

Returns: JSON string with optimization results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rocket_geometryYes
target_range_mNo
optimize_forNoaltitude
angle_bounds_degNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler function for the 'optimize_launch_angle' MCP tool. It processes input parameters, attempts to delegate to the integrations/rockets optimizer (which may not be implemented), and returns JSON-formatted results or error messages.
    def optimize_launch_angle(
        rocket_geometry: dict,
        target_range_m: float | None = None,
        optimize_for: Literal["altitude", "range"] = "altitude",
        angle_bounds_deg: tuple[float, float] = (45.0, 90.0),
    ) -> str:
        """Optimize rocket launch angle for maximum altitude or range.
    
        Args:
            rocket_geometry: Rocket geometry parameters
            target_range_m: Optional target range in meters
            optimize_for: Optimization objective ('altitude' or 'range')
            angle_bounds_deg: Launch angle bounds in degrees
    
        Returns:
            JSON string with optimization results
        """
        try:
            from ..integrations.rockets import (
                RocketGeometry,
            )
            from ..integrations.rockets import (
                optimize_launch_angle as _optimize,
            )
    
            geometry = RocketGeometry(**rocket_geometry)
    
            result = _optimize(geometry, target_range_m, optimize_for, angle_bounds_deg)
    
            return json.dumps(result, indent=2)
    
        except ImportError:
            return "Launch optimization not available - install optimization packages"
        except Exception as e:
            logger.error(f"Launch optimization error: {str(e)}", exc_info=True)
            return f"Launch optimization error: {str(e)}"
  • Registration of the optimize_launch_angle tool with the FastMCP server instance.
    mcp.tool(optimize_launch_angle)
  • Import statement bringing the optimize_launch_angle handler into the server module for registration.
    from .tools.rockets import (
        estimate_rocket_sizing,
        optimize_launch_angle,
        rocket_3dof_trajectory,
    )
  • Dataclass schema for RocketGeometry, used to validate and structure the rocket_geometry dict input in the tool handler.
    @dataclass
    class RocketGeometry:
        """Rocket geometry parameters."""
    
        dry_mass_kg: float  # Rocket dry mass
        propellant_mass_kg: float  # Initial propellant mass
        diameter_m: float  # Rocket diameter
        length_m: float  # Total rocket length
        cd: float = 0.3  # Drag coefficient
        thrust_curve: list[list[float]] = (
            None  # [[time_s, thrust_N], ...] or constant thrust
        )
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. While it mentions optimization objectives, it doesn't describe what the optimization entails (e.g., computational method, convergence criteria, runtime expectations), whether it's deterministic or stochastic, what happens with invalid inputs, or any rate limits. This is inadequate for a computational optimization tool.

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 sized and front-loaded with the core purpose in the first sentence. The Args and Returns sections are structured clearly. While efficient, the rocket_geometry parameter could benefit from more specific guidance given its complexity.

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 tool's computational nature, 4 parameters (including a nested object), and no annotations, the description is moderately complete. It explains parameters and mentions output format, but lacks behavioral context about the optimization process. The presence of an output schema reduces the need to detail return values, but more operational guidance would help.

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 four parameters: rocket_geometry, target_range_m, optimize_for, and angle_bounds_deg. It clarifies that target_range_m is optional and specifies the possible values for optimize_for. However, it doesn't detail what rocket_geometry should contain or the format of angle_bounds_deg beyond 'in degrees'.

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 tool's purpose with a specific verb ('optimize') and resource ('rocket launch angle'), plus the optimization objectives ('maximum altitude or range'). It distinguishes itself from siblings like optimize_thrust_profile and rocket_3dof_trajectory by focusing specifically on launch angle optimization rather than thrust or full trajectory simulation.

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 prerequisites, when not to use it, or how it relates to sibling tools like optimize_thrust_profile or rocket_3dof_trajectory that might handle related aerospace calculations.

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