Skip to main content
Glama
Pradumnasaraf

Aviationstack MCP Server

random_airplanes_detailed_info

Get detailed metadata for a specified number of random airplanes, enabling varied aircraft data retrieval for testing or analysis.

Instructions

Return detailed metadata for random airplanes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
number_of_airplanesYesNumber of random airplanes to return.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core handler function that fetches random airplane detailed info from the API, samples the data, and returns JSON with fields like production_line, plane_owner, plane_age, model_name, etc.
    def random_airplanes_detailed_info(number_of_airplanes: int) -> str:
        """Get detailed info for random airplanes."""
        try:
            _validate_positive_int(number_of_airplanes, "number_of_airplanes")
            data = fetch_flight_data("airplanes", {"limit": number_of_airplanes})
            sampled_airplanes = _sample_data(data.get("data", []), number_of_airplanes)
    
            airplanes = []
            for airplane in sampled_airplanes:
                airplanes.append(
                    {
                        "production_line": airplane.get("production_line"),
                        "plane_owner": airplane.get("plane_owner"),
                        "plane_age": airplane.get("plane_age"),
                        "model_name": airplane.get("model_name"),
                        "model_code": airplane.get("model_code"),
                        "plane_series": airplane.get("plane_series"),
                        "registration_number": airplane.get("registration_number"),
                        "engines_type": airplane.get("engines_type"),
                        "engines_count": airplane.get("engines_count"),
                        "delivery_date": airplane.get("delivery_date"),
                        "first_flight_date": airplane.get("first_flight_date"),
                    }
                )
            return json.dumps(airplanes)
        except requests.RequestException as exc:
            return _error_response("fetching airplanes", exc)
        except (KeyError, ValueError, TypeError) as exc:
            return _error_response("fetching airplanes", exc)
  • Pydantic input schema (BaseModel) for the random_airplanes_detailed_info tool, defining number_of_airplanes as a required positive integer.
    class RandomAirplanesDetailedInfoInput(BaseModel):
        """Input schema for random_airplanes_detailed_info tool."""
    
        model_config = ConfigDict(extra="forbid")
    
        number_of_airplanes: int = Field(
            ...,
            description="Number of random airplanes to return.",
            gt=0,
        )
  • MCP tool registration using @mcp.tool decorator with name='random_airplanes_detailed_info' and a description.
    @mcp.tool(
        name="random_airplanes_detailed_info",
        description="Return detailed metadata for random airplanes.",
    )
    def random_airplanes_detailed_info_tool(
        number_of_airplanes: Annotated[
            int, Field(description="Number of random airplanes to return.", gt=0)
        ],
    ) -> str:
        """Tool wrapper for random_airplanes_detailed_info."""
        validated_input = RandomAirplanesDetailedInfoInput(
            number_of_airplanes=number_of_airplanes
        )
        return random_airplanes_detailed_info(
            number_of_airplanes=validated_input.number_of_airplanes
        )
Behavior2/5

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

With no annotations, the description carries full burden. It indicates a read operation but does not disclose randomness behavior, limits on number_of_airplanes, or determinism. Minimal behavioral context is provided.

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 extremely concise (6 words) and front-loaded with the verb. However, it could include a bit more contextual detail without becoming verbose.

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 one simple parameter and the existence of an output schema, the description is minimally adequate. It lacks differentiation from siblings like random_aircraft_type, which reduces completeness.

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

Parameters3/5

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

Schema coverage is 100% with a clear description for the only parameter. The tool description adds no additional meaning beyond what the parameter description already states, so baseline score of 3 is appropriate.

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 verb (Return) and resource (detailed metadata for random airplanes), distinguishing it from siblings like random_aircraft_type which likely returns only type. However, 'detailed metadata' is vague without further specification.

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 vs alternatives such as random_aircraft_type or random_cities_detailed_info. Context of use is entirely implicit.

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/Pradumnasaraf/aviationstack-mcp'

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