Skip to main content
Glama
mhyrr
by mhyrr

export_scene

Export the current SketchUp scene in a specified format directly through the SketchupMCP server, enabling Claude AI to manage 3D model outputs efficiently.

Instructions

Export the current scene

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoskp

Implementation Reference

  • The handler function for the 'export_scene' MCP tool. Decorated with @mcp.tool() which also serves as registration. It connects to SketchUp via socket, sends a JSON-RPC 'tools/call' for 'export' with the specified format, and returns the result as JSON.
    @mcp.tool()
    def export_scene(
        ctx: Context,
        format: str = "skp"
    ) -> str:
        """Export the current scene"""
        try:
            sketchup = get_sketchup_connection()
            result = sketchup.send_command(
                method="tools/call",
                params={
                    "name": "export",
                    "arguments": {
                        "format": format
                    }
                },
                request_id=ctx.request_id
            )
            return json.dumps(result)
        except Exception as e:
            return f"Error exporting scene: {str(e)}"
Install Server

Other Tools

Related 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/mhyrr/sketchup-mcp'

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