Skip to main content
Glama

openvsp.inspect

Analyze OpenVSP geometry files to extract component IDs and structural information without altering the original design.

Instructions

Describe an OpenVSP geometry without modifying it. Returns component IDs and raw info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
geom_idsYesTop-level geometry IDs discovered
info_logYesRaw output from OpenVSP describe command
wing_namesNoDetected wing geometry names

Implementation Reference

  • The handler function for the 'openvsp.inspect' tool, registered via FastMCP decorator. Extracts geometry_file from request and calls describe_geometry helper.
    @app.tool(
        name="openvsp.inspect",
        description=(
            "Describe an OpenVSP geometry without modifying it. Returns component IDs and raw info."),
        meta={"version": "0.1.0", "categories": ["geometry", "aero", "inspection"]},
    )
    def inspect(request: OpenVSPGeometryRequest) -> OpenVSPInspectResponse:
        return describe_geometry(request.geometry_file)
  • Core helper function implementing the inspection logic: generates a no-op script, runs OpenVSP, checks exit code, parses .vsp3 XML to extract geometry IDs, wing names, and detailed component info.
    def describe_geometry(geometry_file: str) -> OpenVSPInspectResponse:
        """Run OpenVSP in describe mode and parse high-level geometry information."""
    
        with tempfile.TemporaryDirectory(prefix="openvsp_mcp_describe_") as tmpdir:
            temp_request = OpenVSPRequest(
                geometry_file=geometry_file,
                set_commands=[],
                run_vspaero=False,
                case_name="describe",
            )
            script_path = _write_script(temp_request, Path(tmpdir))
    
            result = subprocess.run(
                [OPENVSP_BIN, "-script", str(script_path)],
                check=False,
                capture_output=True,
            )
            if result.returncode not in _OK_EXIT_CODES:
                message = result.stderr.decode("utf-8", errors="ignore").strip()
                if not message:
                    message = result.stdout.decode("utf-8", errors="ignore").strip()
                raise RuntimeError(message or "OpenVSP describe run failed")
    
            tree = ET.parse(geometry_file)
            root = tree.getroot()
            geom_ids: list[str] = []
            wing_names: list[str] = []
            info_lines: list[str] = []
    
            for geom in root.findall(".//Geom"):
                name_elem = geom.find("ParmContainer/Name")
                geom_name = name_elem.text if name_elem is not None else ""
                id_elem = geom.find("ParmContainer/ID")
                geom_id = id_elem.text if id_elem is not None else ""
                type_elem = geom.find("GeomBase/TypeName")
                geom_type = type_elem.text if type_elem is not None else ""
    
                if geom_id:
                    geom_ids.append(geom_id)
                if geom_type.lower() == "wing" and geom_name:
                    wing_names.append(geom_name)
                info_lines.append(f"{geom_id or 'UNKNOWN'}:{geom_name or 'Unnamed'}:{geom_type or 'Unknown'}")
    
            return OpenVSPInspectResponse(
                geom_ids=geom_ids,
                wing_names=wing_names,
                info_log="\n".join(info_lines),
            )
  • Pydantic input schema for the openvsp.inspect tool request, requiring the path to the .vsp3 geometry file.
    class OpenVSPGeometryRequest(BaseModel):
        geometry_file: str = Field(..., description="Path to the .vsp3 file")
  • Pydantic output schema for the openvsp.inspect tool response, containing lists of geometry IDs and wing names, plus detailed info log.
    class OpenVSPInspectResponse(BaseModel):
        """High-level summary of a geometry."""
    
        geom_ids: list[str] = Field(..., description="Top-level geometry IDs discovered")
        wing_names: list[str] = Field(default_factory=list, description="Detected wing geometry names")
        info_log: str = Field(..., description="Raw output from OpenVSP describe command")
  • Invocation of build_tool on the FastMCP server instance, which registers the openvsp.inspect tool (along with others).
    build_tool(app)
Behavior3/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 states the tool is non-modifying and returns 'component IDs and raw info,' which covers basic behavior. However, it lacks details on error handling, performance, or any constraints like file size limits, leaving gaps in transparency.

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 front-loaded and concise, consisting of two sentences that efficiently convey the tool's purpose and output. Every sentence earns its place by adding value without redundancy, making it easy to understand quickly.

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

Completeness4/5

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

Given the tool's low complexity (1 parameter) and the presence of an output schema, the description is mostly complete. It covers the non-modifying nature and output type, but could benefit from more behavioral context, such as error cases or usage tips, to be fully comprehensive.

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?

The description adds no parameter-specific information beyond what the input schema provides, as schema description coverage is 0%. However, with only one parameter, the baseline is high. The description's mention of 'OpenVSP geometry' and '.vsp3 file' in the schema provides adequate context, compensating for the lack of explicit param details.

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 with a specific verb ('Describe') and resource ('OpenVSP geometry'), and distinguishes it from siblings by emphasizing it doesn't modify the geometry. However, it doesn't explicitly name the sibling tools for comparison, which prevents a perfect score.

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

Usage Guidelines3/5

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

The description implies when to use this tool by stating it 'without modifying it,' suggesting it's for inspection rather than modification. However, it doesn't provide explicit guidance on when to choose this over alternatives like 'openvsp.modify' or 'openvsp.run_vspaero,' nor does it mention any prerequisites or exclusions.

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/Three-Little-Birds/openvsp-mcp'

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