Skip to main content
Glama

get_selection

Retrieve currently selected components in Sketchup for real-time 3D modeling and scene manipulation through direct integration with the SketchupMCP server.

Instructions

Get currently selected components

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_selection' MCP tool. It establishes a connection to SketchUp via socket, sends a JSON-RPC 'tools/call' request to SketchUp's 'get_selection' tool with empty arguments, and returns the JSON-encoded result or an error message.
    @mcp.tool() def get_selection(ctx: Context) -> str: """Get currently selected components""" try: sketchup = get_sketchup_connection() result = sketchup.send_command( method="tools/call", params={ "name": "get_selection", "arguments": {} }, request_id=ctx.request_id ) return json.dumps(result) except Exception as e: return f"Error getting selection: {str(e)}"

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/BearNetwork-BRNKC/SketchUp-MCP'

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